This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
This file contains 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
gui1117
added
the
A3-in_progress
Pull request is in progress. No review needed at this stage.
label
Dec 10, 2019
…ng-reward-attribution
…ng-reward-attribution
gui1117
force-pushed
the
gui-staking-fix-wrong-reward-attribution
branch
from
December 11, 2019 12:39
d7009f9
to
f2ae420
Compare
gui1117
commented
Dec 11, 2019
@@ -443,8 +447,6 @@ pub fn advance_session() { | |||
} | |||
|
|||
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.
gui1117
added
A0-please_review
Pull request needs code review.
and removed
A3-in_progress
Pull request is in progress. No review needed at this stage.
labels
Dec 11, 2019
…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 |
gavofyork
added
A1-onice
and removed
A0-please_review
Pull request needs code review.
labels
Dec 17, 2019
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
EraStartSessionIndex
which store the session index on which the era start from the current era to the futurest planned.Era information is stored in
ValidatorForEra
andSlotStakeForEra
.