farming
farming copied to clipboard
feat: prune abandoned state
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.
- [x] Appropriate labels applied
- [x] Targeted PR against correct branch
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the module structure standards.
- [x] Wrote unit and integration
- [x] Updated relevant documentation (
docs/
) or specification (x/<module>/spec/
) - [x] Added relevant
godoc
comments. - [x] Re-reviewed
Files changed
in the Github PR explorer - [x] Review
Codecov Report
in the comment section below once CI passes
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.