| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Consensus.Cardano.GenTxIdBuilders
Description
Build Cardano OneEraGenTxId values from raw hash bytes, one per era.
Shared by the txid Eq/Ord benchmark and the txid Eq/Ord
equivalence test: both need to place a chosen 32-byte hash at a chosen era
position, without going through the network or the ledger.
Synopsis
- class BuildGenTxId blk where
- buildGenTxId ∷ ShortByteString → GenTxId blk
- apInjs ∷ ∀ (xs ∷ [Type]) (f ∷ Type → Type). SListI xs ⇒ NP f xs → [NS f xs]
- buildNP ∷ ∀ (xs ∷ [Type]). All BuildGenTxId xs ⇒ ShortByteString → NP WrapGenTxId xs
- oneEraGenTxIds ∷ ∀ (xs ∷ [Type]). All BuildGenTxId xs ⇒ ShortByteString → [OneEraGenTxId xs]
Documentation
class BuildGenTxId blk where Source #
Build a transaction id for one era from raw hash bytes. Each era wraps its hash differently, hence one instance per era shape.
Methods
buildGenTxId ∷ ShortByteString → GenTxId blk Source #
Instances
| BuildGenTxId ByronBlock Source # | |
Defined in Test.Consensus.Cardano.GenTxIdBuilders Methods buildGenTxId ∷ ShortByteString → GenTxId ByronBlock Source # | |
| BuildGenTxId (ShelleyBlock proto era) Source # | |
Defined in Test.Consensus.Cardano.GenTxIdBuilders Methods buildGenTxId ∷ ShortByteString → GenTxId (ShelleyBlock proto era) Source # | |
apInjs ∷ ∀ (xs ∷ [Type]) (f ∷ Type → Type). SListI xs ⇒ NP f xs → [NS f xs] Source #
Inject each leaf into the sum at its own era position. The strict NS has
no apInjs_NP, so we go through injections.
buildNP ∷ ∀ (xs ∷ [Type]). All BuildGenTxId xs ⇒ ShortByteString → NP WrapGenTxId xs Source #
One leaf per era, every era sharing the given hash bytes.
oneEraGenTxIds ∷ ∀ (xs ∷ [Type]). All BuildGenTxId xs ⇒ ShortByteString → [OneEraGenTxId xs] Source #
One OneEraGenTxId per era, list index equal to the era position, every
entry carrying the given hash bytes.