-
Notifications
You must be signed in to change notification settings - Fork 681
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
fix: 2 blocks dead time between 2.5 -> 3.0 transition #4883
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4883 +/- ##
============================================
+ Coverage 25.92% 81.19% +55.26%
============================================
Files 482 490 +8
Lines 347616 351570 +3954
Branches 0 323 +323
============================================
+ Hits 90134 285460 +195326
+ Misses 257482 66102 -191380
- Partials 0 8 +8
... and 436 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Passing
Maybe almost all miners are doing the first, so the other two don't really matter? Or maybe I just need to explicitly register the VRF pubkey with the Nakamoto miner pubkey hash before Epoch 3.0 EDIT: Added a warning for third case. Second case probably has negligible real-world usage. So I think this is okay as-is |
The tests in testnet/stacks-node/src/tests/nakamoto_integrations.rs are going to need to be updated, as most (all?) of them expect to wait for this key registration. It would be great to also add a case to test for your scenarios 1, 2, and 3 in there. |
Somehow this broke the Nakamoto integration tests. They timing out on
Not sure how these changes broke bitcoin block production, but looking into it now |
@jbencin -- this patch fixed diff --git a/testnet/stacks-node/src/tests/nakamoto_integrations.rs b/testnet/stacks-node/src/tests/nakamoto_integrations.rs
index c630776d5..22cf8cd3c 100644
--- a/testnet/stacks-node/src/tests/nakamoto_integrations.rs
+++ b/testnet/stacks-node/src/tests/nakamoto_integrations.rs
@@ -1133,14 +1133,7 @@ fn simple_neon_integration() {
info!("Nakamoto miner started...");
blind_signer(&naka_conf, &signers, proposals_submitted);
- // first block wakes up the run loop, wait until a key registration has been submitted.
- next_block_and(&mut btc_regtest_controller, 60, || {
- let vrf_count = vrfs_submitted.load(Ordering::SeqCst);
- Ok(vrf_count >= 1)
- })
- .unwrap();
-
- // second block should confirm the VRF register, wait until a block commit is submitted
+ // first block should allow miner to submit a block commit, wait until a block commit is submitted
next_block_and(&mut btc_regtest_controller, 60, || {
let commits_count = commits_submitted.load(Ordering::SeqCst);
Ok(commits_count >= 1) My guess is a similar patch applied to the other tests would fix things with those. |
I've fixed all the integration tests except for |
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.
LGTM!
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.
LGTM!
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
Fix 2 block downtime by passing
LeaderKeyRegistrationState
from Neon runloop to Nakamoto runloopApplicable issues
Additional info (benefits, drawbacks, caveats)
Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml