ouroboros-consensus:cardano
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Shelley.Ledger.Forge

Synopsis

Documentation

serializeTxForLeios ∷ (EraTx era, SafeToHash (Tx 'TopTx era)) ⇒ Tx 'TopTx era → ByteString Source #

The bytes of a transaction that an endorser block references.

These bytes must keep the is_valid flag, because a peer cannot get it from anywhere else. EncCBOR drops the flag in Dijkstra, so we use the block-body encoding.

Their length must not exceed txByteSizeWithOverhead. Otherwise the endorser block can exceed the size that txEbMeasureDijkstra reserved for it, and header validation rejects the block with LeiosEbTooBig.

forgeShelleyBlock ∷ ∀ m era proto. (ShelleyCompatible proto era, Applicative (WhenLeios proto), Foldable (WhenLeios proto), Monad m) ⇒ HotKey (ProtoCrypto proto) m → CanBeLeader proto → ForgeBlockArgs (ShelleyBlock proto era) → m (ForgeBlockResult (ShelleyBlock proto era)) Source #