Clear delegation on deregistration #474
Merged
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
Fixes the rewards in epoch 214 (paid in 216) by clearing the delegation of a stake address if it deregisters. We were previously keeping it so it would be restored on re-registration, but this threw out the total active_stake and hence the pool performance calculations by a tiny amount, leading to the 1-LL differences in rewards.
Related Issue(s)
Fixes #414
How was this tested?
Ran Omnibus to epoch 217 - rewards verify for epoch 214
Checklist
Impact / Side effects
Rewards now correct for epoch 216. SPDD will also slightly change which might improve VRF success, but there is still
a difference between Haskell's & our snapshot SPDD and the SPDD we publish.
Reviewer notes / Areas to focus
Won't take long ;-)