Skip to content

Commit

Permalink
Merge branch 'develop' into chore/merge-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocaillard committed Dec 17, 2024
2 parents 0e67220 + bf1e4f2 commit 47e2bb7
Show file tree
Hide file tree
Showing 122 changed files with 5,485 additions and 1,973 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,17 @@ jobs:
- tests::signer::v0::signer_set_rollover
- tests::signer::v0::signing_in_0th_tenure_of_reward_cycle
- tests::signer::v0::continue_after_tenure_extend
- tests::signer::v0::tenure_extend_after_idle_signers
- tests::signer::v0::tenure_extend_after_idle_miner
- tests::signer::v0::tenure_extend_succeeds_after_rejected_attempt
- tests::signer::v0::stx_transfers_dont_effect_idle_timeout
- tests::signer::v0::idle_tenure_extend_active_mining
- tests::signer::v0::multiple_miners_with_custom_chain_id
- tests::signer::v0::block_commit_delay
- tests::signer::v0::continue_after_fast_block_no_sortition
- tests::signer::v0::block_validation_response_timeout
- tests::signer::v0::tenure_extend_after_bad_commit
- tests::signer::v0::block_proposal_max_age_rejections
- tests::nakamoto_integrations::burn_ops_integration_test
- tests::nakamoto_integrations::check_block_heights
- tests::nakamoto_integrations::clarity_burn_state
Expand All @@ -142,6 +148,7 @@ jobs:
- tests::nakamoto_integrations::v3_signer_api_endpoint
- tests::nakamoto_integrations::test_shadow_recovery
- tests::nakamoto_integrations::signer_chainstate
- tests::nakamoto_integrations::sip029_coinbase_change
- tests::nakamoto_integrations::clarity_cost_spend_down
- tests::nakamoto_integrations::v3_blockbyheight_api_endpoint
# TODO: enable these once v1 signer is supported by a new nakamoto epoch
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/p2p-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
- net::tests::convergence::test_walk_star_15_org_biased
- net::tests::convergence::test_walk_inbound_line_15
- net::api::tests::postblock_proposal::test_try_make_response
- net::server::tests::test_http_10_threads_getinfo
- net::server::tests::test_http_10_threads_getblock
- net::server::tests::test_http_too_many_clients
- net::server::tests::test_http_slow_client
- net::server::test::test_http_10_threads_getinfo
- net::server::test::test_http_10_threads_getblock
- net::server::test::test_http_too_many_clients
- net::server::test::test_http_slow_client
steps:
## Setup test environment
- name: Setup Test Environment
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/stacks-core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,55 +18,6 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
# Full genesis test with code coverage
full-genesis:
name: Full Genesis Test
runs-on: ubuntu-latest
strategy:
## Continue with the test matrix even if we've had a failure
fail-fast: false
## Run a maximum of 2 concurrent tests from the test matrix
max-parallel: 2
matrix:
test-name:
- neon_integrations::bitcoind_integration_test
steps:
## Setup test environment
- name: Setup Test Environment
id: setup_tests
uses: stacks-network/actions/stacks-core/testenv@main
with:
genesis: true
btc-version: "25.0"

## Run test matrix using restored cache of archive file
## - Test will timeout after env.TEST_TIMEOUT minutes
- name: Run Tests
id: run_tests
timeout-minutes: ${{ fromJSON(env.TEST_TIMEOUT) }}
uses: stacks-network/actions/stacks-core/run-tests@main
with:
test-name: ${{ matrix.test-name }}
threads: 1
archive-file: ~/genesis_archive.tar.zst

## Upload code coverage file
- name: Code Coverage
id: codecov
uses: stacks-network/actions/codecov@main
with:
test-name: large_genesis
filename: ./lcov.info

- name: Status Output
run: |
echo "run_tests: ${{ steps.run_tests.outputs.status }}"
echo "codecov: ${{ steps.codecov.outputs.status }}"
- name: Check Failures
if: steps.run_tests.outputs.status == 'failure' || steps.codecov.outputs.status == 'failure'
run: exit 1

# Unit tests with code coverage
unit-tests:
name: Unit Tests
Expand Down Expand Up @@ -186,7 +137,6 @@ jobs:
runs-on: ubuntu-latest
if: always()
needs:
- full-genesis
- open-api-validation
- core-contracts-clarinet-test
steps:
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,37 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
## [Unreleased]

### Added
- Add `tenure_timeout_secs` to the miner for determining when a time-based tenure extend should be attempted.

### Changed

## [3.1.0.0.1]

### Added

