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

Cooldown changes #1175

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft

Cooldown changes #1175

wants to merge 25 commits into from

Conversation

td202
Copy link
Contributor

@td202 td202 commented May 23, 2024

Purpose

Closes #1142 #1145 #1146 #1147 #1148 #1176 #1177

Implement cooldown changes in the node.

Changes

  • Split getPassiveDelegationStatus out of getPoolStatus so that the execution paths for getPoolInfoV2 and getPassiveDelegationInfoV2 are disentangled.
  • Update account hashing to include the cooldown queue.
  • Update the account structure to include the cooldown queue.
  • Revise the computation of account available amounts (it is now protocol-version specific).
  • Epoch transition handling:
    • bsoProcessPendingChanges is only available before P7 (versions that do not support flexible cooldown).
    • bsoProcessCooldowns removes cooldowns that have expired and then moves pre-cooldowns into cooldown.
    • bsoProcessPrePreCooldowns moves pre-pre-cooldowns into pre-cooldown.
    • Change payday handling so to call bsoProcessCooldowns instead of bsoProcessPendingChanges from P7 (via paydayHandleCooldowns)
    • On snapshot epoch, pending changes are no longer accounted for (from P7) when snapshotting since they will always be NoChange. Instead bsoProcessPrePreCooldowns is called.
    • The NewReleaseSchedule structure is reused to track cooldown expiries.
    • ...

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Protocol Update 7 Test Plan
2 participants