fix: vrf big stake error on epoch 214 #476
Merged
+71
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We have rewards all correct up to epoch 215, but there was a error on
vrfvalidation:VrfLeaderValueTooBig.And this is caused by wrong calculation of pool's relative stakes.
The main cause:
We need to apply rewards from previous epoch before we publish
SPDDmessage. (SPDDworks as snapshots onVRFvalidation)Related Issue(s)
Fixes #392
How was this tested?
Manually run
omnibustill epoch 214, and check there is novrfvalidation error.Checklist
Impact / Side effects
No side effects.
Reviewer notes / Areas to focus
accounts_state/src/accounts_state.rsEPOCHrule reference from haskell code:https://github.com/IntersectMBO/cardano-ledger/blob/24ef1741c5e0109e4d73685a24d8e753e225656d/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/NewEpoch.hs#L160