-
Notifications
You must be signed in to change notification settings - Fork 86
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
Continue preparing the for the introduction of AlonzoEra #3131
Conversation
00c3321
to
32b8484
Compare
This is a Draft PR because it should be rebased and then merged after we merge PR #3130. |
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 reasonable to me.
ouroboros-consensus-shelley-test/src/Test/Consensus/Shelley/MockCrypto.hs
Outdated
Show resolved
Hide resolved
32b8484
to
ff697ca
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.
The changes since my last review are related to the other PR and to my previous comment for renaming CanMockOld
, so still looks good.
4fccf5a
to
5201d9c
Compare
ouroboros-consensus-cardano-test/src/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs
Show resolved
Hide resolved
5201d9c
to
457e7f0
Compare
This is a temporary workaround; the AlonzoEra does not satisfy CanMockPreAlonzo, so we cannot use CanMockPreAlonzo for instances that are elsewhere required for each element of CardanoEras. Thankfully, only these uses of CanMockPreAlonzo need the Alonzo-incompatible constraints, and these three are also not requires of CardanoEras.
The motivation is to bring in the NoThunks AlonzoGenesis instance and the TranslationContext (ShelleyEra c) ~ () instance.
457e7f0
to
2b8ed44
Compare
ouroboros-consensus-cardano-test/src/Test/Consensus/Cardano/Generators.hs
Show resolved
Hide resolved
2b8ed44
to
98396bf
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.
LGTM. Few minor comments but those we can always revisit.
ouroboros-consensus-shelley-test/src/Test/Consensus/Shelley/Examples.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-cardano-test/src/Test/ThreadNet/Infra/ShelleyBasedHardFork.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus-cardano/src/Ouroboros/Consensus/Cardano/Node.hs
Outdated
Show resolved
Hide resolved
Alonzo is the first era with a `TranslationContext` that is not `()`. Therefore, this commit must pipe through the `TranslationContext` through to the calls to `translateEra`. In particular, some of this are in classes used by the HFC in which the only era-specific input is the `LedgerConfig`. For that reason, we're adding `TranslationContext` to `ShelleyLedgerConfig`. It's possible we should instead alter the HFC to carry something in addition to/instead of the `LedgerConfig`, but we're taking the direct path for now. By adding a field to the `ShelleyLedgerConfig` we take on the burden of providing that `TranslationContext` in every interface and/or test function that creates a Shelley protocol info etc. This is noisy but simple, since all eras before `AlonzoEra` just use `()` for their context.
98396bf
to
67751c9
Compare
67751c9
to
ed24dfa
Compare
bors r+ |
Build failed: |
The Hydra build timed out on the mac-mini again b/c of Issue IntersectMBO/ouroboros-consensus#606. I restarted it 🤞 Edit: and it succeeded -- but |
bors r+ |
Build succeeded: |
This PR introduces the changes that then allow us to add
AlonzoEra
to theCardanoEras
list.