-
Notifications
You must be signed in to change notification settings - Fork 667
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
Nakamoto Fixes: IssueBlockCommit and Reward Maturity Lookups #4205
Conversation
use std::collections::VecDeque; | ||
use std::sync::mpsc::Sender; | ||
use std::time::Duration; | ||
|
||
use hashbrown::{HashMap, HashSet}; |
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.
Is there a reason we're still using hashbrown
?
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.
Unclear to me. Maybe open an issue for the signer? This changeline just came from running cargo fmt-stacks
.
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.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## next #4205 +/- ##
==========================================
- Coverage 82.83% 82.63% -0.21%
==========================================
Files 429 429
Lines 302091 302128 +37
==========================================
- Hits 250245 249662 -583
- Misses 51846 52466 +620 ☔ View full report in Codecov by Sentry. |
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'm able to get a deployment running with this PR, but still running into a couple other block processing issues (details shared on Slack).
Description
This fixes two issues surfaced by the interim blocks mining in nakamoto-node.
calculate_matured_miner_rewards
should use thecoinbase_height
, not the block height. This was caught by running a long-running node with interim mining turned on, rather than an integration test. There's no integration test for this new behavior, but there probably should be. The issue surface from a panicking assertion because the 150th Stacks block had a coinbase height < 100, so the maturity lookup returned an empty list, triggering a panic. In testing mode, the maturity height is 2, which means that it would be hard to surface this exact panic in a test.