Skip to content
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

Merged
merged 2 commits into from
May 11, 2021
Merged

Added EraGen instance for Alonzo #2263

merged 2 commits into from
May 11, 2021

Conversation

TimSheard
Copy link
Contributor

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.

@TimSheard
Copy link
Contributor Author

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.

Copy link
Contributor Author

@TimSheard TimSheard left a 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

Copy link
Contributor

@JaredCorduan JaredCorduan left a 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!

@TimSheard TimSheard force-pushed the ts-EraGen-alonzo branch 2 times, most recently from d9fdf4d to dcac17e Compare May 10, 2021 14:55
@redxaxder redxaxder force-pushed the ts-EraGen-alonzo branch 4 times, most recently from 1035d21 to dadd59f Compare May 10, 2021 18:36
@@ -185,7 +185,7 @@ data UtxoPredicateFailure era
| TriesToForgeADA
| -- | list of supplied bad transaction outputs
OutputTooBigUTxO
![Core.TxOut era]
![(Int, Int, Core.TxOut era)]
Copy link
Contributor

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?)
@JaredCorduan JaredCorduan merged commit 433fdfa into master May 11, 2021
@iohk-bors iohk-bors bot deleted the ts-EraGen-alonzo branch May 11, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants