Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babe: clarify UnexpectedEpochChange #2815

Closed
liuchengxu opened this issue Dec 27, 2023 · 3 comments
Closed

babe: clarify UnexpectedEpochChange #2815

liuchengxu opened this issue Dec 27, 2023 · 3 comments

Comments

@liuchengxu
Copy link
Contributor

liuchengxu commented Dec 27, 2023

If I'm not wrong, the infamous unexpected epoch change error so far was all caused by having no blocks produced within a babe session, which is no longer an issue since paritytech/substrate#11727. Is it okay to remove it from now on? Or is there any other exception that may run into this error? cc @andresilva

return Err(ConsensusError::ClientImport(
babe_err(Error::<Block>::UnexpectedEpochChange).into(),
)),

@davxy
Copy link
Member

davxy commented Dec 27, 2023

The error is returned if we find an epoch change digest entry in the header when it is not expected to be present (e.g. in the mid of the epoch). Thus the error is not really related to the problem solved by paritytech/substrate#11727

Feel free to re-open if this doesn't answer to your question

@davxy davxy closed this as completed Dec 27, 2023
@liuchengxu
Copy link
Contributor Author

liuchengxu commented Dec 27, 2023

That makes sense to me. I hardly agree it's unrelated though, having no blocks produced in a whole session could be a special case of this branch from what I see.

We recently encountered the unexpected epoch change problem on a live network due to no one being able to produce any blocks in a session, the chain was then bricked. It was using an older version of substrate that didn't include patch 11727, and the time warp hack didn't work out, so I resorted to 11727 with this error temporarily disabled. The chain is now revived, I'm asking as I'm not sure we could disable it permanently. Now I think we should get it back. Let me know if you have any advices for our situation and thank you for the answer! @davxy

@andresilva
Copy link
Contributor

If you change the epoch duration by a runtime upgrade (which isn't supported) you will also get an unexpected epoch change error because the client-side will be using the original epoch duration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants