-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: prune abandoned state #185
base: main
Are you sure you want to change the base?
Conversation
…e-state # Conflicts: # x/farming/keeper/invariants_test.go # x/farming/keeper/keeper_test.go # x/farming/keeper/reward_test.go # x/farming/keeper/staking_test.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some errors in the current method (if there are multiple stakings for the same staking denom and add staking, withdrawing) I think there will be not enough time to review and correct it in this v1.0.0-rc1 release, so it seems necessary to correct it more meticulously in the next sprint.
…e-state # Conflicts: # x/farming/keeper/staking.go
LGTM, Thank you for fixing logic and adding detailed test code. As a result of internal discussions, we think that the PR is not essential for this release, so we will include it in the next release. |
Description
By introducing reference counting similar to the x/distribution module, we can safely prune abandoned state
like no longer used
HistoricalRewards
,OutstandingRewards
,CurrentEpoch
, ....closes: #142
References
See: F1 Fee Distribution Paper's 3. State Requirements for details about state pruning using reference counting.
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes