-
Notifications
You must be signed in to change notification settings - Fork 23
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
638-Allow next leadership-schedule at 4k/f #639
638-Allow next leadership-schedule at 4k/f #639
Conversation
-- Why? Because the stake distribution is stable at this point. | ||
-- k is the security parameter | ||
-- f is the active slot coefficient | ||
let stabilityWindowR :: Rational | ||
stabilityWindowR = fromIntegral (3 * sgSecurityParam sGen) / Ledger.unboundRational (sgActiveSlotsCoeff sGen) | ||
stabilityWindowR = fromIntegral (4 * sgSecurityParam sGen) / Ledger.unboundRational (sgActiveSlotsCoeff sGen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break in Babbage, which is still used for example in cardano-testnet. You need to check which era you're in, using sbe
. For example
let leaderScheduleWindowConst = caseShelleyToBabbageOrConwayEraOnwards (const 3) (const 4) sbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
Reference for |
7aa8b65
to
57a6ab8
Compare
@AndrewWestberg can you reformat your changes with:
|
57a6ab8
to
88dfc1a
Compare
This is completed. |
@AndrewWestberg can you include a comment pointing to this and any other background regarding the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - just one comment that needs to be addressed
88dfc1a
to
7bdd33d
Compare
This is resolved. |
Changelog
Context
Fixes 638
How to trust this PR
It's a 1 number change from 3->4. It's trustworthy.
Checklist