-
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
introduce flexible cost model decoding #3283
Conversation
4534985
to
5ff2e3e
Compare
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.
The Scripts
module is becoming a big unwieldy and losing cohesion, so maybe if we need to add stuff to CostModel
we can make it a separate module.
Just some other small remarks 👍
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 is really awesome!!!
It is only after going through this PR that I was able to convince myself that this is a really good approach to deal with forward compatibility of CostModels. I could not think of anything that could mess it up. Very nice!
I have a few suggestions, but nothing that would block the PR.
eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/Serialisation/Generators.hs
Outdated
Show resolved
Hide resolved
libs/cardano-ledger-binary/testlib/Test/Cardano/Ledger/Binary/RoundTrip.hs
Outdated
Show resolved
Hide resolved
libs/cardano-ledger-binary/testlib/Test/Cardano/Ledger/Binary/RoundTrip.hs
Outdated
Show resolved
Hide resolved
0152368
to
de24b06
Compare
Starting in version 9, 'CostModels' can now be deserialized from any map from Word8 values to lists of integers. Only valid cost models are actual converted to cost models. resolves #2902
de24b06
to
215d398
Compare
Description
Starting in version 9,
CostModels
can now be deserialized from any map ofWord8
values to lists of integers. Only valid cost models are actually converted to evaluation contexts that can be used. Errors and unrecognized language versions are stored in theCostModels
type so that:resolves #2902
Checklist
fourmolu
(which can be run withscripts/fourmolize.sh