This repository was archived by the owner on Jan 22, 2025. It is now read-only.
set epoch reward pda rent epoch to max#35098
Closed
HaoranYi wants to merge 1 commit into
Closed
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #35098 +/- ##
=========================================
- Coverage 81.6% 81.6% -0.1%
=========================================
Files 831 831
Lines 225048 225049 +1
=========================================
- Hits 183735 183715 -20
- Misses 41313 41334 +21 |
Contributor
Contributor
Author
|
close as it is outdated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
We deprecated rent accounts on the network. This means all
new accountsmust be rent exempt. We also activatedset_rent_epoch_maxfeature. One of the implications is that for rent exempt account, itsrent_epochis set tou64::max. However, currently, reward pda accounts are created rent-exempted but its rent_epoch is set 0. We rely on rent_collect to update to u64::max. In future, when we skip rent collect, the new PDA account's rent epoch will not be updated and stuck to zero.To fix this, the pda account can simply be created with
rent_epochto u64::max and don't depend on rent collect to updaterent_epochlater.Summary of Changes
Fixes #