-
Notifications
You must be signed in to change notification settings - Fork 549
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
Configure chain quality grace period for berkeley release #14776
Configure chain quality grace period for berkeley release #14776
Conversation
!ci-build-me |
!ci-build-me |
!ci-build-me |
!ci-build-me |
!ci-build-me |
39365f0
to
c28f5b2
Compare
!ci-build-me |
@nholland94 That new If 2 mina/src/lib/mina_base/protocol_constants_checked.ml Lines 69 to 76 in d6cc26f
|
@sebastiencs That's a mistake, thanks for catching it! The |
This PR configures berkeley's grace period to 4.5 days, and ensures that the grace period works in hard forks.
The original code was hard coding the grace period in terms of a number of days, which would make the grace period unsafe under some network configurations. I exposed the grace period constant as a configuration in terms of slots, and ensured that the grace period end is accounting for enough slots in order to have a fresh sub window samples of the chain density. I also assert that the specified grace period is safe.
I also fixed a bug in the grace period logic where we weren't accounting for hard forks correctly. We were comparing the global slot since hard fork against a global slot since genesis when testing for the grace period. I fixed this and improved the types to add clarity.
I've confirmed the behavior manually by running a local network with 1/3rd of the stake online. The grace period end was computed as expected and the density only dropped after it was expected to.