-
Notifications
You must be signed in to change notification settings - Fork 155
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
Improve resilience of future PParams #4433
Conversation
52eae67
to
86ae8a3
Compare
I suppose we don't have this hypothetical problem for Shelley, because there |
If you want to keep the documentation up to date, you could add this to the paragraph explaining the changes at the epoch boundary: |
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.
Looks good to me, just some questions for my own understanding.
86ae8a3
to
322bf0a
Compare
322bf0a
to
9cf6e66
Compare
Ensure that every Conway Epoch begins with a correct prediction for `futurePParams`. The problem that this commit fixes has to do with the fact that `futurePParams` where correctly predicted on the very first `TICK`. However, if there are no blocks prior to point-of-no-return, which can't happen on a normal running chain, there would be no `TICK`, thus there would be no prediction. So, regardless if there was a correct prediciton after the point-of-no-return, `PParamUpdate` would be simply ignored, since `futurePParams` would be already set to `NoPParamUpdate`. Despite the fact that this can't really happen on mainnet, we can fix this quite easily by predicting `futurePParams` during DRepPulser initialization, which is exactly what being imlemented in this commit.
9cf6e66
to
b7b9e8d
Compare
Description
This PR adds a test for
futurePParams
prediction and fixes a problem where it would not work correctly when there was noTICK
s before the point of no return (first 4k/f slots)This isn't really a problem in practice, because of this property that Sam pointed out:
But it is nice to fix it regardless, because it simplifies the
futurePParams
state transition a bitChecklist
.cabal
andCHANGELOG.md
files according to theversioning process.
.cabal
files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)CHANGELOG.md
for the affected packages. New section is never added with the code changes. (See RELEASING.md)fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)