-
Notifications
You must be signed in to change notification settings - Fork 682
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/5642 #5655
base: develop
Are you sure you want to change the base?
Conversation
…ures is mutated over the course of the state machine's lifetime
…s tenure, so check this when inferring IBD
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.
Left some style comments but looks fine to me
…s to net::relay since we need to be able to signal to the relayer to _not_ process Stacks blocks
… instructed not to by fault injection
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.
Just some minor comments for now, but there are conflicts and failing tests.
@@ -618,6 +618,11 @@ impl Signer { | |||
"proposed_block_signer_sighash" => %signer_signature_hash, | |||
"proposed_chain_length" => proposed_block.header.chain_length, | |||
"expected_at_least" => last_block_info.block.header.chain_length + 1, | |||
"last_block_info.block.header.consensus_hash" => %last_block_info.block.header.consensus_hash, | |||
"proposed_block_consensus_hash" => %proposed_block_consensus_hash, |
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 is a duplicate.
@@ -618,6 +618,11 @@ impl Signer { | |||
"proposed_block_signer_sighash" => %signer_signature_hash, | |||
"proposed_chain_length" => proposed_block.header.chain_length, | |||
"expected_at_least" => last_block_info.block.header.chain_length + 1, | |||
"last_block_info.block.header.consensus_hash" => %last_block_info.block.header.consensus_hash, |
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.
The best practice is not to use .
s in these keys because systems like Grafana will replace the .
s with _
s.
@@ -618,6 +618,11 @@ impl Signer { | |||
"proposed_block_signer_sighash" => %signer_signature_hash, | |||
"proposed_chain_length" => proposed_block.header.chain_length, | |||
"expected_at_least" => last_block_info.block.header.chain_length + 1, | |||
"last_block_info.block.header.consensus_hash" => %last_block_info.block.header.consensus_hash, | |||
"proposed_block_consensus_hash" => %proposed_block_consensus_hash, | |||
"last_block_info.state" => %last_block_info.state, |
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.
Same comment about the .
.
This fixes #5642 by adding a dedicated IBD inference rule for Nakamoto. The Stacks node is in IBD mode when either of the following conditions are true:
This (hopefully) fixes some edge cases we've seen on testnet whereby a node can erroneously believe it is not sync'ed when it really is. This had impacted the affected node's ability to participate in StackerDB replication. I intend to test this on naka3.sh, on testnet, and on a single mainnet signer.
Writing the code for that second criterion led to the discoveries of #5649 and #5650, since I had been using
rc_consensus_hash
as the ongoing Stacks tenure when in fact it was not.EDIT: this also contains #5667, so let's merge that first.