Skip to content

Commit a96cf08

Browse files
authored
Merge branch 'develop' into develop
2 parents 07498db + 0ee5d7c commit a96cf08

File tree

234 files changed

+18902
-7933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+18902
-7933
lines changed

.github/actions/dockerfiles/Dockerfile.debian-source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ RUN --mount=type=tmpfs,target=${BUILD_DIR} cp -R /src/. ${BUILD_DIR}/ \
2424
&& cp -R ${BUILD_DIR}/target/${TARGET}/release/. /out
2525

2626
FROM --platform=${TARGETPLATFORM} debian:bookworm
27-
COPY --from=build /out/stacks-node /out/stacks-signer /bin/
27+
COPY --from=build /out/stacks-node /out/stacks-signer /out/stacks-inspect /bin/
2828
CMD ["stacks-node", "mainnet"]

.github/workflows/bitcoin-tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,18 @@ jobs:
122122
- tests::signer::v0::signer_set_rollover
123123
- tests::signer::v0::signing_in_0th_tenure_of_reward_cycle
124124
- tests::signer::v0::continue_after_tenure_extend
125+
- tests::signer::v0::tenure_extend_after_idle_signers
126+
- tests::signer::v0::tenure_extend_after_idle_miner
127+
- tests::signer::v0::tenure_extend_succeeds_after_rejected_attempt
128+
- tests::signer::v0::stx_transfers_dont_effect_idle_timeout
129+
- tests::signer::v0::idle_tenure_extend_active_mining
125130
- tests::signer::v0::multiple_miners_with_custom_chain_id
126131
- tests::signer::v0::block_commit_delay
127132
- tests::signer::v0::continue_after_fast_block_no_sortition
128133
- tests::signer::v0::block_validation_response_timeout
134+
- tests::signer::v0::tenure_extend_after_bad_commit
135+
- tests::signer::v0::block_proposal_max_age_rejections
136+
- tests::signer::v0::global_acceptance_depends_on_block_announcement
129137
- tests::nakamoto_integrations::burn_ops_integration_test
130138
- tests::nakamoto_integrations::check_block_heights
131139
- tests::nakamoto_integrations::clarity_burn_state
@@ -136,10 +144,13 @@ jobs:
136144
- tests::nakamoto_integrations::mock_mining
137145
- tests::nakamoto_integrations::multiple_miners
138146
- tests::nakamoto_integrations::follower_bootup_across_multiple_cycles
147+
- tests::nakamoto_integrations::nakamoto_lockup_events
139148
- tests::nakamoto_integrations::utxo_check_on_startup_panic
140149
- tests::nakamoto_integrations::utxo_check_on_startup_recover
141150
- tests::nakamoto_integrations::v3_signer_api_endpoint
151+
- tests::nakamoto_integrations::test_shadow_recovery
142152
- tests::nakamoto_integrations::signer_chainstate
153+
- tests::nakamoto_integrations::sip029_coinbase_change
143154
- tests::nakamoto_integrations::clarity_cost_spend_down
144155
- tests::nakamoto_integrations::v3_blockbyheight_api_endpoint
145156
# TODO: enable these once v1 signer is supported by a new nakamoto epoch

.github/workflows/clippy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Perform Clippy checks - currently set to defaults
2+
## https://github.com/rust-lang/rust-clippy#usage
3+
## https://rust-lang.github.io/rust-clippy/master/index.html
4+
##
5+
name: Clippy Checks
6+
7+
# Only run when:
8+
# - PRs are (re)opened against develop branch
9+
on:
10+
pull_request:
11+
branches:
12+
- develop
13+
types:
14+
- opened
15+
- reopened
16+
- synchronize
17+
18+
jobs:
19+
clippy_check:
20+
name: Clippy Check
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout the latest code
24+
id: git_checkout
25+
uses: actions/checkout@v3
26+
- name: Define Rust Toolchain
27+
id: define_rust_toolchain
28+
run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
29+
- name: Setup Rust Toolchain
30+
id: setup_rust_toolchain
31+
uses: actions-rust-lang/setup-rust-toolchain@v1
32+
with:
33+
toolchain: ${{ env.RUST_TOOLCHAIN }}
34+
components: clippy
35+
- name: Clippy
36+
id: clippy
37+
uses: actions-rs/clippy-check@v1
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
args: -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner --no-deps --tests --all-features -- -D warnings

.github/workflows/p2p-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ jobs:
4343
- net::tests::convergence::test_walk_star_15_org_biased
4444
- net::tests::convergence::test_walk_inbound_line_15
4545
- net::api::tests::postblock_proposal::test_try_make_response
46-
- net::server::tests::test_http_10_threads_getinfo
47-
- net::server::tests::test_http_10_threads_getblock
48-
- net::server::tests::test_http_too_many_clients
49-
- net::server::tests::test_http_slow_client
46+
- net::server::test::test_http_10_threads_getinfo
47+
- net::server::test::test_http_10_threads_getblock
48+
- net::server::test::test_http_too_many_clients
49+
- net::server::test::test_http_slow_client
5050
steps:
5151
## Setup test environment
5252
- name: Setup Test Environment

.github/workflows/stacks-core-tests.yml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,55 +18,6 @@ concurrency:
1818
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1919

