Skip to content
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

Open
wants to merge 34 commits into
base: develop
Choose a base branch
from
Open

Fix/5642 #5655

wants to merge 34 commits into from

Conversation

jcnelson
Copy link
Member

@jcnelson jcnelson commented Jan 4, 2025

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:

  • The sortition height is less than the Bitcoin block height
  • The highest available tenure (as determined by the Nakamoto block downloader) is higher than the ongoing Stacks tenure

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.

@jcnelson jcnelson requested a review from a team as a code owner January 4, 2025 05:38
obycode
obycode previously approved these changes Jan 6, 2025
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

jbencin
jbencin previously approved these changes Jan 6, 2025
Copy link
Contributor

@jbencin jbencin left a 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

@aldur aldur added this to the 3.1.0.0.3 milestone Jan 7, 2025
@jcnelson jcnelson dismissed stale reviews from jbencin and obycode via bdc6b82 January 7, 2025 22:23
@jcnelson jcnelson requested a review from a team as a code owner January 7, 2025 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Status: In Review
Development

Successfully merging this pull request may close these issues.

4 participants