You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
session.validators contains the current set of validator validating and producing blocks, session.queued_keys contains the next set.
in on_session_ending in case of a new era, the staking module elect a new set, put this set in staking::CurrentElected and returns it, session module put this new elected set in the queued keys.
But in staking::reward_by_ids we add reward points for a validator in stakig::CurrentElected.
And at the end of the era we reward according to this points the validators contained in staking::CurrentElected. This seems wrong as staking::CurrentElected at this moment contains the validator set for the next era not the current one.
How to fix
same as session, staking should have information for next_session but also for current_session. Maybe storing the staking information for previous elected set so it can reward them correctly.