Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Ledger.Block
Synopsis
-
data
Block
h era
where
- Block' !h !( TxSeq era) ByteString
- pattern Block :: ( Era era, ToCBORGroup ( TxSeq era), ToCBOR h) => h -> TxSeq era -> Block h era
- pattern UnserialisedBlock :: h -> TxSeq era -> Block h era
- pattern UnsafeUnserialisedBlock :: h -> TxSeq era -> Block h era
- type BlockAnn era = ( FromCBOR ( Annotator ( TxBody era)), FromCBOR ( Annotator ( AuxiliaryData era)), FromCBOR ( Annotator ( Witnesses era)), ToCBOR ( TxBody era), ToCBOR ( AuxiliaryData era), ToCBOR ( Witnesses era))
- bheader :: Block h era -> h
- bbody :: Block h era -> TxSeq era
- neededTxInsForBlock :: Era era => Block h era -> Set ( TxIn ( Crypto era))
Documentation
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
|
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
type BlockAnn era = ( FromCBOR ( Annotator ( TxBody era)), FromCBOR ( Annotator ( AuxiliaryData era)), FromCBOR ( Annotator ( Witnesses era)), ToCBOR ( TxBody era), ToCBOR ( AuxiliaryData era), ToCBOR ( Witnesses era)) Source #
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.