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

[Bug] Incorrect calculation of rc_consensus_hash leads to nodes not talking to each other via StackerDB #5649

Open
jcnelson opened this issue Jan 3, 2025 · 0 comments
Assignees
Labels
bug Unwanted or unintended property causing functional harm

Comments

@jcnelson
Copy link
Member

jcnelson commented Jan 3, 2025

The value rc_consnsus_hash is intended to capture the ongoing Stacks tenure ID. It gets used to tag StackerDB inventory and chunk messages as originating from a node with a particular StackerDB configuration view.

Unfortunately, rc_consensus_hash is incorrectly calculated in Nakamoto as the ongoing tenure ID at the time of the canonical sortition. So when the p2p thread loads rc_consensus_hash as part of a call to SortitionDB::get_burnchain_view(), it may get an rc_consnsus_hash that corresponds to an arbitrarily old Stacks tenure even if the node has since caught up.

The fix for this is to simply use the tenure ID of the canonical Stacks tip. However, we will need to get at least one mining node and >70% signing nodes to upgrade at the same time to safely deploy the fix.

@jcnelson jcnelson added the bug Unwanted or unintended property causing functional harm label Jan 3, 2025
@jcnelson jcnelson self-assigned this Jan 3, 2025
@github-project-automation github-project-automation bot moved this to Status: 🆕 New in Stacks Core Eng Jan 3, 2025
@jcnelson jcnelson mentioned this issue Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unwanted or unintended property causing functional harm
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

1 participant