Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

SessionManager::new_session() method #7801

Answered by gui1117
Mr-Leshiy asked this question in Q&A
Discussion options

You must be logged in to vote

The formula doesn't include the Offset information of the periodic session implementation. Formula needs to include it in its general case.
(also formula is only correct for periodic session, if the chain uses Babe to end session then the formula doesn't stand anymore).

Generally speaking SessionManager is used like this:
at the end of session 10: SessionManager::end_session(10) is called, SessionManager::start_session(11) is called, and SessionManager::new_session(12) is called and if it result in a new validator set then it is stored in order to be used at session 12.

But I'm surprised why you need to compute the block number from the session index ? as said previously depending on the S…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Mr-Leshiy
Comment options

Answer selected by Mr-Leshiy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants