-
Notifications
You must be signed in to change notification settings - Fork 158
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
Added EraGen instance for Alonzo #2263
Conversation
shelley/chain-and-ledger/executable-spec/src/Cardano/Ledger/Shelley.hs
Outdated
Show resolved
Hide resolved
690562e
to
df9e1af
Compare
b1789bd
to
e00216f
Compare
This PR touches a lot of files, but the vast majority are only changing the types of functions that were over constrained to Shelley-like Eras. It adds instances so the Alonzo Era can now run the property tests. It added a bunch of missing PrettyA instances. |
...ain-and-ledger/shelley-spec-ledger-test/src/Test/Shelley/Spec/Ledger/Generator/Delegation.hs
Show resolved
Hide resolved
98d2e02
to
704d8db
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.
this is a mistake
...in-and-ledger/shelley-spec-ledger-test/src/Test/Shelley/Spec/Ledger/Generator/Trace/Chain.hs
Show resolved
Hide resolved
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.
Thank you @TimSheard for taking on this huge and unpleasant task!
d9fdf4d
to
dcac17e
Compare
1035d21
to
dadd59f
Compare
@@ -185,7 +185,7 @@ data UtxoPredicateFailure era | |||
| TriesToForgeADA | |||
| -- | list of supplied bad transaction outputs | |||
OutputTooBigUTxO | |||
![Core.TxOut era] | |||
![(Int, Int, Core.TxOut era)] |
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.
Should label in haddock what these parameters mean
Introduce the class (EraGen era) which provides Era specific code such that modules like ClassifyTraces and TestChain work over the Core.XXX type families. The EraGen class has a bunch of super classes which every instance should meet. Added instances for Shelley, Allegra, Mary Alonzo, and Example. Renamed the files which make EraGen instances to XXXEraGen, so naming is consistent. Made a better someLeaf function for Alonzo era Made sure the PParams costModel can't not be empty. It must have entry for PlutusV1. Made sure that the _d PParam cannot be 0 in Alonzo (leads to deadlock) Still to do, add better Shrinkers (can we add EraGen parametric ones?)
d4bc813
to
a555605
Compare
Aded an EraGen instance for Alonzo in the Tests: Test.Cardano.Ledger.Alonzo.EraGenInstance
I had to generalize the EraGen class slightly to make an Alonzo instance adding the method genEraPParamsDelta
because the type family PParamsDelta is different in Alonzo than in earlier Eras.
I had to export a few functions in a few files where they were no exported before, because they were needed in the Alonzo instance. Made few other small changes to a number of files.