Add new config option, node.mock_mining_output_dir, which causes mock miner to write mock mined blocks to files
Add subcommand to stacks-inspect, stacks-inspect replay-mock-mining, which will read mock mined blocks and validate them against chainstate
PR Status
Added integration test neon_integrations::replay_mock_miner() and it passes. Have not tested against mainnet yet
Should probably add some real transactions to integration test, right now it's only coinbases
Due to refactoring replay_block() for use in mock mining replay, I've re-tested stacks-inspect replay-block and confirmed it still works
Applicable issues
fixes #4986
Additional info (benefits, drawbacks, caveats)
I refactored code used by stacks-inspect replay-block so that could re-use it here
I also refactored and pulled some functions out of stackslib/src/main.rs and into stackslib/src/cli.rs so that they could be called from integration tests
The way stacks-inspect replay-block processes it's arguments has changed slightly, and it no longer automatically adds "mainnet/" (because it now supports testnet/devnet/etc.) into the chainstate path
Checklist
[x] Integration test for stacks-inspect replay-mock-mining
[x] Test stacks-inspect replay-block
[ ] Test stacks-inspect replay-mock-mining with mainnet mock miner and chainstate
[ ] Changelog is updated
[ ] Required documentation changes (e.g., docs/rpc/openapi.yaml and rpc-endpoints.md for v2 endpoints, event-dispatcher.md for new events)
[x] New integration test(s) added to bitcoin-tests.yml
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Description
There are two parts to this PR:
node.mock_mining_output_dir
, which causes mock miner to write mock mined blocks to filesstacks-inspect replay-mock-mining
, which will read mock mined blocks and validate them against chainstatePR Status
Added integration test
neon_integrations::replay_mock_miner()
and it passes. Have not tested against mainnet yetShould probably add some real transactions to integration test, right now it's only coinbases
Due to refactoring
replay_block()
for use in mock mining replay, I've re-testedstacks-inspect replay-block
and confirmed it still worksApplicable issues
Additional info (benefits, drawbacks, caveats)
stacks-inspect replay-block
so that could re-use it herestackslib/src/main.rs
and intostackslib/src/cli.rs
so that they could be called from integration testsstacks-inspect replay-block
processes it's arguments has changed slightly, and it no longer automatically adds "mainnet/" (because it now supports testnet/devnet/etc.) into the chainstate pathChecklist
stacks-inspect replay-mock-mining
stacks-inspect replay-block
stacks-inspect replay-mock-mining
with mainnet mock miner and chainstatedocs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)bitcoin-tests.yml