Skip to content

Commit e16070d

Browse files
committed
Merge branch 'develop' into fix/5642
2 parents bad7699 + 91a1398 commit e16070d

File tree

377 files changed

+16763
-13154
lines changed

Some content is hidden

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

377 files changed

+16763
-13154
lines changed

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[alias]
22
stacks-node = "run --package stacks-node --"
33
fmt-stacks = "fmt -- --config group_imports=StdExternalCrate,imports_granularity=Module"
4+
clippy-stacks = "clippy -p libstackerdb -p stacks-signer -p pox-locking -p clarity -p libsigner -p stacks-common --no-deps --tests --all-features -- -D warnings"
45

56
# Uncomment to improve performance slightly, at the cost of portability
67
# * Note that native binaries may not run on CPUs that are different from the build machine

.github/workflows/bitcoin-tests.yml

Lines changed: 94 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,34 @@ concurrency:
1818
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1919

2020
jobs:
21+
generate-tests:
22+
name: Generate JSON of tests to run
23+
runs-on: ubuntu-latest
24+
outputs:
25+
matrix: ${{ steps.set-matrix.outputs.matrix }}
26+
steps:
27+
## Setup test environment
28+
- name: Setup Test Environment
29+
id: setup_tests
30+
uses: stacks-network/actions/stacks-core/testenv@main
31+
with:
32+
btc-version: "25.0"
33+
- name: Generate tests JSON
34+
id: generate_tests_json
35+
# List all of the tests using the nextest archive (so we don't need to do another build task)
36+
# Filter them such that we only select tests from `--bin stacks-node` which are marked `ignored`
37+
# Transform the output JSON into something that can be used as the matrix input
38+
run: |
39+
cargo nextest list --archive-file ~/test_archive.tar.zst -Tjson | \
40+
jq -c '.["rust-suites"]["stacks-node::bin/stacks-node"]["testcases"] | map_values(select(.["ignored"] == true)) | keys' > ./tests.json
41+
- id: set-matrix
42+
run: |
43+
json_obj=`cat ./tests.json`
44+
echo "matrix=$json_obj" >> $GITHUB_OUTPUT
45+
2146
# Bitcoin integration tests with code coverage
2247
integration-tests:
48+
needs: generate-tests
2349
name: Integration Tests
2450
runs-on: ubuntu-latest
2551
strategy:
@@ -28,141 +54,76 @@ jobs:
2854
## Run a maximum of 32 concurrent tests from the test matrix
2955
max-parallel: 32
3056
matrix:
31-
test-name:
32-
- tests::bitcoin_regtest::bitcoind_integration_test
33-
- tests::integrations::integration_test_get_info
34-
- tests::neon_integrations::antientropy_integration_test
35-
- tests::neon_integrations::bitcoind_forking_test
36-
- tests::neon_integrations::bitcoind_integration_test
37-
- tests::neon_integrations::block_large_tx_integration_test
38-
- tests::neon_integrations::block_limit_hit_integration_test
39-
- tests::neon_integrations::cost_voting_integration
40-
- tests::neon_integrations::filter_long_runtime_tx_integration_test
41-
- tests::neon_integrations::filter_low_fee_tx_integration_test
42-
- tests::neon_integrations::fuzzed_median_fee_rate_estimation_test_window10
43-
- tests::neon_integrations::fuzzed_median_fee_rate_estimation_test_window5
44-
- tests::neon_integrations::liquid_ustx_integration
57+
test-name: ${{fromJson(needs.generate-tests.outputs.matrix)}}
58+
exclude:
59+
# The following tests are excluded from CI runs. Some of these may be
60+
# worth investigating adding back into the CI
61+
- test-name: tests::bitcoin_regtest::bitcoind_integration_test_segwit
62+
- test-name: tests::nakamoto_integrations::consensus_hash_event_dispatcher
63+
- test-name: tests::neon_integrations::atlas_integration_test
64+
- test-name: tests::neon_integrations::atlas_stress_integration_test
65+
- test-name: tests::neon_integrations::bitcoind_resubmission_test
66+
- test-name: tests::neon_integrations::block_replay_integration_test
67+
- test-name: tests::neon_integrations::deep_contract
68+
- test-name: tests::neon_integrations::filter_txs_by_origin
69+
- test-name: tests::neon_integrations::filter_txs_by_type
70+
- test-name: tests::neon_integrations::lockup_integration
71+
- test-name: tests::neon_integrations::most_recent_utxo_integration_test
72+
- test-name: tests::neon_integrations::run_with_custom_wallet
73+
- test-name: tests::neon_integrations::test_competing_miners_build_anchor_blocks_and_microblocks_on_same_chain
74+
- test-name: tests::neon_integrations::test_competing_miners_build_anchor_blocks_on_same_chain_without_rbf
75+
- test-name: tests::neon_integrations::test_one_miner_build_anchor_blocks_on_same_chain_without_rbf
76+
- test-name: tests::signer::v0::tenure_extend_after_2_bad_commits
77+
- test-name: tests::stackerdb::test_stackerdb_event_observer
78+
- test-name: tests::stackerdb::test_stackerdb_load_store
4579
# Microblock tests that are no longer needed on every CI run
4680
# (microblocks are unsupported starting in Epoch 2.5)
47-
# - tests::neon_integrations::bad_microblock_pubkey
48-
# - tests::neon_integrations::microblock_fork_poison_integration_test
49-
# - tests::neon_integrations::microblock_integration_test
50-
# - tests::neon_integrations::microblock_limit_hit_integration_test
51-
# - tests::neon_integrations::test_problematic_microblocks_are_not_mined
52-
# - tests::neon_integrations::test_problematic_microblocks_are_not_relayed_or_stored
53-
# - tests::neon_integrations::size_overflow_unconfirmed_invalid_stream_microblocks_integration_test
54-
# - tests::neon_integrations::size_overflow_unconfirmed_microblocks_integration_test
55-
# - tests::neon_integrations::size_overflow_unconfirmed_stream_microblocks_integration_test
56-
# - tests::neon_integrations::runtime_overflow_unconfirmed_microblocks_integration_test
57-
# Disable this flaky test. Microblocks are no longer supported anyways.
58-
# - tests::neon_integrations::microblock_large_tx_integration_test_FLAKY
59-
- tests::neon_integrations::miner_submit_twice
60-
- tests::neon_integrations::mining_events_integration_test
61-
- tests::neon_integrations::pox_integration_test
62-
- tests::neon_integrations::push_boot_receipts
63-
- tests::neon_integrations::should_fix_2771
64-
- tests::neon_integrations::size_check_integration_test
65-
- tests::neon_integrations::stx_delegate_btc_integration_test
66-
- tests::neon_integrations::stx_transfer_btc_integration_test
67-
- tests::neon_integrations::stack_stx_burn_op_test
68-
- tests::neon_integrations::test_chainwork_first_intervals
69-
- tests::neon_integrations::test_chainwork_partial_interval
70-
- tests::neon_integrations::test_flash_block_skip_tenure
71-
- tests::neon_integrations::test_problematic_blocks_are_not_mined
72-
- tests::neon_integrations::test_problematic_blocks_are_not_relayed_or_stored
73-
- tests::neon_integrations::test_problematic_txs_are_not_stored
74-
- tests::neon_integrations::use_latest_tip_integration_test
75-
- tests::neon_integrations::confirm_unparsed_ongoing_ops
76-
- tests::neon_integrations::min_txs
77-
- tests::neon_integrations::vote_for_aggregate_key_burn_op_test
78-
- tests::neon_integrations::mock_miner_replay
79-
- tests::neon_integrations::listunspent_max_utxos
80-
- tests::neon_integrations::bitcoin_reorg_flap
81-
- tests::neon_integrations::bitcoin_reorg_flap_with_follower
82-
- tests::neon_integrations::start_stop_bitcoind
83-
- tests::epoch_25::microblocks_disabled
84-
- tests::should_succeed_handling_malformed_and_valid_txs
85-
- tests::nakamoto_integrations::simple_neon_integration
86-
- tests::nakamoto_integrations::flash_blocks_on_epoch_3
87-
- tests::nakamoto_integrations::mine_multiple_per_tenure_integration
88-
- tests::nakamoto_integrations::block_proposal_api_endpoint
89-
- tests::nakamoto_integrations::miner_writes_proposed_block_to_stackerdb
90-
- tests::nakamoto_integrations::correct_burn_outs
91-
- tests::nakamoto_integrations::vote_for_aggregate_key_burn_op
92-
- tests::nakamoto_integrations::follower_bootup_simple
93-
- tests::nakamoto_integrations::follower_bootup_custom_chain_id
94-
- tests::nakamoto_integrations::forked_tenure_is_ignored
95-
- tests::nakamoto_integrations::nakamoto_attempt_time
96-
- tests::nakamoto_integrations::skip_mining_long_tx
97-
- tests::signer::v0::block_proposal_rejection
98-
- tests::signer::v0::miner_gather_signatures
99-
- tests::signer::v0::end_of_tenure
100-
- tests::signer::v0::forked_tenure_okay
101-
- tests::signer::v0::forked_tenure_invalid
102-
- tests::signer::v0::empty_sortition
103-
- tests::signer::v0::empty_sortition_before_approval
104-
- tests::signer::v0::empty_sortition_before_proposal
105-
- tests::signer::v0::bitcoind_forking_test
106-
- tests::signer::v0::multiple_miners
107-
- tests::signer::v0::mock_sign_epoch_25
108-
- tests::signer::v0::multiple_miners_mock_sign_epoch_25
109-
- tests::signer::v0::miner_forking
110-
- tests::signer::v0::reloads_signer_set_in
111-
- tests::signer::v0::signers_broadcast_signed_blocks
112-
- tests::signer::v0::min_gap_between_blocks
113-
- tests::signer::v0::duplicate_signers
114-
- tests::signer::v0::retry_on_rejection
115-
- tests::signer::v0::locally_accepted_blocks_overriden_by_global_rejection
116-
- tests::signer::v0::locally_rejected_blocks_overriden_by_global_acceptance
117-
- tests::signer::v0::reorg_locally_accepted_blocks_across_tenures_succeeds
118-
- tests::signer::v0::reorg_locally_accepted_blocks_across_tenures_fails
119-
- tests::signer::v0::miner_recovers_when_broadcast_block_delay_across_tenures_occurs
120-
- tests::signer::v0::multiple_miners_with_nakamoto_blocks
121-
- tests::signer::v0::partial_tenure_fork
122-
- tests::signer::v0::mine_2_nakamoto_reward_cycles
123-
- tests::signer::v0::signer_set_rollover
124-
- tests::signer::v0::signing_in_0th_tenure_of_reward_cycle
125-
- tests::signer::v0::continue_after_tenure_extend
126-
- tests::signer::v0::tenure_extend_after_idle_signers
127-
- tests::signer::v0::tenure_extend_after_idle_miner
128-
- tests::signer::v0::tenure_extend_succeeds_after_rejected_attempt
129-
- tests::signer::v0::stx_transfers_dont_effect_idle_timeout
130-
- tests::signer::v0::idle_tenure_extend_active_mining
131-
- tests::signer::v0::multiple_miners_with_custom_chain_id
132-
- tests::signer::v0::block_commit_delay
133-
- tests::signer::v0::continue_after_fast_block_no_sortition
134-
- tests::signer::v0::block_validation_response_timeout
135-
- tests::signer::v0::tenure_extend_after_bad_commit
136-
- tests::signer::v0::block_proposal_max_age_rejections
137-
- tests::signer::v0::global_acceptance_depends_on_block_announcement
138-
- tests::signer::v0::no_reorg_due_to_successive_block_validation_ok
139-
- tests::nakamoto_integrations::burn_ops_integration_test
140-
- tests::nakamoto_integrations::check_block_heights
141-
- tests::nakamoto_integrations::clarity_burn_state
142-
- tests::nakamoto_integrations::check_block_times
143-
- tests::nakamoto_integrations::check_block_info
144-
- tests::nakamoto_integrations::check_block_info_rewards
145-
- tests::nakamoto_integrations::continue_tenure_extend
146-
- tests::nakamoto_integrations::mock_mining
147-
- tests::nakamoto_integrations::multiple_miners
148-
- tests::nakamoto_integrations::follower_bootup_across_multiple_cycles
149-
- tests::nakamoto_integrations::nakamoto_lockup_events
150-
- tests::nakamoto_integrations::utxo_check_on_startup_panic
151-
- tests::nakamoto_integrations::utxo_check_on_startup_recover
152-
- tests::nakamoto_integrations::v3_signer_api_endpoint
153-
- tests::nakamoto_integrations::test_shadow_recovery
154-
- tests::nakamoto_integrations::signer_chainstate
155-
- tests::nakamoto_integrations::sip029_coinbase_change
156-
- tests::nakamoto_integrations::clarity_cost_spend_down
157-
- tests::nakamoto_integrations::v3_blockbyheight_api_endpoint
158-
# TODO: enable these once v1 signer is supported by a new nakamoto epoch
159-
# - tests::signer::v1::dkg
160-
# - tests::signer::v1::sign_request_rejected
161-
# - tests::signer::v1::filter_bad_transactions
162-
# - tests::signer::v1::delayed_dkg
163-
# - tests::signer::v1::mine_2_nakamoto_reward_cycles
164-
# - tests::signer::v1::sign_after_signer_reboot
165-
# - tests::signer::v1::block_proposal
81+
- test-name: tests::neon_integrations::bad_microblock_pubkey
82+
- test-name: tests::neon_integrations::microblock_fork_poison_integration_test
83+
- test-name: tests::neon_integrations::microblock_integration_test
84+
- test-name: tests::neon_integrations::microblock_large_tx_integration_test_FLAKY
85+
- test-name: tests::neon_integrations::microblock_limit_hit_integration_test
86+
- test-name: tests::neon_integrations::microblock_miner_multiple_attempts
87+
- test-name: tests::neon_integrations::test_problematic_microblocks_are_not_mined
88+
- test-name: tests::neon_integrations::test_problematic_microblocks_are_not_relayed_or_stored
89+
- test-name: tests::neon_integrations::runtime_overflow_unconfirmed_microblocks_integration_test
90+
- test-name: tests::neon_integrations::size_overflow_unconfirmed_invalid_stream_microblocks_integration_test
91+
- test-name: tests::neon_integrations::size_overflow_unconfirmed_microblocks_integration_test
92+
- test-name: tests::neon_integrations::size_overflow_unconfirmed_stream_microblocks_integration_test
93+
- test-name: tests::epoch_25::microblocks_disabled
94+
# Epoch tests are covered by the epoch-tests CI workflow, and don't need to run
95+
# on every PR (for older epochs)
96+
- test-name: tests::epoch_205::bigger_microblock_streams_in_2_05
97+
- test-name: tests::epoch_205::test_cost_limit_switch_version205
98+
- test-name: tests::epoch_205::test_dynamic_db_method_costs
99+
- test-name: tests::epoch_205::test_exact_block_costs
100+
- test-name: tests::epoch_205::transition_empty_blocks
101+
- test-name: tests::epoch_21::test_pox_missing_five_anchor_blocks
102+
- test-name: tests::epoch_21::test_pox_reorg_flap_duel
103+
- test-name: tests::epoch_21::test_pox_reorg_flap_reward_cycles
104+
- test-name: tests::epoch_21::test_pox_reorg_one_flap
105+
- test-name: tests::epoch_21::test_pox_reorgs_three_flaps
106+
- test-name: tests::epoch_21::test_sortition_divergence_pre_21
107+
- test-name: tests::epoch_21::test_v1_unlock_height_with_current_stackers
108+
- test-name: tests::epoch_21::test_v1_unlock_height_with_delay_and_current_stackers
109+
- test-name: tests::epoch_21::trait_invocation_cross_epoch
110+
- test-name: tests::epoch_21::transition_adds_burn_block_height
111+
- test-name: tests::epoch_21::transition_adds_get_pox_addr_recipients
112+
- test-name: tests::epoch_21::transition_adds_mining_from_segwit
113+
- test-name: tests::epoch_21::transition_adds_pay_to_alt_recipient_contract
114+
- test-name: tests::epoch_21::transition_adds_pay_to_alt_recipient_principal
115+
- test-name: tests::epoch_21::transition_empty_blocks
116+
- test-name: tests::epoch_21::transition_fixes_bitcoin_rigidity
117+
- test-name: tests::epoch_21::transition_removes_pox_sunset
118+
- test-name: tests::epoch_22::disable_pox
119+
- test-name: tests::epoch_22::pox_2_unlock_all
120+
- test-name: tests::epoch_22::test_pox_reorg_one_flap
121+
- test-name: tests::epoch_23::trait_invocation_behavior
122+
- test-name: tests::epoch_24::fix_to_pox_contract
123+
- test-name: tests::epoch_24::verify_auto_unlock_behavior
124+
# Disable this flaky test. We don't need continue testing Epoch 2 -> 3 transition
125+
- test-name: tests::nakamoto_integrations::flash_blocks_on_epoch_3_FLAKY
126+
166127
steps:
167128
## Setup test environment
168129
- name: Setup Test Environment

.github/workflows/ci.yml

Lines changed: 35 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,10 @@ jobs:
112112
## - commit to either (development, master) branch
113113
create-cache:
114114
if: |
115-
needs.check-release.outputs.is_release == 'true' || (
116-
github.event_name == 'workflow_dispatch' ||
117-
github.event_name == 'pull_request' ||
118-
github.event_name == 'merge_group' ||
119-
(
120-
contains('
121-
refs/heads/master
122-
refs/heads/develop
123-
refs/heads/next
124-
', github.event.pull_request.head.ref) &&
125-
github.event_name == 'push'
126-
)
127-
)
115+
needs.check-release.outputs.is_release == 'true' ||
116+
github.event_name == 'workflow_dispatch' ||
117+
github.event_name == 'pull_request' ||
118+
github.event_name == 'merge_group'
128119
name: Create Test Cache
129120
needs:
130121
- rustfmt
@@ -144,64 +135,55 @@ jobs:
144135
## - commit to either (development, next, master) branch
145136
stacks-core-tests:
146137
if: |
147-
needs.check-release.outputs.is_release == 'true' || (
148-
github.event_name == 'workflow_dispatch' ||
149-
github.event_name == 'pull_request' ||
150-
github.event_name == 'merge_group' ||
151-
(
152-
contains('
153-
refs/heads/master
154-
refs/heads/develop
155-
refs/heads/next
156-
', github.event.pull_request.head.ref) &&
157-
github.event_name == 'push'
158-
)
159-
)
138+
github.event_name == 'workflow_dispatch' ||
139+
github.event_name == 'pull_request' ||
140+
github.event_name == 'merge_group'
160141
name: Stacks Core Tests
161142
needs:
162143
- rustfmt
163144
- create-cache
164145
- check-release
165146
uses: ./.github/workflows/stacks-core-tests.yml
166147

148+
## Checks to run on built binaries
149+
##
150+
## Runs when:
151+
## - it is a release run
152+
## or:
153+
## - it is not a release run
154+
## and any of:
155+
## - this workflow is called manually
156+
## - PR is opened
157+
## - PR added to merge queue
158+
## - commit to either (development, next, master) branch
159+
stacks-core-build-tests:
160+
if: |
161+
github.event_name == 'workflow_dispatch' ||
162+
github.event_name == 'pull_request' ||
163+
github.event_name == 'merge_group'
164+
name: Stacks Core Build Tests
165+
needs:
166+
- rustfmt
167+
- check-release
168+
uses: ./.github/workflows/core-build-tests.yml
169+
167170
bitcoin-tests:
168171
if: |
169-
needs.check-release.outputs.is_release == 'true' || (
170-
github.event_name == 'workflow_dispatch' ||
171-
github.event_name == 'pull_request' ||
172-
github.event_name == 'merge_group' ||
173-
(
174-
contains('
175-
refs/heads/master
176-
refs/heads/develop
177-
refs/heads/next
178-
', github.event.pull_request.head.ref) &&
179-
github.event_name == 'push'
180-
)
181-
)
172+
github.event_name == 'workflow_dispatch' ||
173+
github.event_name == 'pull_request' ||
174+
github.event_name == 'merge_group'
182175
name: Bitcoin Tests
183176
needs:
184177
- rustfmt
185178
- create-cache
186179
- check-release
187180
uses: ./.github/workflows/bitcoin-tests.yml
188181

189-
190182
p2p-tests:
191183
if: |
192-
needs.check-release.outputs.is_release == 'true' || (
193-
github.event_name == 'workflow_dispatch' ||
194-
github.event_name == 'pull_request' ||
195-
github.event_name == 'merge_group' ||
196-
(
197-
contains('
198-
refs/heads/master
199-
refs/heads/develop
200-
refs/heads/next
201-
', github.event.pull_request.head.ref) &&
202-
github.event_name == 'push'
203-
)
204-
)
184+
github.event_name == 'workflow_dispatch' ||
185+
github.event_name == 'pull_request' ||
186+
github.event_name == 'merge_group'
205187
name: P2P Tests
206188
needs:
207189
- rustfmt

0 commit comments

Comments
 (0)