perf(ledger): async hfi stability (#2206)
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: Eric Torreborre <[email protected]>
The 7-way ShelleyBasedEra case duplicated body/mAuxData extraction and a near-identical field list (with Null placeholders) in every branch. Extract one helper per feature (validityRangePair, mintPair, collateralInputsPair, requiredSignersPair, referenceInputsPair, totalCollateralPair, returnCollateralPair) plus alonzoScriptWitnessPairsFor / conwayBodyPairsFor. The top-level body now extracts body/mAuxData once and composes a flat list of pairs. No behaviour change: all golden outputs are unchanged.
Now that the friendly renderer covers Shelley through Babbage, those tx bodies' update field is no longer just noise — it carries real governance state (a ProposedPPUpdates map keyed by genesis-key hash and an EpochNo). Render it directly from the ledger TxBody via `updateTxBodyL`. Conway replaced update proposals with the new governance system, so the field is absent (not null) in Conway+. Adds `updateProposalPairFor` and `renderUpdate` helpers; the per-era PParamsUpdate is rendered via its ledger ToJSON instance.
friendlyTx and friendlyTxBody now take ShelleyBasedEra era and accept Exp.SignedTx era / Exp.UnsignedTx (ShelleyLedgerEra era). They are no longer parameterised by Exp.Era era (which is Conway-only) — the renderer works for Shelley through Conway tx and tx-body files, unblocking transaction view for pre-Conway tx files. friendlyTxBodyImpl reads every field directly from the ledger TxBody via lenses, so the old API's TxBodyContent constructor and getTxBodyContent are no longer used in this module. The body dispatches on ShelleyBasedEra at the top level and each branch renders its full body inline. Era-gated fields (mint, collateral, reference inputs, governance actions, etc.) are present only in branches whose era supports them. The eon-based dispatchers (forShelleyBasedEraInEon, AlonzoEraOnwards, ConwayEraOnwards, ...) are no longer used in this module. Relies on cardano-api 11.1.0.0 (PR IntersectMBO/cardano-api#1199), which widened Exp.SignedTx / Exp.UnsignedTx to all Shelley-based eras.
Fail Plutus `V1-V3` translation with guards Resolves #5602
Signed-off-by: Eric Torreborre <[email protected]>
Signed-off-by: Akhil Repala <[email protected]>
Add regression test: makeUnsignedTx errors without protocol params for Plutus scripts
Signed-off-by: Chris Gianelloni <[email protected]>