-
Notifications
You must be signed in to change notification settings - Fork 696
test: add disallow_reorg_within_first_proposal_burn_block_timing_secs_but_more_than_one_block_scenario #6039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
test: add disallow_reorg_within_first_proposal_burn_block_timing_secs_but_more_than_one_block_scenario #6039
Conversation
impl Command<SignerTestState, SignerTestContext> for SendAndMineTransferTx { | ||
fn check(&self, _state: &SignerTestState) -> bool { | ||
info!("Checking: SendAndMineTransferTx"); | ||
true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this command always run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need some advice from stacks-core integration testing ninjas to set this check
up properly 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great first step! Left a couple suggestions. Keep it up 🚀
@orsissimo Just saw the latest commit. I’ll be able to review the new command later today. The first thing that comes to mind: can you please run |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great progress! Left some more comments 🚀
…ore_than_one_block_scenario() and new madhouse commands Commands added: SendAndMineTransferTx BuildNextBitcoinBlock WaitForAndVerifyBlockRejection VerifyMiner1BlockCount
645731b
to
150c833
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6039 +/- ##
===========================================
+ Coverage 83.39% 83.72% +0.33%
===========================================
Files 538 538
Lines 387714 387932 +218
Branches 323 323
===========================================
+ Hits 323321 324799 +1478
+ Misses 64385 63125 -1260
Partials 8 8
... and 45 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I left some more comments/general suggestions. After they are addressed, I believe we are ready to take the PR out from draft. 🎸
pub struct VerifyMiner1BlockCount { | ||
miners: Arc<Mutex<MultipleMinerTest>>, | ||
expected_count: usize, | ||
expected_block_count: usize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid this field that can affect the assertion, an idea off the top of my head would be to separate blocks_mined
state field into two, one for each miner, or even a map with n keys for n miners. From there, the total could be calculated as:
let total_mined_blocks_count = blocks_mined_per_miner.values().fold(0, |acc, &count| acc + count);
By doing this, you can retrieve the miner 1 blocks directly in this command, and use it inside the assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right! I love this approach!
This way we also keep track if each miner's activity
@@ -41,6 +41,21 @@ impl SignerTestContext { | |||
miners: Arc::new(Mutex::new(miners)), | |||
} | |||
} | |||
|
|||
pub fn get_miner_skip_commit_flag( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
This PR adds a new
SendAndMineTransferTx
command to the signer test harness in madhouse/scenario style as continuation of #6007.