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
Save the DRep Pulser State after computing it #1687
Save the DRep Pulser State after computing it #1687
Conversation
a76f021
to
b04a0eb
Compare
-- of the cardano-ledger/ouroboros-consensus public APIs, because ledger state is not | ||
-- designed to be updated this way. We are only replaying the chain, so this should be | ||
-- safe. | ||
class HasNewEpochState era where |
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.
That's a very useful class to have, which can be reused for https://github.com/orgs/IntersectMBO/projects/8/views/3?pane=issue&itemId=60533809
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.
Great work!
Good to merge when it's tested on preprod or preview.
It can't be tested in preprod or preview right? Also, I forgot to update the comment, I have done some basic manual testing in sanchonet |
b04a0eb
to
e3f5cc2
Compare
Right, it would only work on sanchonet after rebasing to master |
Yes, this is how I was able to test it on sanchonet. I applied my changes on top of |
772c054
to
ecdbe06
Compare
This class can be used to get/update the underlying extended ledger state
Before retrieving the DRep pulsing state, force its evaluation, then save it to the ledger state. This will prevent us from unnecessarily recalculating it.
ecdbe06
to
e1f7472
Compare
Description
Fixes #1599. The bulk of this work is done in the
HasNewEpochState
typeclass, which allows us to update the ledger state inExtLedgerState
.Checklist
fourmolu
on version 0.10.1.0 (which can be run withscripts/fourmolize.sh
)Migrations
If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.