- A miner will now generate a tenure-extend when at least 70% of the signers have confirmed that they are willing to allow one, via the new timestamp included in block responses. This allows the miner to refresh its budget in between Bitcoin blocks. ([#5476](https://github.com/stacks-network/stacks-core/discussions/5476))

### Changed

## [3.1.0.0.0]

### Added

- **SIP-029 consensus rules, activating in epoch 3.1 at block 875,000** (see [SIP-029](https://github.com/stacksgov/sips/blob/main/sips/sip-029/sip-029-halving-alignment.md) for details)
- New RPC endpoints
- `/v2/clarity/marf/:marf_key_hash`
- `/v2/clarity/metadata/:principal/:contract_name/:clarity_metadata_key`
- When a proposed block is validated by a node, the block can be validated even when the block version is different than the node's default ([#5539](https://github.com/stacks-network/stacks-core/pull/5539))

### Changed

## [3.0.0.0.4]

### Added

### Changed

- Use the same burn view loader in both block validation and block processing

## [3.0.0.0.3]

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ _Do_ document things that are not clear, e.g.:
Keep in mind that better variable names can reduce the need for comments, e.g.:

- `burnblock_height` instead of `height` may eliminate the need to comment that `height` refers to a burnblock height
- `process_microblocks` instead of `process_blocks` is more correct, and may eliminate the need to to explain that the inputs are microblocks
- `process_microblocks` instead of `process_blocks` is more correct, and may eliminate the need to explain that the inputs are microblocks
- `add_transaction_to_microblock` explains more than `handle_transaction`, and reduces the need to even read the comment

# Licensing and contributor license agreement
Expand Down
33 changes: 17 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ rand = "0.8"
rand_chacha = "0.3.1"
tikv-jemallocator = "0.5.4"
rusqlite = { version = "0.31.0", features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] }
thiserror = { version = "1.0.65" }
thiserror = "1.0.65"
toml = "0.5.6"

# Use a bit more than default optimization for
# dev builds to speed up test execution
Expand Down
3 changes: 2 additions & 1 deletion clarity/src/vm/analysis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ pub fn run_analysis(
| StacksEpochId::Epoch23
| StacksEpochId::Epoch24
| StacksEpochId::Epoch25
| StacksEpochId::Epoch30 => {
| StacksEpochId::Epoch30
| StacksEpochId::Epoch31 => {
TypeChecker2_1::run_pass(&epoch, &mut contract_analysis, db, build_type_map)
}
StacksEpochId::Epoch10 => {
Expand Down
6 changes: 4 additions & 2 deletions clarity/src/vm/analysis/type_checker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ impl FunctionType {
| StacksEpochId::Epoch23
| StacksEpochId::Epoch24
| StacksEpochId::Epoch25
| StacksEpochId::Epoch30 => self.check_args_2_1(accounting, args, clarity_version),
| StacksEpochId::Epoch30
| StacksEpochId::Epoch31 => self.check_args_2_1(accounting, args, clarity_version),
StacksEpochId::Epoch10 => {
return Err(CheckErrors::Expects("Epoch10 is not supported".into()).into())
}
Expand All @@ -75,7 +76,8 @@ impl FunctionType {
| StacksEpochId::Epoch23
| StacksEpochId::Epoch24
| StacksEpochId::Epoch25
| StacksEpochId::Epoch30 => {
| StacksEpochId::Epoch30
| StacksEpochId::Epoch31 => {
self.check_args_by_allowing_trait_cast_2_1(db, clarity_version, func_args)
}
StacksEpochId::Epoch10 => {
Expand Down
2 changes: 1 addition & 1 deletion clarity/src/vm/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ mod test {
) -> std::result::Result<ExecutionCost, CostErrors> {
self.invoked_functions.push((cost_f, input.to_vec()));
self.invocation_count += 1;
Ok(ExecutionCost::zero())
Ok(ExecutionCost::ZERO)
}
fn add_cost(&mut self, _cost: ExecutionCost) -> std::result::Result<(), CostErrors> {
self.cost_addition_count += 1;
Expand Down
2 changes: 1 addition & 1 deletion clarity/src/vm/contexts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,7 @@ impl<'a> GlobalContext<'a> {
database: ClarityDatabase<'a>,
cost_track: LimitedCostTracker,
epoch_id: StacksEpochId,
) -> GlobalContext {
) -> GlobalContext<'a> {
#[cfg(feature = "clarity-wasm")]
let engine = Engine::default();

Expand Down
Loading

0 comments on commit 47e2bb7

Please sign in to comment.