Replace closed-range eon eliminators with forEraInEon in cardano-cli#1397
Draft
Jimbo4350 wants to merge 3 commits into
Draft
Replace closed-range eon eliminators with forEraInEon in cardano-cli#1397Jimbo4350 wants to merge 3 commits into
Jimbo4350 wants to merge 3 commits into
Conversation
…atch in utxoToText Renders the inline datum in query UTxO output by matching on ShelleyBasedEra directly instead of routing through the caseShelleyToAlonzoOrBabbageEraOnwards eon eliminator. Behaviour is unchanged (Babbage-onwards show the ledger datum, earlier eras show an empty placeholder). Part of removing eon witnesses from cardano-cli in favour of ShelleyBasedEra / experimental Era.
…InEon Rewrites the four cardano-cli call sites of the closed-range eon eliminators (caseShelleyToAllegraOrMaryEraOnwards, caseShelleyToAlonzoOrBabbageEraOnwards, caseShelleyToMaryOrAlonzoEraOnwards) to use forEraInEon on the CardanoEra, keyed on the surviving *EraOnwards eon. Behaviour is unchanged. Removes the last cardano-cli uses of ShelleyToAllegraEra, ShelleyToAlonzoEra and ShelleyToMaryEra, unblocking their removal from cardano-api.
Jimbo4350
force-pushed
the
jordan/remove-eon-query-printabledatum
branch
from
July 20, 2026 19:51
7b8d3e5 to
c40539c
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Part of removing eon witnesses from
cardano-cliin favour ofShelleyBasedEra era/ the experimentalEra era.This PR rewrites the four
cardano-clicall sites of the closed-range eon eliminators to useforEraInEonon theCardanoEra, keyed on the surviving*EraOnwardseon:Compatible/Transaction/TxOut.hstoTxOutValueInShelleyBasedEracaseShelleyToAllegraOrMaryEraOnwardsforEraInEon(MaryEraOnwards)EraBased/Query/Run.hsprintableDatumcaseShelleyToAlonzoOrBabbageEraOnwardsforEraInEon(BabbageEraOnwards)Compatible/Transaction/Option.hspTxOutDatumcaseShelleyToMaryOrAlonzoEraOnwardsforEraInEon(AlonzoEraOnwards)EraBased/Governance/Actions/Option.hspCostModelsFilecaseShelleyToMaryOrAlonzoEraOnwardsforEraInEon(AlonzoEraOnwards)This removes the last
cardano-cliuses ofShelleyToAllegraEra,ShelleyToAlonzoEraandShelleyToMaryEra, which unblocks deleting those (consumerless) eons fromcardano-api.How to trust this PR
Behaviour is unchanged at every site —
forEraInEon's negative branch fires for exactly the same sub-cutoff eras thecaseShelleyToXOr…lower branch did.Two non-obvious details worth a reviewer's eye:
toTxOutValueInShelleyBasedEra: the old lower branch relied on theShelleyToAllegraErawitness to refineL.Value (ShelleyLedgerEra era) ~ Coin.forEraInEon's negative branch has no such evidence, soTxOutValueShelleyBased sbe lno longer typechecks — replaced withlovelaceToTxOutValue sbe l, which injects the coin undershelleyBasedEraConstraints.toTxOutValueInShelleyBasedErapositive branch: thecase…eliminator brought its handler's constraints into scope automatically;forEraInEondoes not, so theMaryEraOnwardsbody now needs an explicitmaryEraOnwardsConstraints w $ ….Verified with
cabal build cardano-cli -j4(lib, exe, and golden tests compile and link).Checklist
.changes/