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

Bugfix/nakamoto coordinator reward set prepare phase calcs #4095

Merged

Conversation

jferrant
Copy link
Collaborator

Description

This pulls some bugfixes out of other branches that have discovered them:

  • The first commit was cherry picked from feat/nakamoto-validate-signer
  • The second commit was taken from feat/mockamoto-mining-redux

Fixes

  • off by one bug in find_prepare_phase_sortitions which incorrectly included one BEFORE prepare phase in the list of sortitions
  • off by one bug in get_reward_set_nakamoto which was incorrectly using the current reward cycle rather than the NEXT reward cycle for getting reward addresses. This bug was due to change in assumptions in Nakamoto vs pre-Nakamoto: Nakamoto calculates reward set DURING the prepare phase of the PRIOR reward cycle whereas pre-Nakamoto calculated reward set at the START of the CURRENT reward cycle.

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (252b77f) 0.04% compared to head (1bb5331) 0.04%.
Report is 1 commits behind head on next.

Files Patch % Lines
...ackslib/src/chainstate/nakamoto/coordinator/mod.rs 0.00% 13 Missing ⚠️
stackslib/src/chainstate/stacks/boot/mod.rs 0.00% 12 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             next    #4095   +/-   ##
=======================================
  Coverage    0.04%    0.04%           
=======================================
  Files         419      419           
  Lines      297643   297652    +9     
=======================================
  Hits          136      136           
- Misses     297507   297516    +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@xoloki xoloki left a comment

Choose a reason for hiding this comment

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

LGTM, but I'm not at all familiar with the code that's changed, so someone who is needs to review it before merge

Copy link
Member

@jcnelson jcnelson left a comment

Choose a reason for hiding this comment

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

LGTM!

@jcnelson jcnelson merged commit 636cdea into next Nov 28, 2023
2 checks passed
@blockstack-devops
Copy link
Contributor

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.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants