This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Couldn't load subscription status.
- Fork 2.7k
Fix staking reward issue #4346
Closed
Closed
Fix staking reward issue #4346
Conversation
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
…ng-reward-attribution
…ng-reward-attribution
d7009f9 to
f2ae420
Compare
gui1117
commented
Dec 11, 2019
|
|
||
| pub fn start_session(session_index: SessionIndex) { | ||
| // Compensate for session delay | ||
| let session_index = session_index + 1; |
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.
this is one reason why tests with start_session has been modified, it makes them clearer IMHO, also most tests don't use this but start_era instead.
…ng-reward-attribution
|
The staking/reward/exposure dataset could be huge and complicated. Have you analysed the various complexity here? |
Closed
|
I would prefer this be done in the way I outline in #4407 |
Merged
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.
Fix #4121
Fix #4220
Fix #4331
TODO
DONE
when implementing
OnSessionEnding::on_session_ending, we must end era if the session ending is the last one of the era, this era end will reward validator and clear some storage. but we also potentially plan a new era in the future using the argumentwill_apply_at.This new era planned must freeze the validators information for this future era: validator set, validators exposures, commissions and slot_stake.
This new era in planned with the storage
EraStartSessionIndexwhich store the session index on which the era start from the current era to the futurest planned.Era information is stored in
ValidatorForEraandSlotStakeForEra.