cardano-ledger-core-0.1.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe Haskell None
Language Haskell2010

Cardano.Ledger.Block

Synopsis

Documentation

data Block h era Source #

Constructors

Block' !h !( TxSeq era) ByteString

Bundled Patterns

pattern Block :: ( Era era, ToCBORGroup ( TxSeq era), ToCBOR 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
( BlockAnn era, ValidateScript era, SupportsSegWit era, FromCBOR ( Annotator ( TxSeq era)), FromCBOR ( Annotator h), Typeable h) => FromCBOR ( Annotator ( Block h era)) Source #
Instance details

Defined in Cardano.Ledger.Block

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

Defined in Cardano.Ledger.Block

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

Defined in Cardano.Ledger.Block

Generic ( Block h era) Source #
Instance details

Defined in Cardano.Ledger.Block

Associated Types

type Rep ( Block h era) :: Type -> Type Source #

( Era era, Typeable h) => ToCBOR ( Block h era) Source #
Instance details

Defined in Cardano.Ledger.Block

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

Defined in Cardano.Ledger.Block

type Rep ( Block h era) Source #
Instance details

Defined in Cardano.Ledger.Block

neededTxInsForBlock :: Era era => Block h era -> Set ( TxIn ( Crypto 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.