ouroboros-consensus-cardano-0.20.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Byron.Ledger.Block

Synopsis

Hash

newtype ByronHash Source #

Constructors

ByronHash 

Instances

Instances details
Generic ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Associated Types

type Rep ByronHashTypeType #

Methods

fromByronHashRep ByronHash x #

toRep ByronHash x → ByronHash #

Show ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Methods

showsPrecIntByronHashShowS #

showByronHashString #

showList ∷ [ByronHash] → ShowS #

DecCBOR ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

EncCBOR ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Methods

encCBORByronHashEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ByronHashSize Source #

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

Eq ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Methods

(==)ByronHashByronHashBool #

(/=)ByronHashByronHashBool #

Ord ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

NoThunks ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Condense ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Serialise ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Serialisation

type Rep ByronHash Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

type Rep ByronHash = D1 ('MetaData "ByronHash" "Ouroboros.Consensus.Byron.Ledger.Block" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'True) (C1 ('MetaCons "ByronHash" 'PrefixI 'True) (S1 ('MetaSel ('Just "unByronHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HeaderHash)))

Block

data ByronBlock Source #

Byron block

We cache two bits of information:

  • We cache the slot number as this is not readily available for EBBs. Having it cached allows us to e.g. give a HasHeader instance.
  • We cache the hash as this is expensive to compute and we need it often.

Instances

Instances details
Show ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Eq ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Methods

(==)ByronBlockByronBlockBool #

(/=)ByronBlockByronBlockBool #

ConvertRawHash ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

GetHeader ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

GetPrevHash ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

BlockSupportsDiffusionPipelining ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

BlockSupportsMetrics ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

BlockSupportsProtocol ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.PBFT

BlockSupportsSanityCheck ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

ConfigSupportsNode ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

HasHardForkHistory ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Associated Types

type HardForkIndices ByronBlock ∷ [Type] Source #

NoHardForks ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.ByronHFC

SingleEraBlock ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.CanHardFork

CondenseConstraints ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.Condense

HasPartialLedgerConfig ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.CanHardFork

Associated Types

type PartialLedgerConfig ByronBlock Source #

SerialiseConstraintsHFC ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.Node

BasicEnvelopeValidation ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.HeaderValidation

HasAnnTip ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.HeaderValidation

Associated Types

type TipInfo ByronBlock Source #

ValidateEnvelope ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.HeaderValidation

UpdateLedger ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

CommonProtocolParams ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

InspectLedger ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Inspect

BlockSupportsLedgerQuery ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

HasTxs ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

LedgerSupportsMempool ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

TxLimits ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Associated Types

type TxMeasure ByronBlock Source #

LedgerSupportsPeerSelection ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

LedgerSupportsProtocol ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

NodeInitStorage ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

HasNetworkProtocolVersion ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.NetworkProtocolVersion

SupportedNetworkProtocolVersion ByronBlock Source #

This instance isn't used apart from tests; we therefore make our life easy below.

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.NetworkProtocolVersion

SupportedNetworkProtocolVersion ByronBlockHFC Source #

Forward to the ByronBlock instance. Only supports HardForkNodeToNodeDisabled, which is compatible with nodes running with ByronBlock.

Instance details

Defined in Ouroboros.Consensus.Cardano.ByronHFC

RunNode ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

SerialiseNodeToClientConstraints ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNodeConstraints ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseDiskConstraints ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

HasBinaryBlockInfo ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

Condense ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

HasHeader ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

HasNestedContent Header ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Serialisation

SerialiseNodeToClient ByronBlock ApplyMempoolPayloadErr Source #
ApplyTxErr ByronBlock
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToClient ByronBlock SlotNo Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToClient ByronBlock ByronBlock Source #

CBOR-in-CBOR for the annotation. This also makes it compatible with the wrapped (Serialised) variant.

Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNode ByronBlock ByronBlock Source #

CBOR-in-CBOR for the annotation. This also makes it compatible with the wrapped (Serialised) variant.

Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDisk ByronBlock ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

ReconstructNestedCtxt Header ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

StandardHash ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ShowProxy ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

SerialiseNodeToClient ByronBlock (GenTx ByronBlock) Source #

No CBOR-in-CBOR, because we check for canonical encodings, which means we can use the recomputed encoding for the annotation.

Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToClient ByronBlock (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNode ByronBlock (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNode ByronBlock (GenTx ByronBlock) Source #

No CBOR-in-CBOR, because we check for canonical encodings, which means we can use the recomputed encoding for the annotation.

Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNode ByronBlock (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNode ByronBlock (SerialisedHeader ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseResult ByronBlock (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

DecodeDisk ByronBlock (AnnTip ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

DecodeDisk ByronBlock (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

DecodeDisk ByronBlock (PBftState PBftByronCrypto) Source #
ChainDepState (BlockProtocol ByronBlock)
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDisk ByronBlock (AnnTip ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDisk ByronBlock (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDisk ByronBlock (PBftState PBftByronCrypto) Source #
ChainDepState (BlockProtocol ByronBlock)
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

ShowProxy (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ShowProxy (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

ShowProxy (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

SerialiseNodeToClient ByronBlock (Serialised ByronBlock) Source #

Serialised uses CBOR-in-CBOR by default.

Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNode ByronBlock (Serialised ByronBlock) Source #

Serialised uses CBOR-in-CBOR by default.

Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

DecodeDisk ByronBlock (ByteStringByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToClient ByronBlock (SomeSecond BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

Generic (BlockConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Associated Types

type Rep (BlockConfig ByronBlock) ∷ TypeType #

Generic (CodecConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Associated Types

type Rep (CodecConfig ByronBlock) ∷ TypeType #

Generic (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Associated Types

type Rep (Header ByronBlock) ∷ TypeType #

Generic (StorageConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

Associated Types

type Rep (StorageConfig ByronBlock) ∷ TypeType #

Generic (Validated (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Associated Types

type Rep (Validated (GenTx ByronBlock)) ∷ TypeType #

Generic (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Associated Types

type Rep (LedgerState ByronBlock) ∷ TypeType #

Generic (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Associated Types

type Rep (GenTx ByronBlock) ∷ TypeType #

Generic (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Associated Types

type Rep (Ticked (LedgerState ByronBlock)) ∷ TypeType #

Show (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Show (Validated (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Show (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Show (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Show (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Eq (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Eq (Validated (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Eq (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Eq (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Eq (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Ord (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

NoThunks (BlockConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

NoThunks (CodecConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

NoThunks (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

NoThunks (StorageConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

NoThunks (Validated (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

NoThunks (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

NoThunks (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

NoThunks (TxId (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

NoThunks (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

CardanoHardForkConstraints c ⇒ CanHardFork (CardanoEras c) Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.CanHardFork

Associated Types

type HardForkTxMeasure (CardanoEras c) Source #

CardanoHardForkConstraints c ⇒ CondenseConstraints (CardanoBlock c) Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.Condense

CardanoHardForkConstraints c ⇒ SerialiseHFC (CardanoEras c) Source #

Important: we need to maintain binary compatibility with Byron blocks, as they are already stored on disk.

We also want to be able to efficiently detect (without having to peek far ahead) whether we're dealing with a Byron or Shelley block, so that we can invoke the right decoder. We plan to have a few more hard forks after Shelley (Goguen, Basho, Voltaire), so we want a future-proof envelope for distinguishing the different block types, i.e., a byte indicating the era.

Byron does not provide such an envelope. However, a Byron block is a CBOR 2-tuple with the first element being a tag (Word: 0 = EBB; 1 = regular block) and the second being the payload. We can easily extend this encoding format with support for Shelley, Goguen, etc.

We encode a CardanoBlock as the same CBOR 2-tuple as a Byron block, but we use the tags after 1 for the hard forks after Byron:

  1. Byron EBB
  2. Byron regular block
  3. Shelley block
  4. Allegra block
  5. Mary block
  6. Goguen block
  7. etc.

For more details, see: https://github.com/IntersectMBO/ouroboros-network/pull/1175#issuecomment-558147194

Instance details

Defined in Ouroboros.Consensus.Cardano.Node

GetTip (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

GetTip (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

IsLedger (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

ConvertRawTxId (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

HasTxId (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

CardanoHardForkConstraints c ⇒ SupportedNetworkProtocolVersion (CardanoBlock c) Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.Node

Condense (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Condense (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

Condense (GenTxId ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

SameDepIndex (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

HasHeader (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ShowQuery (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

showResultBlockQuery ByronBlock result → result → String Source #

ApplyBlock (LedgerState ByronBlock) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

DecodeDiskDep (NestedCtxt Header) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

DecodeDiskDepIx (NestedCtxt Header) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDiskDep (NestedCtxt Header) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDiskDepIx (NestedCtxt Header) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

Show (BlockQuery ByronBlock result) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

showsPrecIntBlockQuery ByronBlock result → ShowS #

showBlockQuery ByronBlock result → String #

showList ∷ [BlockQuery ByronBlock result] → ShowS #

Eq (BlockQuery ByronBlock result) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

(==)BlockQuery ByronBlock result → BlockQuery ByronBlock result → Bool #

(/=)BlockQuery ByronBlock result → BlockQuery ByronBlock result → Bool #

SameDepIndex (NestedCtxt_ ByronBlock f) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Serialisation

ShowProxy (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Show (NestedCtxt_ ByronBlock f a) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Serialisation

SerialiseHFC '[ByronBlock] Source #

Forward to the ByronBlock instance, this means we don't add an era wrapper around blocks on disk. This makes sure we're compatible with the existing Byron blocks.

Instance details

Defined in Ouroboros.Consensus.Cardano.ByronHFC

data BlockConfig ByronBlock Source #

Extended configuration we need for Byron

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type BlockProtocol ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.PBFT

newtype CodecConfig ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

data Header ByronBlock Source #

Byron header

See ByronBlock for comments on why we cache certain values.

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

newtype StorageConfig ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type CannotForge ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

type ForgeStateInfo ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

type ForgeStateUpdateError ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

data NestedCtxt_ ByronBlock f a Source #

Since the Byron header does not contain the size, we include it in the nested type instead.

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Serialisation

type TentativeHeaderState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

type TentativeHeaderView ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node

type HardForkIndices ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type PartialLedgerConfig ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.CanHardFork

type OtherHeaderEnvelopeError ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.HeaderValidation

type TipInfo ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.HeaderValidation

data LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type LedgerUpdate ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Inspect

type LedgerWarning ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Inspect

data BlockQuery ByronBlock a Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type ApplyTxErr ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data GenTx ByronBlock Source #

Generalized transactions in Byron

This is effectively the same as AMempoolPayload but we cache the transaction ID (a hash).

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

type TxMeasure ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

type BlockNodeToClientVersion ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.NetworkProtocolVersion

type BlockNodeToNodeVersion ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.NetworkProtocolVersion

type HeaderHash ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

type Rep (BlockConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (BlockConfig ByronBlock) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "ByronConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronGenesisConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Config) :*: (S1 ('MetaSel ('Just "byronProtocolVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ProtocolVersion) :*: S1 ('MetaSel ('Just "byronSoftwareVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SoftwareVersion))))
type Rep (CodecConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (CodecConfig ByronBlock) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'True) (C1 ('MetaCons "ByronCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronEpochSlots") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochSlots)))
type Rep (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

type Rep (Header ByronBlock) = D1 ('MetaData "Header" "Ouroboros.Consensus.Byron.Ledger.Block" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "ByronHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "byronHeaderRaw") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ABlockOrBoundaryHdr ByteString)) :*: S1 ('MetaSel ('Just "byronHeaderSlotNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "byronHeaderHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronHash) :*: S1 ('MetaSel ('Just "byronHeaderBlockSizeHint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SizeInBytes))))
type Rep (StorageConfig ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (StorageConfig ByronBlock) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'True) (C1 ('MetaCons "ByronStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronBlockConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BlockConfig ByronBlock))))
type Rep (Validated (GenTx ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

type Rep (Validated (GenTx ByronBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'True) (C1 ('MetaCons "ValidatedByronTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronBlock))))
type Rep (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (LedgerState ByronBlock) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "ByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronLedgerTipBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin BlockNo)) :*: (S1 ('MetaSel ('Just "byronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "byronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition))))
type Rep (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

type Rep (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (Ticked (LedgerState ByronBlock)) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "TickedByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedByronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "untickedByronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition)))
type HardForkTxMeasure (CardanoEras c) Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.CanHardFork

newtype Validated (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

type AuxLedgerEvent (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type LedgerCfg (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type LedgerErr (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

data TxId (GenTx ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data Ticked (LedgerState ByronBlock) Source #

The ticked Byron ledger state

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

annotateByronBlockEpochSlotsBlockByronBlock Source #

Construct Byron block from unannotated Block

This should be used only when forging blocks (not when receiving blocks over the wire).

Header

data family Header blk Source #

Instances

Instances details
Inject Header 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → Header x → Header (HardForkBlock xs) Source #

HasNestedContent Header ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Serialisation

ReconstructNestedCtxt Header ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SerialiseNodeToNode ByronBlock (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

HasHeader blk ⇒ StandardHash (Header blk ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

ShowProxy (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

(Typeable era, Typeable proto) ⇒ ShowProxy (Header (ShelleyBlock proto era) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

showProxyProxy (Header (ShelleyBlock proto era)) → String Source #

ShelleyBasedEra era ⇒ ReconstructNestedCtxt Header (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Generic (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Associated Types

type Rep (Header ByronBlock) ∷ TypeType #

Generic (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Associated Types

type Rep (Header (ShelleyBlock proto era)) ∷ TypeType #

Methods

fromHeader (ShelleyBlock proto era) → Rep (Header (ShelleyBlock proto era)) x #

toRep (Header (ShelleyBlock proto era)) x → Header (ShelleyBlock proto era) #

Show (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ShelleyCompatible proto era ⇒ Show (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

showsPrecIntHeader (ShelleyBlock proto era) → ShowS #

showHeader (ShelleyBlock proto era) → String #

showList ∷ [Header (ShelleyBlock proto era)] → ShowS #

ShelleyCompatible proto era ⇒ DecCBOR (Annotator (Header (ShelleyBlock proto era))) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

decCBORDecoder s (Annotator (Header (ShelleyBlock proto era))) Source #

dropCBORProxy (Annotator (Header (ShelleyBlock proto era))) → Decoder s () Source #

labelProxy (Annotator (Header (ShelleyBlock proto era))) → Text Source #

ShelleyCompatible proto era ⇒ EncCBOR (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

encCBORHeader (ShelleyBlock proto era) → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Header (ShelleyBlock proto era)) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Header (ShelleyBlock proto era)] → Size Source #

Eq (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ShelleyCompatible proto era ⇒ Eq (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

(==)Header (ShelleyBlock proto era) → Header (ShelleyBlock proto era) → Bool #

(/=)Header (ShelleyBlock proto era) → Header (ShelleyBlock proto era) → Bool #

NoThunks (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ShelleyCompatible proto era ⇒ NoThunks (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

SignedHeader (ShelleyProtocolHeader proto) ⇒ SignedHeader (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Protocol

Methods

headerSignedHeader (ShelleyBlock proto era) → Signed (Header (ShelleyBlock proto era)) Source #

Condense (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ShelleyCompatible proto era ⇒ Condense (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

condenseHeader (ShelleyBlock proto era) → String Source #

HasHeader (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ShelleyCompatible proto era ⇒ HasHeader (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

getHeaderFieldsHeader (ShelleyBlock proto era) → HeaderFields (Header (ShelleyBlock proto era)) Source #

DecodeDiskDep (NestedCtxt Header) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

DecodeDiskDepIx (NestedCtxt Header) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDiskDep (NestedCtxt Header) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDiskDepIx (NestedCtxt Header) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

ShelleyCompatible proto era ⇒ DecodeDiskDep (NestedCtxt Header) (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

decodeDiskDepCodecConfig (ShelleyBlock proto era) → NestedCtxt Header (ShelleyBlock proto era) a → ∀ s. Decoder s (ByteString → a) Source #

ShelleyBasedEra era ⇒ DecodeDiskDepIx (NestedCtxt Header) (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

ShelleyCompatible proto era ⇒ EncodeDiskDep (NestedCtxt Header) (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

encodeDiskDepCodecConfig (ShelleyBlock proto era) → NestedCtxt Header (ShelleyBlock proto era) a → a → Encoding Source #

ShelleyBasedEra era ⇒ EncodeDiskDepIx (NestedCtxt Header) (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

ShelleyCompatible proto era ⇒ SerialiseNodeToNode (ShelleyBlock proto era) (Header (ShelleyBlock proto era)) Source #

CBOR-in-CBOR to be compatible with the wrapped (Serialised) variant.

Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

ShelleyCompatible proto era ⇒ EncodeDisk (ShelleyBlock proto era) (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

encodeDiskCodecConfig (ShelleyBlock proto era) → Header (ShelleyBlock proto era) → Encoding Source #

ShelleyCompatible proto era ⇒ DecodeDisk (ShelleyBlock proto era) (ByteStringHeader (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

decodeDiskCodecConfig (ShelleyBlock proto era) → ∀ s. Decoder s (ByteStringHeader (ShelleyBlock proto era)) Source #

data Header ByronBlock Source #

Byron header

See ByronBlock for comments on why we cache certain values.

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

type HeaderHash (Header blk ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk ∷ Type) = HeaderHash blk
type Rep (Header ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

type Rep (Header ByronBlock) = D1 ('MetaData "Header" "Ouroboros.Consensus.Byron.Ledger.Block" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "ByronHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "byronHeaderRaw") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ABlockOrBoundaryHdr ByteString)) :*: S1 ('MetaSel ('Just "byronHeaderSlotNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "byronHeaderHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronHash) :*: S1 ('MetaSel ('Just "byronHeaderBlockSizeHint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SizeInBytes))))
type Rep (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

type Rep (Header (ShelleyBlock proto era)) = D1 ('MetaData "Header" "Ouroboros.Consensus.Shelley.Ledger.Block" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyHeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyHeaderRaw") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ShelleyProtocolHeader proto)) :*: S1 ('MetaSel ('Just "shelleyHeaderHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ShelleyHash (ProtoCrypto proto)))))
type BlockProtocol (Header blk) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

newtype Header (DisableDiffusionPipelining blk) 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype Header (SelectViewDiffusionPipelining blk) 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype Header (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

type Signed (Header (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Protocol

data Header (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Dealing with EBBs

Low-level API

data UnsizedHeader Source #

Header without a size hint

Defined in order to support backwards compatible binary encodings.