Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
Instances
Crypto c ⇒ TranslateEra (ConwayEra c) Tx Source # | |
Defined in Cardano.Ledger.Conway.Translation type TranslationError (ConwayEra c) Tx Source # translateEra ∷ TranslationContext (ConwayEra c) → Tx (PreviousEra (ConwayEra c)) → Except (TranslationError (ConwayEra c) Tx) (Tx (ConwayEra c)) Source # | |
type TranslationError (ConwayEra c) Tx Source # | |
Defined in Cardano.Ledger.Conway.Translation |
addrPtrNormalize ∷ Addr c → Addr c Source #
This function is implemented solely for the purpose of translating garbage pointers
into knowingly invalid ones. Any pointer that contains a SlotNo, TxIx or CertIx that
is too large to fit into Word32, Word16 and Word16 respectively, will have all of its
values set to 0 using normalizePtr
.
There are two reasons why we can safely do that at the Babbage/Conway era boundary:
- Invalid pointers are no longer allowed in transactions starting with Babbage era
- There are only a handful of
Ptr
s on mainnet that are invalid.
Once the transition is complete and we are officially in Conway era, this translation logic can be removed in favor of a fixed deserializer that does the same thing for all eras prior to Babbage.