2020
jobs:
21-
# Full genesis test with code coverage
22-
full-genesis:
23-
name: Full Genesis Test
24-
runs-on: ubuntu-latest
25-
strategy:
26-
## Continue with the test matrix even if we've had a failure
27-
fail-fast: false
28-
## Run a maximum of 2 concurrent tests from the test matrix
29-
max-parallel: 2
30-
matrix:
31-
test-name:
32-
- neon_integrations::bitcoind_integration_test
33-
steps:
34-
## Setup test environment
35-
- name: Setup Test Environment
36-
id: setup_tests
37-
uses: stacks-network/actions/stacks-core/testenv@main
38-
with:
39-
genesis: true
40-
btc-version: "25.0"
41-
42-
## Run test matrix using restored cache of archive file
43-
## - Test will timeout after env.TEST_TIMEOUT minutes
44-
- name: Run Tests
45-
id: run_tests
46-
timeout-minutes: ${{ fromJSON(env.TEST_TIMEOUT) }}
47-
uses: stacks-network/actions/stacks-core/run-tests@main
48-
with:
49-
test-name: ${{ matrix.test-name }}
50-
threads: 1
51-
archive-file: ~/genesis_archive.tar.zst
52-
53-
## Upload code coverage file
54-
- name: Code Coverage
55-
id: codecov
56-
uses: stacks-network/actions/codecov@main
57-
with:
58-
test-name: large_genesis
59-
filename: ./lcov.info
60-
61-
- name: Status Output
62-
run: |
63-
echo "run_tests: ${{ steps.run_tests.outputs.status }}"
64-
echo "codecov: ${{ steps.codecov.outputs.status }}"
65-
66-
- name: Check Failures
67-
if: steps.run_tests.outputs.status == 'failure' || steps.codecov.outputs.status == 'failure'
68-
run: exit 1
69-
7021
# Unit tests with code coverage
7122
unit-tests:
7223
name: Unit Tests
@@ -186,7 +137,6 @@ jobs:
186137
runs-on: ubuntu-latest
187138
if: always()
188139
needs:
189-
- full-genesis
190140
- open-api-validation
191141
- core-contracts-clarinet-test
192142
steps:

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,62 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
77

88
## [Unreleased]
99

10+
### Added
11+
- Add `tenure_timeout_secs` to the miner for determining when a time-based tenure extend should be attempted.
12+
13+
### Changed
14+
15+
- Nodes will assume that all PoX anchor blocks exist by default, and stall initial block download indefinitely to await their arrival (#5502)
16+
17+
## [3.1.0.0.1]
18+
19+
### Added
20+
21+
- 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))
22+
23+
### Changed
24+
25+
## [3.1.0.0.0]
26+
27+
### Added
28+
29+
- **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)
30+
- New RPC endpoints
31+
- `/v2/clarity/marf/:marf_key_hash`
32+
- `/v2/clarity/metadata/:principal/:contract_name/:clarity_metadata_key`
33+
- 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))
34+
35+
### Changed
36+
37+
## [3.0.0.0.4]
38+
39+
### Added
40+
41+
### Changed
42+
43+
- Use the same burn view loader in both block validation and block processing
44+
45+
## [3.0.0.0.3]
46+
47+
### Added
48+
1049
### Changed
1150
- Add index for StacksBlockId to nakamoto block headers table (improves node performance)
1251
- Remove the panic for reporting DB deadlocks (just error and continue waiting)
1352
- Add index to `metadata_table` in Clarity DB on `blockhash`
1453
- Add `block_commit_delay_ms` to the config file to control the time to wait after seeing a new burn block, before submitting a block commit, to allow time for the first Nakamoto block of the new tenure to be mined, allowing this miner to avoid the need to RBF the block commit.
1554
- Add `tenure_cost_limit_per_block_percentage` to the miner config file to control the percentage remaining tenure cost limit to consume per nakamoto block.
1655
- Add `/v3/blocks/height/:block_height` rpc endpoint
56+
- If the winning miner of a sortition is committed to the wrong parent tenure, the previous miner can immediately tenure extend and continue mining since the winning miner would never be able to propose a valid block. (#5361)
57+
58+
## [3.0.0.0.2]
59+
60+
### Added
61+
62+
### Changed
63+
- Fixes a few bugs in the relayer and networking stack
64+
- detects and deprioritizes unhealthy replicas
65+
- fixes an issue in the p2p stack which was preventing it from caching the reward set.
1766

1867
## [3.0.0.0.1]
1968

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ _Do_ document things that are not clear, e.g.:
579579
Keep in mind that better variable names can reduce the need for comments, e.g.:
580580

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

585585
# Licensing and contributor license agreement

Cargo.lock

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ rand = "0.8"
2121
rand_chacha = "0.3.1"
2222
tikv-jemallocator = "0.5.4"
2323
rusqlite = { version = "0.31.0", features = ["blob", "serde_json", "i128_blob", "bundled", "trace"] }
24-
thiserror = { version = "1.0.65" }
24+
thiserror = "1.0.65"
25+
toml = "0.5.6"
2526

2627
# Use a bit more than default optimization for
2728
# dev builds to speed up test execution

clarity/src/vm/analysis/analysis_db.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ impl<'a> AnalysisDatabase<'a> {
5050
self.begin();
5151
let result = f(self).or_else(|e| {
5252
self.roll_back()
53-
.map_err(|e| CheckErrors::Expects(format!("{e:?}")).into())?;
53+
.map_err(|e| CheckErrors::Expects(format!("{e:?}")))?;
5454
Err(e)
5555
})?;
5656
self.commit()
57-
.map_err(|e| CheckErrors::Expects(format!("{e:?}")).into())?;
57+
.map_err(|e| CheckErrors::Expects(format!("{e:?}")))?;
5858
Ok(result)
5959
}
6060

@@ -130,9 +130,9 @@ impl<'a> AnalysisDatabase<'a> {
130130
.map_err(|_| CheckErrors::Expects("Bad data deserialized from DB".into()))
131131
})
132132
.transpose()?
133-
.and_then(|mut x| {
133+
.map(|mut x| {
134134
x.canonicalize_types(epoch);
135-
Some(x)
135+
x
136136
}))
137137
}
138138

0 commit comments

Comments
 (0)