cardano-ledger-core-1.14.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Block

Synopsis

Documentation

data Block h era Source #

Constructors

Block' !h !(TxSeq era) ByteString 

Bundled Patterns

pattern Block ∷ ∀ era h. (Era era, EncCBORGroup (TxSeq era), EncCBOR h) ⇒ h → TxSeq era → Block h era 
pattern UnserialisedBlock ∷ h → TxSeq era → Block h era

Access a block without its serialised bytes. This is often useful when we're using a BHeaderView in place of the concrete header.

pattern UnsafeUnserialisedBlock ∷ h → TxSeq era → Block h era

Unsafely construct a block without the ability to serialise its bytes.

Anyone calling this pattern must ensure that the resulting block is never serialised. Any uses of this pattern outside of testing code should be regarded with suspicion.

Instances

Instances details
(EraSegWits era, DecCBOR (Annotator h), Typeable h) ⇒ DecCBOR (Annotator (Block h era)) Source # 
Instance details

Defined in Cardano.Ledger.Block

Methods

decCBORDecoder s (Annotator (Block h era)) Source #

dropCBORProxy (Annotator (Block h era)) → Decoder s () Source #

labelProxy (Annotator (Block h era)) → Text Source #

Generic (Block h era) Source # 
Instance details

Defined in Cardano.Ledger.Block

Associated Types

type Rep (Block h era) ∷ TypeType Source #

Methods

fromBlock h era → Rep (Block h era) x Source #

toRep (Block h era) x → Block h era Source #

(Era era, Show (TxSeq era), Show h) ⇒ Show (Block h era) Source # 
Instance details

Defined in Cardano.Ledger.Block

Methods

showsPrecIntBlock h era → ShowS Source #

showBlock h era → String Source #

showList ∷ [Block h era] → ShowS Source #

(EraTx era, Typeable h) ⇒ ToCBOR (Block h era) Source # 
Instance details

Defined in Cardano.Ledger.Block

Methods

toCBORBlock h era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (Block h era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Block h era] → Size Source #

(EraTx era, Typeable h) ⇒ EncCBOR (Block h era) Source # 
Instance details

Defined in Cardano.Ledger.Block

Methods

encCBORBlock h era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Block h era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Block h era] → Size Source #

(Era era, Eq (TxSeq era), Eq h) ⇒ Eq (Block h era) Source # 
Instance details

Defined in Cardano.Ledger.Block

Methods

(==)Block h era → Block h era → Bool Source #

(/=)Block h era → Block h era → Bool Source #

(Era era, NoThunks (TxSeq era), NoThunks h) ⇒ NoThunks (Block h era) Source # 
Instance details

Defined in Cardano.Ledger.Block

Methods

noThunksContextBlock h era → IO (Maybe ThunkInfo) Source #

wNoThunksContextBlock h era → IO (Maybe ThunkInfo) Source #

showTypeOfProxy (Block h era) → String Source #

type Rep (Block h era) Source # 
Instance details

Defined in Cardano.Ledger.Block

type Rep (Block h era) = D1 ('MetaData "Block" "Cardano.Ledger.Block" "cardano-ledger-core-1.14.0.0-inplace" 'False) (C1 ('MetaCons "Block'" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 h) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxSeq era)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))

bheaderBlock h era → h Source #

bbodyBlock h era → TxSeq era Source #

neededTxInsForBlock ∷ ∀ h era. EraSegWits era ⇒ Block h era → Set (TxIn (EraCrypto era)) Source #

The validity of any individual block depends only on a subset of the UTxO stored in the ledger state. This function returns the transaction inputs corresponding to the required UTxO for a given Block.

This function will be used by the consensus layer to enable storing the UTxO on disk. In particular, given a block, the consensus layer will use neededTxInsForBlock to retrieve the needed UTxO from disk and present only those to the ledger.

txidEraTxBody era ⇒ TxBody era → TxId (EraCrypto era) Source #

Deprecated: In favor of txIdTxBody or txIdTx

Compute the id of a transaction.