substrate
substrate copied to clipboard
Rename Epoch to Session in BABE and throughout any parts in Substrate
This PR renames the term Epoch to Session in BABE and in other parts of Substrate
Resolves Rename Epoch to Session in BABE and throughout any parts in Substrate #11317
Polkadot Address: 12c13TogHWZxH4tqo6RisztQPyPuG2YJMZb9VZRzD9L6iJf3
could skip from epoch 1 to 3, assuming that there were no blocks in epoch 2 (currently we do not recover from empty epochs, but that might change in the future).
If I understand you correctly, you are saying there is currently no difference between epoch and session because we do not recover from an empty epoch, but if we changed that behavior, then these two terms WOULD be different?
Why couldn't we also have an empty session so that the terms are again aligned?
i.e. we could skip from epoch 1 to 3, assuming that there were no blocks in epoch 2 (currently we do not recover from empty epochs, but that might change in the future).
This is some feature that doesn't really exists and that is really a little bit bike-shedding :P
I'm for the renaming to have a coherent naming.
However, as @andresilva already pointed out there are currently a lot of breaking changes that needs to be fixed.
Why couldn't we also have an empty session so that the terms are again aligned?
That's probably reasonable and doable. Like @bkchr said maybe I'm just bike-shedding, we can deal with that whenever it comes.
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
The 'epoch' naming matches the terminology in the paper. I think it makes sense to call it 'epoch' in BABE and say that we use BABE epochs to implement Substrate sessions. They aren't the same thing - session is a broader concept.
The 'epoch' naming matches the terminology in the paper. I think it makes sense to call it 'epoch' in BABE and say that we use BABE epochs to implement Substrate sessions. They aren't the same thing - session is a broader concept.
For sure it matches the terminology in the paper, but it is just confusing to have different terminologies for the same thing. In the docs you can easily mention that "Session are the same as epoch" if you want to read the paper. However, if you read the runtime lib.rs for example you see epoch and session and don't directly know that they are related. IMO it was a huge mistake to ever have introduced these two different namings into the code base.
IMO it was a huge mistake to ever have introduced these two different namings into the code base.
There's no guarantee that these things will be in the same code base in the future. Separating concepts decouples code, combining them (even when they aren't congruent) makes it harder to decouple in the future. You could imagine splitting the BABE logic into its own repo and then it would make more sense; it's always better to write code in a large repo in a more decoupled way.
"This crate implements BABE consensus on top of Substrate's session abstraction"
If it would be done like grandpa, where the core logic is in its own crate, for sure. However, even for the own crate, the integration should then use the common wording of the code base you are integrating too. Otherwise, you can directly give up on common wording.
Is there any update on this? I would like to introduce the proper naming on Sassafras from the beginning
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
Is there any update on this? I would like to introduce the proper naming on Sassafras from the beginning
Please let's stick to session. There can be just one comment that explains that a session corresponds to an epoch in the paper.