Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Cardano.Block
Synopsis
- type CardanoEras c = ByronBlock ': CardanoShelleyEras c
- type CardanoShelleyEras c = '[ShelleyBlock (TPraos c) ShelleyEra, ShelleyBlock (TPraos c) AllegraEra, ShelleyBlock (TPraos c) MaryEra, ShelleyBlock (TPraos c) AlonzoEra, ShelleyBlock (Praos c) BabbageEra, ShelleyBlock (Praos c) ConwayEra]
- module Ouroboros.Consensus.Shelley.Eras
- type ShelleyBasedLedgerEras c = '[ShelleyEra, AllegraEra, MaryEra, AlonzoEra, BabbageEra, ConwayEra]
- type CardanoBlock c = HardForkBlock (CardanoEras c)
- data HardForkBlock (xs ∷ [Type]) where
- pattern BlockAllegra ∷ ShelleyBlock (TPraos c) AllegraEra → CardanoBlock c
- pattern BlockAlonzo ∷ ShelleyBlock (TPraos c) AlonzoEra → CardanoBlock c
- pattern BlockByron ∷ ByronBlock → CardanoBlock c
- pattern BlockMary ∷ ShelleyBlock (TPraos c) MaryEra → CardanoBlock c
- pattern BlockShelley ∷ ShelleyBlock (TPraos c) ShelleyEra → CardanoBlock c
- pattern BlockBabbage ∷ ShelleyBlock (Praos c) BabbageEra → CardanoBlock c
- pattern BlockConway ∷ ShelleyBlock (Praos c) ConwayEra → CardanoBlock c
- type CardanoHeader c = Header (CardanoBlock c)
- data family Header blk
- type CardanoApplyTxErr c = HardForkApplyTxErr (CardanoEras c)
- type CardanoGenTx c = GenTx (CardanoBlock c)
- type CardanoGenTxId c = GenTxId (CardanoBlock c)
- data family GenTx blk
- data HardForkApplyTxErr (xs ∷ [Type]) where
- pattern ApplyTxErrAllegra ∷ ApplyTxErr (ShelleyBlock (TPraos c) AllegraEra) → CardanoApplyTxErr c
- pattern ApplyTxErrAlonzo ∷ ApplyTxErr (ShelleyBlock (TPraos c) AlonzoEra) → CardanoApplyTxErr c
- pattern ApplyTxErrByron ∷ ApplyTxErr ByronBlock → CardanoApplyTxErr c
- pattern ApplyTxErrMary ∷ ApplyTxErr (ShelleyBlock (TPraos c) MaryEra) → CardanoApplyTxErr c
- pattern ApplyTxErrShelley ∷ ApplyTxErr (ShelleyBlock (TPraos c) ShelleyEra) → CardanoApplyTxErr c
- pattern ApplyTxErrWrongEra ∷ EraMismatch → CardanoApplyTxErr c
- pattern ApplyTxErrBabbage ∷ ApplyTxErr (ShelleyBlock (Praos c) BabbageEra) → CardanoApplyTxErr c
- pattern ApplyTxErrConway ∷ ApplyTxErr (ShelleyBlock (Praos c) ConwayEra) → CardanoApplyTxErr c
- data family TxId blk
- type CardanoLedgerError c = HardForkLedgerError (CardanoEras c)
- data HardForkLedgerError (xs ∷ [Type]) where
- pattern LedgerErrorAllegra ∷ LedgerError (ShelleyBlock (TPraos c) AllegraEra) → CardanoLedgerError c
- pattern LedgerErrorAlonzo ∷ LedgerError (ShelleyBlock (TPraos c) AlonzoEra) → CardanoLedgerError c
- pattern LedgerErrorByron ∷ LedgerError ByronBlock → CardanoLedgerError c
- pattern LedgerErrorMary ∷ LedgerError (ShelleyBlock (TPraos c) MaryEra) → CardanoLedgerError c
- pattern LedgerErrorShelley ∷ LedgerError (ShelleyBlock (TPraos c) ShelleyEra) → CardanoLedgerError c
- pattern LedgerErrorWrongEra ∷ EraMismatch → CardanoLedgerError c
- pattern LedgerErrorBabbage ∷ LedgerError (ShelleyBlock (Praos c) BabbageEra) → CardanoLedgerError c
- pattern LedgerErrorConway ∷ LedgerError (ShelleyBlock (Praos c) ConwayEra) → CardanoLedgerError c
- type CardanoOtherHeaderEnvelopeError c = HardForkEnvelopeErr (CardanoEras c)
- data HardForkEnvelopeErr (xs ∷ [Type]) where
- pattern OtherHeaderEnvelopeErrorAllegra ∷ OtherHeaderEnvelopeError (ShelleyBlock (TPraos c) AllegraEra) → CardanoOtherHeaderEnvelopeError c
- pattern OtherHeaderEnvelopeErrorBabbage ∷ OtherHeaderEnvelopeError (ShelleyBlock (Praos c) BabbageEra) → CardanoOtherHeaderEnvelopeError c
- pattern OtherHeaderEnvelopeErrorConway ∷ OtherHeaderEnvelopeError (ShelleyBlock (Praos c) ConwayEra) → CardanoOtherHeaderEnvelopeError c
- pattern OtherHeaderEnvelopeErrorAlonzo ∷ OtherHeaderEnvelopeError (ShelleyBlock (TPraos c) AlonzoEra) → CardanoOtherHeaderEnvelopeError c
- pattern OtherHeaderEnvelopeErrorByron ∷ OtherHeaderEnvelopeError ByronBlock → CardanoOtherHeaderEnvelopeError c
- pattern OtherHeaderEnvelopeErrorMary ∷ OtherHeaderEnvelopeError (ShelleyBlock (TPraos c) MaryEra) → CardanoOtherHeaderEnvelopeError c
- pattern OtherHeaderEnvelopeErrorShelley ∷ OtherHeaderEnvelopeError (ShelleyBlock (TPraos c) ShelleyEra) → CardanoOtherHeaderEnvelopeError c
- pattern OtherHeaderEnvelopeErrorWrongEra ∷ EraMismatch → CardanoOtherHeaderEnvelopeError c
- type CardanoTipInfo c = OneEraTipInfo (CardanoEras c)
- data OneEraTipInfo (xs ∷ [Type]) where
- pattern TipInfoAllegra ∷ TipInfo (ShelleyBlock (TPraos c) AllegraEra) → CardanoTipInfo c
- pattern TipInfoAlonzo ∷ TipInfo (ShelleyBlock (TPraos c) AlonzoEra) → CardanoTipInfo c
- pattern TipInfoByron ∷ TipInfo ByronBlock → CardanoTipInfo c
- pattern TipInfoBabbage ∷ TipInfo (ShelleyBlock (Praos c) BabbageEra) → CardanoTipInfo c
- pattern TipInfoConway ∷ TipInfo (ShelleyBlock (Praos c) ConwayEra) → CardanoTipInfo c
- pattern TipInfoMary ∷ TipInfo (ShelleyBlock (TPraos c) MaryEra) → CardanoTipInfo c
- pattern TipInfoShelley ∷ TipInfo (ShelleyBlock (TPraos c) ShelleyEra) → CardanoTipInfo c
- data family BlockQuery ∷ Type → QueryFootprint → Type → Type
- type CardanoQuery c = BlockQuery (CardanoBlock c)
- type CardanoQueryResult c = HardForkQueryResult (CardanoEras c)
- data Either a b where
- pattern QueryResultSuccess ∷ result → CardanoQueryResult c result
- pattern QueryResultEraMismatch ∷ EraMismatch → CardanoQueryResult c result
- type CardanoCodecConfig c = CodecConfig (CardanoBlock c)
- data family CodecConfig blk
- data family BlockConfig blk
- type CardanoBlockConfig c = BlockConfig (CardanoBlock c)
- type CardanoStorageConfig c = StorageConfig (CardanoBlock c)
- data family StorageConfig blk
- type CardanoConsensusConfig c = ConsensusConfig (HardForkProtocol (CardanoEras c))
- data family ConsensusConfig p
- type CardanoLedgerConfig c = HardForkLedgerConfig (CardanoEras c)
- data HardForkLedgerConfig (xs ∷ [Type]) where
- pattern CardanoLedgerConfig ∷ PartialLedgerConfig ByronBlock → PartialLedgerConfig (ShelleyBlock (TPraos c) ShelleyEra) → PartialLedgerConfig (ShelleyBlock (TPraos c) AllegraEra) → PartialLedgerConfig (ShelleyBlock (TPraos c) MaryEra) → PartialLedgerConfig (ShelleyBlock (TPraos c) AlonzoEra) → PartialLedgerConfig (ShelleyBlock (Praos c) BabbageEra) → PartialLedgerConfig (ShelleyBlock (Praos c) ConwayEra) → CardanoLedgerConfig c
- type CardanoLedgerState c (mk ∷ MapKind) = LedgerState (CardanoBlock c) mk
- data family LedgerState blk (mk ∷ MapKind)
- type CardanoChainDepState c = HardForkChainDepState (CardanoEras c)
- data HardForkState (f ∷ Type → Type) (xs ∷ [Type]) where
- pattern ChainDepStateAllegra ∷ ChainDepState (BlockProtocol (ShelleyBlock (TPraos c) AllegraEra)) → CardanoChainDepState c
- pattern ChainDepStateAlonzo ∷ ChainDepState (BlockProtocol (ShelleyBlock (TPraos c) AlonzoEra)) → CardanoChainDepState c
- pattern ChainDepStateBabbage ∷ ChainDepState (BlockProtocol (ShelleyBlock (Praos c) BabbageEra)) → CardanoChainDepState c
- pattern ChainDepStateConway ∷ ChainDepState (BlockProtocol (ShelleyBlock (Praos c) ConwayEra)) → CardanoChainDepState c
- pattern ChainDepStateByron ∷ ChainDepState (BlockProtocol ByronBlock) → CardanoChainDepState c
- pattern ChainDepStateMary ∷ ChainDepState (BlockProtocol (ShelleyBlock (TPraos c) MaryEra)) → CardanoChainDepState c
- pattern ChainDepStateShelley ∷ ChainDepState (BlockProtocol (ShelleyBlock (TPraos c) ShelleyEra)) → CardanoChainDepState c
- data EraMismatch = EraMismatch {}
Eras
type CardanoEras c = ByronBlock ': CardanoShelleyEras c Source #
The eras in the Cardano blockchain.
We parameterise over the crypto used in the post-Byron eras: c
.
TODO: parameterise ByronBlock over crypto too
type CardanoShelleyEras c = '[ShelleyBlock (TPraos c) ShelleyEra, ShelleyBlock (TPraos c) AllegraEra, ShelleyBlock (TPraos c) MaryEra, ShelleyBlock (TPraos c) AlonzoEra, ShelleyBlock (Praos c) BabbageEra, ShelleyBlock (Praos c) ConwayEra] Source #
type ShelleyBasedLedgerEras c = '[ShelleyEra, AllegraEra, MaryEra, AlonzoEra, BabbageEra, ConwayEra] Source #
Block
type CardanoBlock c = HardForkBlock (CardanoEras c) Source #
The Cardano block.
Thanks to the pattern synonyms, you can treat this as a sum type with
constructors BlockByron
, BlockShelley
, etc.
f :: CardanoBlock c -> _ f (BlockByron b) = _ f (BlockShelley s) = _ f (BlockAllegra a) = _ f (BlockMary m) = _ f (BlockAlonzo m) = _
data HardForkBlock (xs ∷ [Type]) where Source #
Bundled Patterns
pattern BlockAllegra ∷ ShelleyBlock (TPraos c) AllegraEra → CardanoBlock c | |
pattern BlockAlonzo ∷ ShelleyBlock (TPraos c) AlonzoEra → CardanoBlock c | |
pattern BlockByron ∷ ByronBlock → CardanoBlock c | |
pattern BlockMary ∷ ShelleyBlock (TPraos c) MaryEra → CardanoBlock c | |
pattern BlockShelley ∷ ShelleyBlock (TPraos c) ShelleyEra → CardanoBlock c | |
pattern BlockBabbage ∷ ShelleyBlock (Praos c) BabbageEra → CardanoBlock c | |
pattern BlockConway ∷ ShelleyBlock (Praos c) ConwayEra → CardanoBlock c |
Instances
Headers
type CardanoHeader c = Header (CardanoBlock c) Source #
The Cardano header.
data family Header blk Source #
Instances
Generalised transactions
type CardanoApplyTxErr c = HardForkApplyTxErr (CardanoEras c) Source #
An error resulting from applying a CardanoGenTx
to the ledger.
Thanks to the pattern synonyms, you can treat this as a sum type with
constructors ApplyTxByronErr
, ApplyTxErrShelley
, and
ApplyTxErrWrongEra
.
toText :: CardanoApplyTxErr c -> Text toText (ApplyTxErrByron b) = byronApplyTxErrToText b toText (ApplyTxErrShelley s) = shelleyApplyTxErrToText s toText (ApplyTxErrAllegra a) = allegraApplyTxErrToText a toText (ApplyTxErrMary m) = maryApplyTxErrToText m toText (ApplyTxErrWrongEra eraMismatch) = "Transaction from the " <> otherEraName eraMismatch <> " era applied to a ledger from the " <> ledgerEraName eraMismatch <> " era"
type CardanoGenTx c = GenTx (CardanoBlock c) Source #
The Cardano transaction.
type CardanoGenTxId c = GenTxId (CardanoBlock c) Source #
The ID of a Cardano transaction.
data family GenTx blk Source #
Generalized transaction
The mempool (and, accordingly, blocks) consist of "generalized transactions"; this could be "proper" transactions (transferring funds) but also other kinds of things such as update proposals, delegations, etc.
Instances
Inject GenTx | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary Methods inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → GenTx x → GenTx (HardForkBlock xs) Source # | |||||
Isomorphic GenTx | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ GenTx (HardForkBlock '[blk]) → GenTx blk Source # inject ∷ NoHardForks blk ⇒ GenTx blk → GenTx (HardForkBlock '[blk]) Source # | |||||
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. | ||||
Defined in Ouroboros.Consensus.Byron.Node.Serialisation | |||||
SerialiseNodeToClient ByronBlock (GenTxId ByronBlock) Source # | |||||
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. | ||||
Defined in Ouroboros.Consensus.Byron.Node.Serialisation | |||||
SerialiseNodeToNode ByronBlock (GenTxId ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Node.Serialisation | |||||
(Typeable era, Typeable proto) ⇒ ShowProxy (Validated (GenTx (ShelleyBlock proto era)) ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
(Typeable m, Typeable a) ⇒ ShowProxy (GenTx (DualBlock m a) ∷ Type) | |||||
ShowProxy (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
(Typeable era, Typeable proto) ⇒ ShowProxy (GenTx (ShelleyBlock proto era) ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
(Typeable m, Typeable a) ⇒ ShowProxy (TxId (GenTx (DualBlock m a)) ∷ Type) | |||||
ShowProxy (TxId (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
(Typeable era, Typeable proto) ⇒ ShowProxy (TxId (GenTx (ShelleyBlock proto era)) ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
(ShelleyBasedEra era, TranslateEra era WrapTx) ⇒ TranslateEra era (GenTx :.: ShelleyBlock proto) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.ShelleyHFC Associated Types
Methods translateEra ∷ TranslationContext era → (GenTx :.: ShelleyBlock proto) (PreviousEra era) → Except (TranslationError era (GenTx :.: ShelleyBlock proto)) ((GenTx :.: ShelleyBlock proto) era) Source # | |||||
ShelleyCompatible proto era ⇒ FromCBOR (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
ShelleyCompatible proto era ⇒ ToCBOR (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
(Typeable era, Typeable proto, Crypto (ProtoCrypto proto)) ⇒ DecCBOR (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
(Typeable era, Typeable proto, Crypto (ProtoCrypto proto)) ⇒ EncCBOR (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods encCBOR ∷ TxId (GenTx (ShelleyBlock proto era)) → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (TxId (GenTx (ShelleyBlock proto era))) → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [TxId (GenTx (ShelleyBlock proto era))] → Size Source # | |||||
Generic (Validated (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Associated Types
Methods from ∷ Validated (GenTx ByronBlock) → Rep (Validated (GenTx ByronBlock)) x # to ∷ Rep (Validated (GenTx ByronBlock)) x → Validated (GenTx ByronBlock) # | |||||
Generic (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Associated Types
Methods from ∷ Validated (GenTx (ShelleyBlock proto era)) → Rep (Validated (GenTx (ShelleyBlock proto era))) x # to ∷ Rep (Validated (GenTx (ShelleyBlock proto era))) x → Validated (GenTx (ShelleyBlock proto era)) # | |||||
Generic (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Associated Types
Methods from ∷ GenTx ByronBlock → Rep (GenTx ByronBlock) x # to ∷ Rep (GenTx ByronBlock) x → GenTx ByronBlock # | |||||
Generic (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Associated Types
Methods from ∷ GenTx (ShelleyBlock proto era) → Rep (GenTx (ShelleyBlock proto era)) x # to ∷ Rep (GenTx (ShelleyBlock proto era)) x → GenTx (ShelleyBlock proto era) # | |||||
Bridge m a ⇒ Show (Validated (GenTx (DualBlock m a))) | |||||
Show (Validated (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
ShelleyBasedEra era ⇒ Show (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
Bridge m a ⇒ Show (GenTx (DualBlock m a)) | |||||
Show (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
ShelleyBasedEra era ⇒ Show (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
Show (GenTxId ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
Show (GenTxId (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
Show (GenTxId m) ⇒ Show (TxId (GenTx (DualBlock m a))) | |||||
Eq (Validated (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods (==) ∷ Validated (GenTx ByronBlock) → Validated (GenTx ByronBlock) → Bool # (/=) ∷ Validated (GenTx ByronBlock) → Validated (GenTx ByronBlock) → Bool # | |||||
ShelleyBasedEra era ⇒ Eq (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods (==) ∷ Validated (GenTx (ShelleyBlock proto era)) → Validated (GenTx (ShelleyBlock proto era)) → Bool # (/=) ∷ Validated (GenTx (ShelleyBlock proto era)) → Validated (GenTx (ShelleyBlock proto era)) → Bool # | |||||
Eq (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods (==) ∷ GenTx ByronBlock → GenTx ByronBlock → Bool # (/=) ∷ GenTx ByronBlock → GenTx ByronBlock → Bool # | |||||
ShelleyBasedEra era ⇒ Eq (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods (==) ∷ GenTx (ShelleyBlock proto era) → GenTx (ShelleyBlock proto era) → Bool # (/=) ∷ GenTx (ShelleyBlock proto era) → GenTx (ShelleyBlock proto era) → Bool # | |||||
Eq (GenTxId m) ⇒ Eq (TxId (GenTx (DualBlock m a))) | |||||
Eq (TxId (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods (==) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (/=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # | |||||
Eq (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods (==) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (/=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # | |||||
Ord (GenTxId m) ⇒ Ord (TxId (GenTx (DualBlock m a))) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods compare ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Ordering # (<) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (<=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (>) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (>=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # max ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) # min ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) # | |||||
Ord (TxId (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods compare ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Ordering # (<) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (<=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (>) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (>=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # max ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) # min ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) # | |||||
Ord (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods compare ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Ordering # (<) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (<=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (>) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (>=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # max ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) # min ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) # | |||||
NoThunks (Validated (GenTx (DualBlock m a))) | |||||
NoThunks (Validated (GenTx ByronBlock)) Source # | |||||
ShelleyBasedEra era ⇒ NoThunks (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
NoThunks (GenTx (DualBlock m a)) | |||||
NoThunks (GenTx ByronBlock) Source # | |||||
ShelleyBasedEra era ⇒ NoThunks (GenTx (ShelleyBlock proto era)) Source # | |||||
NoThunks (TxId (GenTx (DualBlock m a))) | |||||
NoThunks (TxId (GenTx ByronBlock)) Source # | |||||
NoThunks (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
ConvertRawTxId (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods toRawTxIdHash ∷ TxId (GenTx ByronBlock) → ShortByteString Source # | |||||
ShelleyBasedEra era ⇒ ConvertRawTxId (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods toRawTxIdHash ∷ TxId (GenTx (ShelleyBlock proto era)) → ShortByteString Source # | |||||
Bridge m a ⇒ HasTxId (GenTx (DualBlock m a)) | |||||
HasTxId (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods txId ∷ GenTx ByronBlock → TxId (GenTx ByronBlock) Source # | |||||
ShelleyBasedEra era ⇒ HasTxId (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods txId ∷ GenTx (ShelleyBlock proto era) → TxId (GenTx (ShelleyBlock proto era)) Source # | |||||
Condense (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
ShelleyBasedEra era ⇒ Condense (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
Condense (GenTxId ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
Condense (GenTxId (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
ShelleyCompatible proto era ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (GenTx (ShelleyBlock proto era)) Source # | Uses CBOR-in-CBOR in the | ||||
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → GenTx (ShelleyBlock proto era) → Encoding Source # decodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ∀ s. Decoder s (GenTx (ShelleyBlock proto era)) Source # | |||||
ShelleyCompatible proto era ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (GenTxId (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → GenTxId (ShelleyBlock proto era) → Encoding Source # decodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ∀ s. Decoder s (GenTxId (ShelleyBlock proto era)) Source # | |||||
ShelleyCompatible proto era ⇒ SerialiseNodeToNode (ShelleyBlock proto era) (GenTx (ShelleyBlock proto era)) Source # | The | ||||
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToNodeVersion (ShelleyBlock proto era) → GenTx (ShelleyBlock proto era) → Encoding Source # decodeNodeToNode ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToNodeVersion (ShelleyBlock proto era) → ∀ s. Decoder s (GenTx (ShelleyBlock proto era)) Source # | |||||
ShelleyCompatible proto era ⇒ SerialiseNodeToNode (ShelleyBlock proto era) (GenTxId (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToNodeVersion (ShelleyBlock proto era) → GenTxId (ShelleyBlock proto era) → Encoding Source # decodeNodeToNode ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToNodeVersion (ShelleyBlock proto era) → ∀ s. Decoder s (GenTxId (ShelleyBlock proto era)) Source # | |||||
data GenTx ByronBlock Source # | Generalized transactions in Byron This is effectively the same as | ||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
type TranslationError era (GenTx :.: ShelleyBlock proto) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.ShelleyHFC | |||||
type Rep (Validated (GenTx (HardForkBlock xs))) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (Validated (GenTx (HardForkBlock xs))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs)))) | |||||
type Rep (Validated (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool type Rep (Validated (GenTx ByronBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'True) (C1 ('MetaCons "ValidatedByronTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronBlock)))) | |||||
type Rep (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool type Rep (Validated (GenTx (ShelleyBlock proto era))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyValidatedTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Validated (Tx era))))) | |||||
type Rep (GenTx (HardForkBlock xs)) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (GenTx (HardForkBlock xs)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTx xs)))) | |||||
type Rep (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool type Rep (GenTx ByronBlock) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) ((C1 ('MetaCons "ByronTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ATxAux ByteString))) :+: C1 ('MetaCons "ByronDlg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CertificateId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ACertificate ByteString)))) :+: (C1 ('MetaCons "ByronUpdateProposal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UpId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (AProposal ByteString))) :+: C1 ('MetaCons "ByronUpdateVote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 VoteId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (AVote ByteString))))) | |||||
type Rep (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool type Rep (GenTx (ShelleyBlock proto era)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Tx era)))) | |||||
type Rep (TxId (GenTx (HardForkBlock xs))) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs)))) | |||||
newtype Validated (GenTx (HardForkBlock xs)) | |||||
data Validated (GenTx (DualBlock m a)) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual data Validated (GenTx (DualBlock m a)) = ValidatedDualGenTx {
| |||||
newtype Validated (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
data Validated (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
newtype GenTx (HardForkBlock xs) | |||||
newtype TxId (GenTx (HardForkBlock xs)) | |||||
newtype TxId (GenTx (DualBlock m a)) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
data TxId (GenTx ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
newtype TxId (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
data GenTx (DualBlock m a) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual data GenTx (DualBlock m a) = DualGenTx {
| |||||
data GenTx (ShelleyBlock proto era) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool |
data HardForkApplyTxErr (xs ∷ [Type]) where Source #
Bundled Patterns
pattern ApplyTxErrAllegra ∷ ApplyTxErr (ShelleyBlock (TPraos c) AllegraEra) → CardanoApplyTxErr c | |
pattern ApplyTxErrAlonzo ∷ ApplyTxErr (ShelleyBlock (TPraos c) AlonzoEra) → CardanoApplyTxErr c | |
pattern ApplyTxErrByron ∷ ApplyTxErr ByronBlock → CardanoApplyTxErr c | |
pattern ApplyTxErrMary ∷ ApplyTxErr (ShelleyBlock (TPraos c) MaryEra) → CardanoApplyTxErr c | |
pattern ApplyTxErrShelley ∷ ApplyTxErr (ShelleyBlock (TPraos c) ShelleyEra) → CardanoApplyTxErr c | |
pattern ApplyTxErrWrongEra ∷ EraMismatch → CardanoApplyTxErr c | |
pattern ApplyTxErrBabbage ∷ ApplyTxErr (ShelleyBlock (Praos c) BabbageEra) → CardanoApplyTxErr c | |
pattern ApplyTxErrConway ∷ ApplyTxErr (ShelleyBlock (Praos c) ConwayEra) → CardanoApplyTxErr c |
Instances
Typeable xs ⇒ ShowProxy (HardForkApplyTxErr xs ∷ Type) | |||||
Generic (HardForkApplyTxErr xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool Associated Types
Methods from ∷ HardForkApplyTxErr xs → Rep (HardForkApplyTxErr xs) x # to ∷ Rep (HardForkApplyTxErr xs) x → HardForkApplyTxErr xs # | |||||
CanHardFork xs ⇒ Show (HardForkApplyTxErr xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool Methods showsPrec ∷ Int → HardForkApplyTxErr xs → ShowS # show ∷ HardForkApplyTxErr xs → String # showList ∷ [HardForkApplyTxErr xs] → ShowS # | |||||
CanHardFork xs ⇒ Eq (HardForkApplyTxErr xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool Methods (==) ∷ HardForkApplyTxErr xs → HardForkApplyTxErr xs → Bool # (/=) ∷ HardForkApplyTxErr xs → HardForkApplyTxErr xs → Bool # | |||||
type Rep (HardForkApplyTxErr xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (HardForkApplyTxErr xs) = D1 ('MetaData "HardForkApplyTxErr" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "HardForkApplyTxErrFromEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (OneEraApplyTxErr xs))) :+: C1 ('MetaCons "HardForkApplyTxErrWrongEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (MismatchEraInfo xs)))) |
A generalized transaction, GenTx
, identifier.
Instances
SerialiseNodeToClient ByronBlock (GenTxId ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation | |
SerialiseNodeToNode ByronBlock (GenTxId ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation | |
(Typeable m, Typeable a) ⇒ ShowProxy (TxId (GenTx (DualBlock m a)) ∷ Type) | |
ShowProxy (TxId (GenTx ByronBlock)) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
(Typeable era, Typeable proto) ⇒ ShowProxy (TxId (GenTx (ShelleyBlock proto era)) ∷ Type) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
(Typeable era, Typeable proto, Crypto (ProtoCrypto proto)) ⇒ DecCBOR (TxId (GenTx (ShelleyBlock proto era))) Source # | |
(Typeable era, Typeable proto, Crypto (ProtoCrypto proto)) ⇒ EncCBOR (TxId (GenTx (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods encCBOR ∷ TxId (GenTx (ShelleyBlock proto era)) → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (TxId (GenTx (ShelleyBlock proto era))) → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [TxId (GenTx (ShelleyBlock proto era))] → Size Source # | |
Show (GenTxId ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
Show (GenTxId (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
Show (GenTxId m) ⇒ Show (TxId (GenTx (DualBlock m a))) | |
Eq (GenTxId m) ⇒ Eq (TxId (GenTx (DualBlock m a))) | |
Eq (TxId (GenTx ByronBlock)) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods (==) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (/=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # | |
Eq (TxId (GenTx (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods (==) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (/=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # | |
Ord (GenTxId m) ⇒ Ord (TxId (GenTx (DualBlock m a))) | |
Defined in Ouroboros.Consensus.Ledger.Dual Methods compare ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Ordering # (<) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (<=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (>) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # (>=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool # max ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) # min ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) # | |
Ord (TxId (GenTx ByronBlock)) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods compare ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Ordering # (<) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (<=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (>) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (>=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # max ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) # min ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) # | |
Ord (TxId (GenTx (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods compare ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Ordering # (<) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (<=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (>) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (>=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # max ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) # min ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) # | |
NoThunks (TxId (GenTx (DualBlock m a))) | |
NoThunks (TxId (GenTx ByronBlock)) Source # | |
NoThunks (TxId (GenTx (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
Condense (GenTxId ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
Condense (GenTxId (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
ShelleyCompatible proto era ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (GenTxId (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → GenTxId (ShelleyBlock proto era) → Encoding Source # decodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ∀ s. Decoder s (GenTxId (ShelleyBlock proto era)) Source # | |
ShelleyCompatible proto era ⇒ SerialiseNodeToNode (ShelleyBlock proto era) (GenTxId (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToNodeVersion (ShelleyBlock proto era) → GenTxId (ShelleyBlock proto era) → Encoding Source # decodeNodeToNode ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToNodeVersion (ShelleyBlock proto era) → ∀ s. Decoder s (GenTxId (ShelleyBlock proto era)) Source # | |
type Rep (TxId (GenTx (HardForkBlock xs))) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs)))) | |
newtype TxId (GenTx (HardForkBlock xs)) | |
newtype TxId (GenTx (DualBlock m a)) | |
Defined in Ouroboros.Consensus.Ledger.Dual | |
data TxId (GenTx ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
newtype TxId (GenTx (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool |
LedgerError
type CardanoLedgerError c = HardForkLedgerError (CardanoEras c) Source #
An error resulting from applying a CardanoBlock
to the ledger.
Thanks to the pattern synonyms, you can treat this as a sum type with
constructors LedgerErrorByron
, LedgerErrorShelley
, and
LedgerErrorWrongEra
.
toText :: CardanoLedgerError c -> Text toText (LedgerErrorByron b) = byronLedgerErrorToText b toText (LedgerErrorShelley s) = shelleyLedgerErrorToText s toText (LedgerErrorAllegra a) = allegraLedgerErrorToText a toText (LedgerErrorMary m) = maryLedgerErrorToText m toText (LedgerErrorWrongEra eraMismatch) = "Block from the " <> otherEraName eraMismatch <> " era applied to a ledger from the " <> ledgerEraName eraMismatch <> " era"
data HardForkLedgerError (xs ∷ [Type]) where Source #
Bundled Patterns
pattern LedgerErrorAllegra ∷ LedgerError (ShelleyBlock (TPraos c) AllegraEra) → CardanoLedgerError c | |
pattern LedgerErrorAlonzo ∷ LedgerError (ShelleyBlock (TPraos c) AlonzoEra) → CardanoLedgerError c | |
pattern LedgerErrorByron ∷ LedgerError ByronBlock → CardanoLedgerError c | |
pattern LedgerErrorMary ∷ LedgerError (ShelleyBlock (TPraos c) MaryEra) → CardanoLedgerError c | |
pattern LedgerErrorShelley ∷ LedgerError (ShelleyBlock (TPraos c) ShelleyEra) → CardanoLedgerError c | |
pattern LedgerErrorWrongEra ∷ EraMismatch → CardanoLedgerError c | |
pattern LedgerErrorBabbage ∷ LedgerError (ShelleyBlock (Praos c) BabbageEra) → CardanoLedgerError c | |
pattern LedgerErrorConway ∷ LedgerError (ShelleyBlock (Praos c) ConwayEra) → CardanoLedgerError c |
Instances
Generic (HardForkLedgerError xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger Associated Types
Methods from ∷ HardForkLedgerError xs → Rep (HardForkLedgerError xs) x # to ∷ Rep (HardForkLedgerError xs) x → HardForkLedgerError xs # | |||||
CanHardFork xs ⇒ Show (HardForkLedgerError xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger Methods showsPrec ∷ Int → HardForkLedgerError xs → ShowS # show ∷ HardForkLedgerError xs → String # showList ∷ [HardForkLedgerError xs] → ShowS # | |||||
CanHardFork xs ⇒ Eq (HardForkLedgerError xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger Methods (==) ∷ HardForkLedgerError xs → HardForkLedgerError xs → Bool # (/=) ∷ HardForkLedgerError xs → HardForkLedgerError xs → Bool # | |||||
CanHardFork xs ⇒ NoThunks (HardForkLedgerError xs) | |||||
type Rep (HardForkLedgerError xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger type Rep (HardForkLedgerError xs) = D1 ('MetaData "HardForkLedgerError" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "HardForkLedgerErrorFromEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraLedgerError xs))) :+: C1 ('MetaCons "HardForkLedgerErrorWrongEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MismatchEraInfo xs)))) |
OtherEnvelopeError
type CardanoOtherHeaderEnvelopeError c = HardForkEnvelopeErr (CardanoEras c) Source #
An error resulting from validating a CardanoHeader
.
data HardForkEnvelopeErr (xs ∷ [Type]) where Source #
Bundled Patterns
pattern OtherHeaderEnvelopeErrorAllegra ∷ OtherHeaderEnvelopeError (ShelleyBlock (TPraos c) AllegraEra) → CardanoOtherHeaderEnvelopeError c | |
pattern OtherHeaderEnvelopeErrorBabbage ∷ OtherHeaderEnvelopeError (ShelleyBlock (Praos c) BabbageEra) → CardanoOtherHeaderEnvelopeError c | |
pattern OtherHeaderEnvelopeErrorConway ∷ OtherHeaderEnvelopeError (ShelleyBlock (Praos c) ConwayEra) → CardanoOtherHeaderEnvelopeError c | |
pattern OtherHeaderEnvelopeErrorAlonzo ∷ OtherHeaderEnvelopeError (ShelleyBlock (TPraos c) AlonzoEra) → CardanoOtherHeaderEnvelopeError c | |
pattern OtherHeaderEnvelopeErrorByron ∷ OtherHeaderEnvelopeError ByronBlock → CardanoOtherHeaderEnvelopeError c | |
pattern OtherHeaderEnvelopeErrorMary ∷ OtherHeaderEnvelopeError (ShelleyBlock (TPraos c) MaryEra) → CardanoOtherHeaderEnvelopeError c | |
pattern OtherHeaderEnvelopeErrorShelley ∷ OtherHeaderEnvelopeError (ShelleyBlock (TPraos c) ShelleyEra) → CardanoOtherHeaderEnvelopeError c | |
pattern OtherHeaderEnvelopeErrorWrongEra ∷ EraMismatch → CardanoOtherHeaderEnvelopeError c |
Instances
Generic (HardForkEnvelopeErr xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger Associated Types
Methods from ∷ HardForkEnvelopeErr xs → Rep (HardForkEnvelopeErr xs) x # to ∷ Rep (HardForkEnvelopeErr xs) x → HardForkEnvelopeErr xs # | |||||
CanHardFork xs ⇒ Show (HardForkEnvelopeErr xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger Methods showsPrec ∷ Int → HardForkEnvelopeErr xs → ShowS # show ∷ HardForkEnvelopeErr xs → String # showList ∷ [HardForkEnvelopeErr xs] → ShowS # | |||||
CanHardFork xs ⇒ Eq (HardForkEnvelopeErr xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger Methods (==) ∷ HardForkEnvelopeErr xs → HardForkEnvelopeErr xs → Bool # (/=) ∷ HardForkEnvelopeErr xs → HardForkEnvelopeErr xs → Bool # | |||||
CanHardFork xs ⇒ NoThunks (HardForkEnvelopeErr xs) | |||||
type Rep (HardForkEnvelopeErr xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger type Rep (HardForkEnvelopeErr xs) = D1 ('MetaData "HardForkEnvelopeErr" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "HardForkEnvelopeErrFromEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraEnvelopeErr xs))) :+: C1 ('MetaCons "HardForkEnvelopeErrWrongEra" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MismatchEraInfo xs)))) |
TipInfo
type CardanoTipInfo c = OneEraTipInfo (CardanoEras c) Source #
The TipInfo
of the Cardano chain.
data OneEraTipInfo (xs ∷ [Type]) where Source #
Bundled Patterns
pattern TipInfoAllegra ∷ TipInfo (ShelleyBlock (TPraos c) AllegraEra) → CardanoTipInfo c | |
pattern TipInfoAlonzo ∷ TipInfo (ShelleyBlock (TPraos c) AlonzoEra) → CardanoTipInfo c | |
pattern TipInfoByron ∷ TipInfo ByronBlock → CardanoTipInfo c | |
pattern TipInfoBabbage ∷ TipInfo (ShelleyBlock (Praos c) BabbageEra) → CardanoTipInfo c | |
pattern TipInfoConway ∷ TipInfo (ShelleyBlock (Praos c) ConwayEra) → CardanoTipInfo c | |
pattern TipInfoMary ∷ TipInfo (ShelleyBlock (TPraos c) MaryEra) → CardanoTipInfo c | |
pattern TipInfoShelley ∷ TipInfo (ShelleyBlock (TPraos c) ShelleyEra) → CardanoTipInfo c |
Instances
CanHardFork xs ⇒ Show (OneEraTipInfo xs) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras Methods showsPrec ∷ Int → OneEraTipInfo xs → ShowS # show ∷ OneEraTipInfo xs → String # showList ∷ [OneEraTipInfo xs] → ShowS # | |
CanHardFork xs ⇒ Eq (OneEraTipInfo xs) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras Methods (==) ∷ OneEraTipInfo xs → OneEraTipInfo xs → Bool # (/=) ∷ OneEraTipInfo xs → OneEraTipInfo xs → Bool # | |
CanHardFork xs ⇒ NoThunks (OneEraTipInfo xs) | |
Query
data family BlockQuery ∷ Type → QueryFootprint → Type → Type Source #
Different queries supported by the ledger, indexed by the result type.
Instances
SerialiseBlockQueryResult ByronBlock BlockQuery Source # | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation Methods encodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig ByronBlock → BlockNodeToClientVersion ByronBlock → BlockQuery ByronBlock fp result → result → Encoding Source # decodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig ByronBlock → BlockNodeToClientVersion ByronBlock → BlockQuery ByronBlock fp result → ∀ s. Decoder s result Source # | |
SameDepIndex2 (BlockQuery (DualBlock m a) ∷ QueryFootprint → Type → Type) | |
Defined in Ouroboros.Consensus.Ledger.Dual Methods sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a0 (y ∷ QueryFootprint) b. BlockQuery (DualBlock m a) x a0 → BlockQuery (DualBlock m a) y b → Maybe ('(x, a0) :~: '(y, b)) Source # | |
SameDepIndex2 (BlockQuery ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery ByronBlock x a → BlockQuery ByronBlock y b → Maybe ('(x, a) :~: '(y, b)) Source # | |
SameDepIndex2 (BlockQuery (ShelleyBlock proto era) ∷ QueryFootprint → Type → Type) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery (ShelleyBlock proto era) x a → BlockQuery (ShelleyBlock proto era) y b → Maybe ('(x, a) :~: '(y, b)) Source # | |
SerialiseNodeToClient ByronBlock (SomeBlockQuery (BlockQuery ByronBlock)) Source # | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation | |
ShelleyCompatible proto era ⇒ SerialiseBlockQueryResult (ShelleyBlock proto era) BlockQuery Source # | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) fp result → result → Encoding Source # decodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) fp result → ∀ s. Decoder s result Source # | |
(∀ (footprint ∷ QueryFootprint) result. Show (BlockQuery blk footprint result)) ⇒ Show (SomeBlockQuery (BlockQuery blk)) | |
Defined in Ouroboros.Consensus.Ledger.Query Methods showsPrec ∷ Int → SomeBlockQuery (BlockQuery blk) → ShowS # show ∷ SomeBlockQuery (BlockQuery blk) → String # showList ∷ [SomeBlockQuery (BlockQuery blk)] → ShowS # | |
ShowQuery (BlockQuery (DualBlock m a) footprint) | |
Defined in Ouroboros.Consensus.Ledger.Dual Methods showResult ∷ BlockQuery (DualBlock m a) footprint result → result → String Source # | |
ShowQuery (BlockQuery ByronBlock fp) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods showResult ∷ BlockQuery ByronBlock fp result → result → String Source # | |
ShelleyCompatible proto era ⇒ ShowQuery (BlockQuery (ShelleyBlock proto era) fp) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods showResult ∷ BlockQuery (ShelleyBlock proto era) fp result → result → String Source # | |
(ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era)) ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (SomeBlockQuery (BlockQuery (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → SomeBlockQuery (BlockQuery (ShelleyBlock proto era)) → Encoding Source # decodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ∀ s. Decoder s (SomeBlockQuery (BlockQuery (ShelleyBlock proto era))) Source # | |
(Typeable m, Typeable a) ⇒ ShowProxy (BlockQuery (DualBlock m a) ∷ QueryFootprint → Type → Type) | |
Defined in Ouroboros.Consensus.Ledger.Dual | |
ShowProxy (BlockQuery ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods showProxy ∷ Proxy (BlockQuery ByronBlock) → String Source # | |
(Typeable era, Typeable proto) ⇒ ShowProxy (BlockQuery (ShelleyBlock proto era) ∷ QueryFootprint → Type → Type) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods showProxy ∷ Proxy (BlockQuery (ShelleyBlock proto era)) → String Source # | |
Show (BlockQuery (DualBlock m a) footprint result) | |
Defined in Ouroboros.Consensus.Ledger.Dual | |
Show (BlockQuery ByronBlock fp result) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods showsPrec ∷ Int → BlockQuery ByronBlock fp result → ShowS # show ∷ BlockQuery ByronBlock fp result → String # showList ∷ [BlockQuery ByronBlock fp result] → ShowS # | |
Show (BlockQuery (ShelleyBlock proto era) fp result) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods showsPrec ∷ Int → BlockQuery (ShelleyBlock proto era) fp result → ShowS # show ∷ BlockQuery (ShelleyBlock proto era) fp result → String # showList ∷ [BlockQuery (ShelleyBlock proto era) fp result] → ShowS # | |
Eq (BlockQuery ByronBlock fp result) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods (==) ∷ BlockQuery ByronBlock fp result → BlockQuery ByronBlock fp result → Bool # (/=) ∷ BlockQuery ByronBlock fp result → BlockQuery ByronBlock fp result → Bool # | |
Eq (BlockQuery (ShelleyBlock proto era) fp result) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query Methods (==) ∷ BlockQuery (ShelleyBlock proto era) fp result → BlockQuery (ShelleyBlock proto era) fp result → Bool # (/=) ∷ BlockQuery (ShelleyBlock proto era) fp result → BlockQuery (ShelleyBlock proto era) fp result → Bool # | |
Inject (SomeBlockQuery :.: BlockQuery) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary Methods inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → (SomeBlockQuery :.: BlockQuery) x → (SomeBlockQuery :.: BlockQuery) (HardForkBlock xs) Source # | |
data BlockQuery ByronBlock fp result Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |
data BlockQuery (HardForkBlock xs) footprint result | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query data BlockQuery (HardForkBlock xs) footprint result where
| |
data BlockQuery (DualBlock m a) footprint result | |
Defined in Ouroboros.Consensus.Ledger.Dual | |
data BlockQuery (ShelleyBlock proto era) fp result Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Query data BlockQuery (ShelleyBlock proto era) fp result where
|
type CardanoQuery c = BlockQuery (CardanoBlock c) Source #
The Query
of Cardano chain.
type CardanoQueryResult c = HardForkQueryResult (CardanoEras c) Source #
The result of a CardanoQuery
Thanks to the pattern synonyms, you can treat this as a sum type with
constructors QueryResultSuccess
and QueryResultEraMismatch
.
The Either
type represents values with two possibilities: a value of
type
is either Either
a b
or Left
a
.Right
b
The Either
type is sometimes used to represent a value which is
either correct or an error; by convention, the Left
constructor is
used to hold an error value and the Right
constructor is used to
hold a correct value (mnemonic: "right" also means "correct").
Examples
The type
is the type of values which can be either
a Either
String
Int
String
or an Int
. The Left
constructor can be used only on
String
s, and the Right
constructor can be used only on Int
s:
>>>
let s = Left "foo" :: Either String Int
>>>
s
Left "foo">>>
let n = Right 3 :: Either String Int
>>>
n
Right 3>>>
:type s
s :: Either String Int>>>
:type n
n :: Either String Int
The fmap
from our Functor
instance will ignore Left
values, but
will apply the supplied function to values contained in a Right
:
>>>
let s = Left "foo" :: Either String Int
>>>
let n = Right 3 :: Either String Int
>>>
fmap (*2) s
Left "foo">>>
fmap (*2) n
Right 6
The Monad
instance for Either
allows us to chain together multiple
actions which may fail, and fail overall if any of the individual
steps failed. First we'll write a function that can either parse an
Int
from a Char
, or fail.
>>>
import Data.Char ( digitToInt, isDigit )
>>>
:{
let parseEither :: Char -> Either String Int parseEither c | isDigit c = Right (digitToInt c) | otherwise = Left "parse error">>>
:}
The following should work, since both '1'
and '2'
can be
parsed as Int
s.
>>>
:{
let parseMultiple :: Either String Int parseMultiple = do x <- parseEither '1' y <- parseEither '2' return (x + y)>>>
:}
>>>
parseMultiple
Right 3
But the following should fail overall, since the first operation where
we attempt to parse 'm'
as an Int
will fail:
>>>
:{
let parseMultiple :: Either String Int parseMultiple = do x <- parseEither 'm' y <- parseEither '2' return (x + y)>>>
:}
>>>
parseMultiple
Left "parse error"
Bundled Patterns
pattern QueryResultSuccess ∷ result → CardanoQueryResult c result | |
pattern QueryResultEraMismatch ∷ EraMismatch → CardanoQueryResult c result | A query from a different era than the ledger's era was sent. |
Instances
FromJSON2 Either | |||||
Defined in Data.Aeson.Types.FromJSON Methods liftParseJSON2 ∷ Maybe a → (Value → Parser a) → (Value → Parser [a]) → Maybe b → (Value → Parser b) → (Value → Parser [b]) → Value → Parser (Either a b) Source # liftParseJSONList2 ∷ Maybe a → (Value → Parser a) → (Value → Parser [a]) → Maybe b → (Value → Parser b) → (Value → Parser [b]) → Value → Parser [Either a b] Source # liftOmittedField2 ∷ Maybe a → Maybe b → Maybe (Either a b) Source # | |||||
ToJSON2 Either | |||||
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON2 ∷ (a → Bool) → (a → Value) → ([a] → Value) → (b → Bool) → (b → Value) → ([b] → Value) → Either a b → Value Source # liftToJSONList2 ∷ (a → Bool) → (a → Value) → ([a] → Value) → (b → Bool) → (b → Value) → ([b] → Value) → [Either a b] → Value Source # liftToEncoding2 ∷ (a → Bool) → (a → Encoding) → ([a] → Encoding) → (b → Bool) → (b → Encoding) → ([b] → Encoding) → Either a b → Encoding Source # liftToEncodingList2 ∷ (a → Bool) → (a → Encoding) → ([a] → Encoding) → (b → Bool) → (b → Encoding) → ([b] → Encoding) → [Either a b] → Encoding Source # liftOmitField2 ∷ (a → Bool) → (b → Bool) → Either a b → Bool Source # | |||||
Bifoldable Either | Since: base-4.10.0.0 | ||||
Bifoldable1 Either | |||||
Defined in Data.Bifoldable1 | |||||
Bifunctor Either | Since: base-4.8.0.0 | ||||
Bitraversable Either | Since: base-4.10.0.0 | ||||
Defined in Data.Bitraversable Methods bitraverse ∷ Applicative f ⇒ (a → f c) → (b → f d) → Either a b → f (Either c d) # | |||||
Eq2 Either | Since: base-4.9.0.0 | ||||
Ord2 Either | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Classes | |||||
Read2 Either | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Classes Methods liftReadsPrec2 ∷ (Int → ReadS a) → ReadS [a] → (Int → ReadS b) → ReadS [b] → Int → ReadS (Either a b) # liftReadList2 ∷ (Int → ReadS a) → ReadS [a] → (Int → ReadS b) → ReadS [b] → ReadS [Either a b] # liftReadPrec2 ∷ ReadPrec a → ReadPrec [a] → ReadPrec b → ReadPrec [b] → ReadPrec (Either a b) # liftReadListPrec2 ∷ ReadPrec a → ReadPrec [a] → ReadPrec b → ReadPrec [b] → ReadPrec [Either a b] # | |||||
Show2 Either | Since: base-4.9.0.0 | ||||
NFData2 Either | Since: deepseq-1.4.3.0 | ||||
Defined in Control.DeepSeq | |||||
Hashable2 Either | |||||
Validate Either | |||||
Defined in Data.Validation | |||||
Generic1 (Either a ∷ Type → Type) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
MonadError e (Either e) | |||||
Defined in Control.Monad.Error.Class | |||||
(Lift a, Lift b) ⇒ Lift (Either a b ∷ Type) | |||||
FromJSON a ⇒ FromJSON1 (Either a) | |||||
Defined in Data.Aeson.Types.FromJSON | |||||
ToJSON a ⇒ ToJSON1 (Either a) | |||||
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON ∷ (a0 → Bool) → (a0 → Value) → ([a0] → Value) → Either a a0 → Value Source # liftToJSONList ∷ (a0 → Bool) → (a0 → Value) → ([a0] → Value) → [Either a a0] → Value Source # liftToEncoding ∷ (a0 → Bool) → (a0 → Encoding) → ([a0] → Encoding) → Either a a0 → Encoding Source # liftToEncodingList ∷ (a0 → Bool) → (a0 → Encoding) → ([a0] → Encoding) → [Either a a0] → Encoding Source # | |||||
Eq a ⇒ Eq1 (Either a) | Since: base-4.9.0.0 | ||||
Ord a ⇒ Ord1 (Either a) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Classes | |||||
Read a ⇒ Read1 (Either a) | Since: base-4.9.0.0 | ||||
Defined in Data.Functor.Classes | |||||
Show a ⇒ Show1 (Either a) | Since: base-4.9.0.0 | ||||
MonadFailure (Either a) | |||||
NFData a ⇒ NFData1 (Either a) | Since: deepseq-1.4.3.0 | ||||
Defined in Control.DeepSeq | |||||
Applicative (Either e) | @since base-3.0 | ||||
Functor (Either a) | @since base-3.0 | ||||
Monad (Either e) | @since base-4.4.0.0 | ||||
Foldable (Either a) | @since base-4.7.0.0 | ||||
Defined in GHC.Internal.Data.Foldable Methods fold ∷ Monoid m ⇒ Either a m → m # foldMap ∷ Monoid m ⇒ (a0 → m) → Either a a0 → m # foldMap' ∷ Monoid m ⇒ (a0 → m) → Either a a0 → m # foldr ∷ (a0 → b → b) → b → Either a a0 → b # foldr' ∷ (a0 → b → b) → b → Either a a0 → b # foldl ∷ (b → a0 → b) → b → Either a a0 → b # foldl' ∷ (b → a0 → b) → b → Either a a0 → b # foldr1 ∷ (a0 → a0 → a0) → Either a a0 → a0 # foldl1 ∷ (a0 → a0 → a0) → Either a a0 → a0 # elem ∷ Eq a0 ⇒ a0 → Either a a0 → Bool # maximum ∷ Ord a0 ⇒ Either a a0 → a0 # minimum ∷ Ord a0 ⇒ Either a a0 → a0 # | |||||
Traversable (Either a) | @since base-4.7.0.0 | ||||
Hashable a ⇒ Hashable1 (Either a) | |||||
Defined in Data.Hashable.Class | |||||
MonadBaseControl (Either e) (Either e) | |||||
MonadBase (Either e) (Either e) | |||||
(Structured a, Structured b) ⇒ Structured (Either a b) | |||||
Defined in Distribution.Utils.Structured | |||||
(FromJSON a, FromJSON b) ⇒ FromJSON (Either a b) | |||||
(ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |||||
(FromCBOR a, FromCBOR b) ⇒ FromCBOR (Either a b) | |||||
(ToCBOR a, ToCBOR b) ⇒ ToCBOR (Either a b) | |||||
(DecCBOR a, DecCBOR b) ⇒ DecCBOR (Either a b) | |||||
(EncCBOR a, EncCBOR b) ⇒ EncCBOR (Either a b) | |||||
(NFData a, NFData b) ⇒ NFData (Either a b) | |||||
Defined in Control.DeepSeq | |||||
Semigroup (Either a b) | @since base-4.9.0.0 | ||||
Generic (Either a b) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
(Read a, Read b) ⇒ Read (Either a b) | @since base-3.0 | ||||
(Show a, Show b) ⇒ Show (Either a b) | @since base-3.0 | ||||
(Eq a, Eq b) ⇒ Eq (Either a b) | @since base-2.01 | ||||
(Ord a, Ord b) ⇒ Ord (Either a b) | @since base-2.01 | ||||
Defined in GHC.Internal.Data.Either | |||||
(Hashable a, Hashable b) ⇒ Hashable (Either a b) | |||||
(MemPack a, MemPack b) ⇒ MemPack (Either a b) | |||||
MonoFoldable (Either a b) | |||||
Defined in Data.MonoTraversable Methods ofoldMap ∷ Monoid m ⇒ (Element (Either a b) → m) → Either a b → m Source # ofoldr ∷ (Element (Either a b) → b0 → b0) → b0 → Either a b → b0 Source # ofoldl' ∷ (a0 → Element (Either a b) → a0) → a0 → Either a b → a0 Source # otoList ∷ Either a b → [Element (Either a b)] Source # oall ∷ (Element (Either a b) → Bool) → Either a b → Bool Source # oany ∷ (Element (Either a b) → Bool) → Either a b → Bool Source # onull ∷ Either a b → Bool Source # olength ∷ Either a b → Int Source # olength64 ∷ Either a b → Int64 Source # ocompareLength ∷ Integral i ⇒ Either a b → i → Ordering Source # otraverse_ ∷ Applicative f ⇒ (Element (Either a b) → f b0) → Either a b → f () Source # ofor_ ∷ Applicative f ⇒ Either a b → (Element (Either a b) → f b0) → f () Source # omapM_ ∷ Applicative m ⇒ (Element (Either a b) → m ()) → Either a b → m () Source # oforM_ ∷ Applicative m ⇒ Either a b → (Element (Either a b) → m ()) → m () Source # ofoldlM ∷ Monad m ⇒ (a0 → Element (Either a b) → m a0) → a0 → Either a b → m a0 Source # ofoldMap1Ex ∷ Semigroup m ⇒ (Element (Either a b) → m) → Either a b → m Source # ofoldr1Ex ∷ (Element (Either a b) → Element (Either a b) → Element (Either a b)) → Either a b → Element (Either a b) Source # ofoldl1Ex' ∷ (Element (Either a b) → Element (Either a b) → Element (Either a b)) → Either a b → Element (Either a b) Source # headEx ∷ Either a b → Element (Either a b) Source # lastEx ∷ Either a b → Element (Either a b) Source # unsafeHead ∷ Either a b → Element (Either a b) Source # unsafeLast ∷ Either a b → Element (Either a b) Source # maximumByEx ∷ (Element (Either a b) → Element (Either a b) → Ordering) → Either a b → Element (Either a b) Source # minimumByEx ∷ (Element (Either a b) → Element (Either a b) → Ordering) → Either a b → Element (Either a b) Source # oelem ∷ Element (Either a b) → Either a b → Bool Source # onotElem ∷ Element (Either a b) → Either a b → Bool Source # | |||||
MonoFunctor (Either a b) | |||||
MonoPointed (Either a b) | |||||
MonoTraversable (Either a b) | |||||
(NoThunks a, NoThunks b) ⇒ NoThunks (Either a b) | |||||
(Ord a, Ord b) ⇒ Ord (Either a b) | |||||
Defined in PlutusTx.Ord | |||||
Corecursive (Either a b) | |||||
Defined in Data.Functor.Foldable Methods embed ∷ Base (Either a b) (Either a b) → Either a b Source # ana ∷ (a0 → Base (Either a b) a0) → a0 → Either a b Source # apo ∷ (a0 → Base (Either a b) (Either (Either a b) a0)) → a0 → Either a b Source # postpro ∷ Recursive (Either a b) ⇒ (∀ b0. Base (Either a b) b0 → Base (Either a b) b0) → (a0 → Base (Either a b) a0) → a0 → Either a b Source # gpostpro ∷ (Recursive (Either a b), Monad m) ⇒ (∀ b0. m (Base (Either a b) b0) → Base (Either a b) (m b0)) → (∀ c. Base (Either a b) c → Base (Either a b) c) → (a0 → Base (Either a b) (m a0)) → a0 → Either a b Source # | |||||
Recursive (Either a b) | |||||
Defined in Data.Functor.Foldable Methods project ∷ Either a b → Base (Either a b) (Either a b) Source # cata ∷ (Base (Either a b) a0 → a0) → Either a b → a0 Source # para ∷ (Base (Either a b) (Either a b, a0) → a0) → Either a b → a0 Source # gpara ∷ (Corecursive (Either a b), Comonad w) ⇒ (∀ b0. Base (Either a b) (w b0) → w (Base (Either a b) b0)) → (Base (Either a b) (EnvT (Either a b) w a0) → a0) → Either a b → a0 Source # prepro ∷ Corecursive (Either a b) ⇒ (∀ b0. Base (Either a b) b0 → Base (Either a b) b0) → (Base (Either a b) a0 → a0) → Either a b → a0 Source # gprepro ∷ (Corecursive (Either a b), Comonad w) ⇒ (∀ b0. Base (Either a b) (w b0) → w (Base (Either a b) b0)) → (∀ c. Base (Either a b) c → Base (Either a b) c) → (Base (Either a b) (w a0) → a0) → Either a b → a0 Source # | |||||
(Serialise a, Serialise b) ⇒ Serialise (Either a b) | Since: serialise-0.2.0.0 | ||||
(a ~ a', b ~ b') ⇒ Each (Either a a') (Either b b') a b | Since: microlens-0.4.11 | ||||
type Rep1 (Either a ∷ Type → Type) | @since base-4.6.0.0 | ||||
Defined in GHC.Internal.Generics type Rep1 (Either a ∷ Type → Type) = D1 ('MetaData "Either" "GHC.Internal.Data.Either" "ghc-internal" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) | |||||
type Failure (Either a) | |||||
Defined in Basement.Monad | |||||
type StM (Either e) a | |||||
Defined in Control.Monad.Trans.Control | |||||
type Rep (Either a b) | @since base-4.6.0.0 | ||||
Defined in GHC.Internal.Generics type Rep (Either a b) = D1 ('MetaData "Either" "GHC.Internal.Data.Either" "ghc-internal" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b))) | |||||
type Element (Either a b) | |||||
Defined in Data.MonoTraversable | |||||
type Base (Either a b) | Example boring stub for non-recursive data types | ||||
CodecConfig
type CardanoCodecConfig c = CodecConfig (CardanoBlock c) Source #
The CodecConfig
for CardanoBlock
.
Thanks to the pattern synonyms, you can treat this as the product of
the Byron, Shelley, ... CodecConfig
s.
data family CodecConfig blk Source #
Static configuration required for serialisation and deserialisation of types pertaining to this type of block.
Data family instead of type family to get better type inference.
Instances
Isomorphic CodecConfig | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ CodecConfig (HardForkBlock '[blk]) → CodecConfig blk Source # inject ∷ NoHardForks blk ⇒ CodecConfig blk → CodecConfig (HardForkBlock '[blk]) Source # | |||||
Generic (CodecConfig (DualBlock m a)) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Associated Types
Methods from ∷ CodecConfig (DualBlock m a) → Rep (CodecConfig (DualBlock m a)) x # to ∷ Rep (CodecConfig (DualBlock m a)) x → CodecConfig (DualBlock m a) # | |||||
Generic (CodecConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config Associated Types
Methods from ∷ CodecConfig ByronBlock → Rep (CodecConfig ByronBlock) x # to ∷ Rep (CodecConfig ByronBlock) x → CodecConfig ByronBlock # | |||||
Generic (CodecConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config Associated Types
Methods from ∷ CodecConfig (ShelleyBlock proto era) → Rep (CodecConfig (ShelleyBlock proto era)) x # to ∷ Rep (CodecConfig (ShelleyBlock proto era)) x → CodecConfig (ShelleyBlock proto era) # | |||||
CanHardFork xs ⇒ NoThunks (CodecConfig (HardForkBlock xs)) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (CodecConfig (HardForkBlock xs)) → String Source # | |||||
(NoThunks (CodecConfig m), NoThunks (CodecConfig a)) ⇒ NoThunks (CodecConfig (DualBlock m a)) | |||||
NoThunks (CodecConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config Methods noThunks ∷ Context → CodecConfig ByronBlock → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → CodecConfig ByronBlock → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (CodecConfig ByronBlock) → String Source # | |||||
NoThunks (CodecConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config Methods noThunks ∷ Context → CodecConfig (ShelleyBlock proto era) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → CodecConfig (ShelleyBlock proto era) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (CodecConfig (ShelleyBlock proto era)) → String Source # | |||||
newtype CodecConfig ByronBlock Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config | |||||
type Rep (CodecConfig (DualBlock m a)) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual type Rep (CodecConfig (DualBlock m a)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "DualCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualCodecConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig m)) :*: S1 ('MetaSel ('Just "dualCodecConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig a)))) | |||||
type Rep (CodecConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config type Rep (CodecConfig ByronBlock) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'True) (C1 ('MetaCons "ByronCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronEpochSlots") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochSlots))) | |||||
type Rep (CodecConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config | |||||
newtype CodecConfig (HardForkBlock xs) | |||||
data CodecConfig (DualBlock m a) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual data CodecConfig (DualBlock m a) = DualCodecConfig {
| |||||
data CodecConfig (ShelleyBlock proto era) Source # | No particular codec configuration is needed for Shelley | ||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config |
BlockConfig
data family BlockConfig blk Source #
Static configuration required to work with this type of blocks
Instances
Isomorphic BlockConfig | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ BlockConfig (HardForkBlock '[blk]) → BlockConfig blk Source # inject ∷ NoHardForks blk ⇒ BlockConfig blk → BlockConfig (HardForkBlock '[blk]) Source # | |||||
Generic (BlockConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config Associated Types
Methods from ∷ BlockConfig ByronBlock → Rep (BlockConfig ByronBlock) x # to ∷ Rep (BlockConfig ByronBlock) x → BlockConfig ByronBlock # | |||||
Generic (BlockConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config Associated Types
Methods from ∷ BlockConfig (ShelleyBlock proto era) → Rep (BlockConfig (ShelleyBlock proto era)) x # to ∷ Rep (BlockConfig (ShelleyBlock proto era)) x → BlockConfig (ShelleyBlock proto era) # | |||||
ShelleyBasedEra era ⇒ Show (BlockConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config Methods showsPrec ∷ Int → BlockConfig (ShelleyBlock proto era) → ShowS # show ∷ BlockConfig (ShelleyBlock proto era) → String # showList ∷ [BlockConfig (ShelleyBlock proto era)] → ShowS # | |||||
CanHardFork xs ⇒ NoThunks (BlockConfig (HardForkBlock xs)) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (BlockConfig (HardForkBlock xs)) → String Source # | |||||
NoThunks (BlockConfig (DualBlock m a)) | |||||
NoThunks (BlockConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config Methods noThunks ∷ Context → BlockConfig ByronBlock → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → BlockConfig ByronBlock → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (BlockConfig ByronBlock) → String Source # | |||||
ShelleyBasedEra era ⇒ NoThunks (BlockConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config Methods noThunks ∷ Context → BlockConfig (ShelleyBlock proto era) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → BlockConfig (ShelleyBlock proto era) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (BlockConfig (ShelleyBlock proto era)) → String Source # | |||||
data BlockConfig ByronBlock Source # | Extended configuration we need for Byron | ||||
type Rep (BlockConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config type Rep (BlockConfig ByronBlock) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.25.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 (BlockConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config type Rep (BlockConfig (ShelleyBlock proto era)) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Shelley.Ledger.Config" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "shelleyProtocolVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ProtVer) :*: S1 ('MetaSel ('Just "shelleySystemStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SystemStart)) :*: (S1 ('MetaSel ('Just "shelleyNetworkMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NetworkMagic) :*: (S1 ('MetaSel ('Just "shelleyBlockIssuerVKeys") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'BlockIssuer) (VKey 'BlockIssuer))) :*: S1 ('MetaSel ('Just "shelleyVRFTiebreakerFlavor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 VRFTiebreakerFlavor))))) | |||||
newtype BlockConfig (DisableDiffusionPipelining blk) | |||||
Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining newtype BlockConfig (DisableDiffusionPipelining blk) = DisableDiffusionPipeliningBlockConfig (BlockConfig blk) | |||||
newtype BlockConfig (SelectViewDiffusionPipelining blk) | |||||
Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining newtype BlockConfig (SelectViewDiffusionPipelining blk) = SelectViewDiffusionPipeliningBlockConfig (BlockConfig blk) | |||||
newtype BlockConfig (HardForkBlock xs) | |||||
data BlockConfig (DualBlock m a) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
data BlockConfig (ShelleyBlock proto era) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config |
type CardanoBlockConfig c = BlockConfig (CardanoBlock c) Source #
The BlockConfig
for CardanoBlock
.
Thanks to the pattern synonyms, you can treat this as the product of
the Byron, Shelley, ... BlockConfig
s.
StorageConfig
type CardanoStorageConfig c = StorageConfig (CardanoBlock c) Source #
The StorageConfig
for CardanoBlock
.
Thanks to the pattern synonyms, you can treat this as the product of
the Byron, Shelley, ... StorageConfig
s.
data family StorageConfig blk Source #
Config needed for the
NodeInitStorage
class. Defined here to
avoid circular dependencies.
Instances
Isomorphic StorageConfig | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ StorageConfig (HardForkBlock '[blk]) → StorageConfig blk Source # inject ∷ NoHardForks blk ⇒ StorageConfig blk → StorageConfig (HardForkBlock '[blk]) Source # | |||||
Generic (StorageConfig (DualBlock m a)) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual Associated Types
Methods from ∷ StorageConfig (DualBlock m a) → Rep (StorageConfig (DualBlock m a)) x # to ∷ Rep (StorageConfig (DualBlock m a)) x → StorageConfig (DualBlock m a) # | |||||
Generic (StorageConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config Associated Types
Methods from ∷ StorageConfig ByronBlock → Rep (StorageConfig ByronBlock) x # to ∷ Rep (StorageConfig ByronBlock) x → StorageConfig ByronBlock # | |||||
Generic (StorageConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config Associated Types
Methods from ∷ StorageConfig (ShelleyBlock proto era) → Rep (StorageConfig (ShelleyBlock proto era)) x # to ∷ Rep (StorageConfig (ShelleyBlock proto era)) x → StorageConfig (ShelleyBlock proto era) # | |||||
CanHardFork xs ⇒ NoThunks (StorageConfig (HardForkBlock xs)) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (StorageConfig (HardForkBlock xs)) → String Source # | |||||
(NoThunks (StorageConfig m), NoThunks (StorageConfig a)) ⇒ NoThunks (StorageConfig (DualBlock m a)) | |||||
NoThunks (StorageConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config Methods noThunks ∷ Context → StorageConfig ByronBlock → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → StorageConfig ByronBlock → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (StorageConfig ByronBlock) → String Source # | |||||
NoThunks (StorageConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config Methods noThunks ∷ Context → StorageConfig (ShelleyBlock proto era) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → StorageConfig (ShelleyBlock proto era) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (StorageConfig (ShelleyBlock proto era)) → String Source # | |||||
newtype StorageConfig ByronBlock Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config | |||||
type Rep (StorageConfig (DualBlock m a)) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual type Rep (StorageConfig (DualBlock m a)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "DualStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualStorageConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig m)) :*: S1 ('MetaSel ('Just "dualStorageConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig a)))) | |||||
type Rep (StorageConfig ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Config type Rep (StorageConfig ByronBlock) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'True) (C1 ('MetaCons "ByronStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronBlockConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BlockConfig ByronBlock)))) | |||||
type Rep (StorageConfig (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config type Rep (StorageConfig (ShelleyBlock proto era)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Shelley.Ledger.Config" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyStorageConfigSlotsPerKESPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "shelleyStorageConfigSecurityParam") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecurityParam))) | |||||
newtype StorageConfig (HardForkBlock xs) | |||||
data StorageConfig (DualBlock m a) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||
data StorageConfig (ShelleyBlock proto era) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Config |
ConsensusConfig
type CardanoConsensusConfig c = ConsensusConfig (HardForkProtocol (CardanoEras c)) Source #
The ConsensusConfig
for CardanoBlock
.
Thanks to the pattern synonyms, you can treat this as the product of the
Byron, Shelley, ... PartialConsensusConfig
s.
NOTE: not ConsensusConfig
, but PartialConsensusConfig
.
data family ConsensusConfig p Source #
Static configuration required to run the consensus protocol
Every method in the ConsensusProtocol
class takes the consensus
configuration as a parameter, so having this as a data family rather than a
type family resolves most ambiguity.
Defined out of the class so that protocols can define this type without having to define the entire protocol at the same time (or indeed in the same module).
Instances
Generic (ConsensusConfig (HardForkProtocol xs)) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Associated Types
Methods from ∷ ConsensusConfig (HardForkProtocol xs) → Rep (ConsensusConfig (HardForkProtocol xs)) x # to ∷ Rep (ConsensusConfig (HardForkProtocol xs)) x → ConsensusConfig (HardForkProtocol xs) # | |||||
Generic (ConsensusConfig (Bft c)) | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types
Methods from ∷ ConsensusConfig (Bft c) → Rep (ConsensusConfig (Bft c)) x # to ∷ Rep (ConsensusConfig (Bft c)) x → ConsensusConfig (Bft c) # | |||||
Generic (ConsensusConfig (ModChainSel p s)) | |||||
Defined in Ouroboros.Consensus.Protocol.ModChainSel Associated Types
Methods from ∷ ConsensusConfig (ModChainSel p s) → Rep (ConsensusConfig (ModChainSel p s)) x # to ∷ Rep (ConsensusConfig (ModChainSel p s)) x → ConsensusConfig (ModChainSel p s) # | |||||
Generic (ConsensusConfig (PBft c)) | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT Associated Types
Methods from ∷ ConsensusConfig (PBft c) → Rep (ConsensusConfig (PBft c)) x # to ∷ Rep (ConsensusConfig (PBft c)) x → ConsensusConfig (PBft c) # | |||||
Generic (ConsensusConfig (Praos c)) | |||||
Defined in Ouroboros.Consensus.Protocol.Praos Associated Types
Methods from ∷ ConsensusConfig (Praos c) → Rep (ConsensusConfig (Praos c)) x # to ∷ Rep (ConsensusConfig (Praos c)) x → ConsensusConfig (Praos c) # | |||||
Generic (ConsensusConfig (TPraos c)) | |||||
Defined in Ouroboros.Consensus.Protocol.TPraos Associated Types
Methods from ∷ ConsensusConfig (TPraos c) → Rep (ConsensusConfig (TPraos c)) x # to ∷ Rep (ConsensusConfig (TPraos c)) x → ConsensusConfig (TPraos c) # | |||||
CanHardFork xs ⇒ NoThunks (ConsensusConfig (HardForkProtocol xs)) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → ConsensusConfig (HardForkProtocol xs) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → ConsensusConfig (HardForkProtocol xs) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (ConsensusConfig (HardForkProtocol xs)) → String Source # | |||||
BftCrypto c ⇒ NoThunks (ConsensusConfig (Bft c)) | |||||
ConsensusProtocol p ⇒ NoThunks (ConsensusConfig (ModChainSel p s)) | |||||
Defined in Ouroboros.Consensus.Protocol.ModChainSel Methods noThunks ∷ Context → ConsensusConfig (ModChainSel p s) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → ConsensusConfig (ModChainSel p s) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (ConsensusConfig (ModChainSel p s)) → String Source # | |||||
NoThunks (ConsensusConfig (PBft c)) | |||||
PraosCrypto c ⇒ NoThunks (ConsensusConfig (Praos c)) | |||||
PraosCrypto c ⇒ NoThunks (ConsensusConfig (TPraos c)) | |||||
type Rep (ConsensusConfig (HardForkProtocol xs)) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics type Rep (ConsensusConfig (HardForkProtocol xs)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.HardFork.Combinator.Basics" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "HardForkConsensusConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "hardForkConsensusConfigK") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecurityParam) :*: (S1 ('MetaSel ('Just "hardForkConsensusConfigShape") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Shape xs)) :*: S1 ('MetaSel ('Just "hardForkConsensusConfigPerEra") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PerEraConsensusConfig xs))))) | |||||
type Rep (ConsensusConfig (Bft c)) | |||||
Defined in Ouroboros.Consensus.Protocol.BFT type Rep (ConsensusConfig (Bft c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "BftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "bftParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BftParams) :*: (S1 ('MetaSel ('Just "bftSignKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignKeyDSIGN (BftDSIGN c))) :*: S1 ('MetaSel ('Just "bftVerKeys") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map NodeId (VerKeyDSIGN (BftDSIGN c))))))) | |||||
type Rep (ConsensusConfig (ModChainSel p s)) | |||||
Defined in Ouroboros.Consensus.Protocol.ModChainSel type Rep (ConsensusConfig (ModChainSel p s)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.ModChainSel" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "McsConsensusConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "mcsConfigP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ConsensusConfig p)))) | |||||
type Rep (ConsensusConfig (PBft c)) | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT type Rep (ConsensusConfig (PBft c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "PBftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftParams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PBftParams))) | |||||
type Rep (ConsensusConfig (Praos c)) | |||||
Defined in Ouroboros.Consensus.Protocol.Praos type Rep (ConsensusConfig (Praos c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.Praos" "ouroboros-consensus-protocol-0.12.0.0-inplace" 'False) (C1 ('MetaCons "PraosConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "praosParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PraosParams) :*: S1 ('MetaSel ('Just "praosEpochInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochInfo (Except PastHorizonException))))) | |||||
type Rep (ConsensusConfig (TPraos c)) | |||||
Defined in Ouroboros.Consensus.Protocol.TPraos type Rep (ConsensusConfig (TPraos c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.12.0.0-inplace" 'False) (C1 ('MetaCons "TPraosConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "tpraosParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TPraosParams) :*: S1 ('MetaSel ('Just "tpraosEpochInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochInfo (Except PastHorizonException))))) | |||||
data ConsensusConfig (HardForkProtocol xs) | |||||
data ConsensusConfig (Bft c) | (Static) node configuration | ||||
Defined in Ouroboros.Consensus.Protocol.BFT data ConsensusConfig (Bft c) = BftConfig {
| |||||
newtype ConsensusConfig (PBft c) | (Static) node configuration | ||||
Defined in Ouroboros.Consensus.Protocol.PBFT | |||||
data ConsensusConfig (Praos c) | Static configuration | ||||
Defined in Ouroboros.Consensus.Protocol.Praos | |||||
data ConsensusConfig (TPraos c) | Static configuration | ||||
Defined in Ouroboros.Consensus.Protocol.TPraos | |||||
newtype ConsensusConfig (ModChainSel p s) | |||||
Defined in Ouroboros.Consensus.Protocol.ModChainSel |
LedgerConfig
type CardanoLedgerConfig c = HardForkLedgerConfig (CardanoEras c) Source #
The LedgerConfig
for CardanoBlock
.
Thanks to the pattern synonyms, you can treat this as the product of the
Byron, Shelley, ... PartialLedgerConfig
s.
NOTE: not LedgerConfig
, but PartialLedgerConfig
.
data HardForkLedgerConfig (xs ∷ [Type]) where Source #
Bundled Patterns
pattern CardanoLedgerConfig ∷ PartialLedgerConfig ByronBlock → PartialLedgerConfig (ShelleyBlock (TPraos c) ShelleyEra) → PartialLedgerConfig (ShelleyBlock (TPraos c) AllegraEra) → PartialLedgerConfig (ShelleyBlock (TPraos c) MaryEra) → PartialLedgerConfig (ShelleyBlock (TPraos c) AlonzoEra) → PartialLedgerConfig (ShelleyBlock (Praos c) BabbageEra) → PartialLedgerConfig (ShelleyBlock (Praos c) ConwayEra) → CardanoLedgerConfig c |
Instances
Generic (HardForkLedgerConfig xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Associated Types
Methods from ∷ HardForkLedgerConfig xs → Rep (HardForkLedgerConfig xs) x # to ∷ Rep (HardForkLedgerConfig xs) x → HardForkLedgerConfig xs # | |||||
CanHardFork xs ⇒ NoThunks (HardForkLedgerConfig xs) | |||||
type Rep (HardForkLedgerConfig xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics type Rep (HardForkLedgerConfig xs) = D1 ('MetaData "HardForkLedgerConfig" "Ouroboros.Consensus.HardFork.Combinator.Basics" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "HardForkLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "hardForkLedgerConfigShape") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Shape xs)) :*: S1 ('MetaSel ('Just "hardForkLedgerConfigPerEra") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PerEraLedgerConfig xs)))) |
LedgerState
type CardanoLedgerState c (mk ∷ MapKind) = LedgerState (CardanoBlock c) mk Source #
The LedgerState
for CardanoBlock
.
NOTE: the CardanoLedgerState
contains more than just the current era's
LedgerState
. We don't give access to those internal details through the
pattern synonyms. This is also the reason the pattern synonyms are not
bidirectional.
data family LedgerState blk (mk ∷ MapKind) Source #
Ledger state associated with a block
This is the Consensus notion of a Ledger ledger state. Each block type is
associated with one of the Ledger types for the ledger state. Virtually
every concept in this codebase revolves around this type, or the referenced
blk
. Whenever we use the type variable l
we intend to signal that the
expected instantiation is either a LedgerState
or some wrapper over it
(like the ExtLedgerState
).
This type is parametrized over mk ::
to express the
MapKind
LedgerTables
contained in such a LedgerState
. See LedgerTables
for a
more thorough description.
The main operations we can do with a LedgerState
are ticking (defined in
IsLedger
), and applying a block (defined in
ApplyBlock
).
Instances
DecodeDisk ByronBlock (LedgerState ByronBlock mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Node.Serialisation Methods decodeDisk ∷ CodecConfig ByronBlock → ∀ s. Decoder s (LedgerState ByronBlock mk) Source # | |||||||||
EncodeDisk ByronBlock (LedgerState ByronBlock mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Node.Serialisation Methods encodeDisk ∷ CodecConfig ByronBlock → LedgerState ByronBlock mk → Encoding Source # | |||||||||
(ShelleyBasedEra era, ShelleyBasedEra (PreviousEra era), TranslateEra era (ShelleyTip proto), TranslateEra era NewEpochState, TranslationError era NewEpochState ~ Void, CanMapMK mk, CanMapKeysMK mk) ⇒ TranslateEra era (Flip LedgerState mk :.: ShelleyBlock proto) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.ShelleyHFC Associated Types
Methods translateEra ∷ TranslationContext era → (Flip LedgerState mk :.: ShelleyBlock proto) (PreviousEra era) → Except (TranslationError era (Flip LedgerState mk :.: ShelleyBlock proto)) ((Flip LedgerState mk :.: ShelleyBlock proto) era) Source # | |||||||||
Bridge m a ⇒ GetTip (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods getTip ∷ ∀ (mk ∷ MapKind). LedgerState (DualBlock m a) mk → Point (LedgerState (DualBlock m a)) Source # | |||||||||
GetTip (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods getTip ∷ ∀ (mk ∷ MapKind). LedgerState ByronBlock mk → Point (LedgerState ByronBlock) Source # | |||||||||
GetTip (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods getTip ∷ ∀ (mk ∷ MapKind). LedgerState (ShelleyBlock proto era) mk → Point (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Bridge m a ⇒ IsLedger (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Associated Types
Methods applyChainTickLedgerResult ∷ ComputeLedgerEvents → LedgerCfg (LedgerState (DualBlock m a)) → SlotNo → LedgerState (DualBlock m a) EmptyMK → LedgerResult (LedgerState (DualBlock m a)) (Ticked (LedgerState (DualBlock m a)) DiffMK) Source # | |||||||||
IsLedger (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Associated Types
| |||||||||
ShelleyBasedEra era ⇒ IsLedger (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Associated Types
Methods applyChainTickLedgerResult ∷ ComputeLedgerEvents → LedgerCfg (LedgerState (ShelleyBlock proto era)) → SlotNo → LedgerState (ShelleyBlock proto era) EmptyMK → LedgerResult (LedgerState (ShelleyBlock proto era)) (Ticked (LedgerState (ShelleyBlock proto era)) DiffMK) Source # | |||||||||
CanStowLedgerTables (LedgerState m) ⇒ CanStowLedgerTables (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods stowLedgerTables ∷ LedgerState (DualBlock m a) ValuesMK → LedgerState (DualBlock m a) EmptyMK Source # unstowLedgerTables ∷ LedgerState (DualBlock m a) EmptyMK → LedgerState (DualBlock m a) ValuesMK Source # | |||||||||
CanStowLedgerTables (LedgerState ByronBlock) Source # | |||||||||
ShelleyBasedEra era ⇒ CanStowLedgerTables (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods stowLedgerTables ∷ LedgerState (ShelleyBlock proto era) ValuesMK → LedgerState (ShelleyBlock proto era) EmptyMK Source # unstowLedgerTables ∷ LedgerState (ShelleyBlock proto era) EmptyMK → LedgerState (ShelleyBlock proto era) ValuesMK Source # | |||||||||
(Bridge m a, NoThunks (TxOut (LedgerState m)), NoThunks (TxIn (LedgerState m)), Show (TxOut (LedgerState m)), Show (TxIn (LedgerState m)), Eq (TxOut (LedgerState m)), Ord (TxIn (LedgerState m)), MemPack (TxIn (LedgerState m))) ⇒ HasLedgerTables (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (DualBlock m a) mk → LedgerTables (LedgerState (DualBlock m a)) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (DualBlock m a) any → LedgerTables (LedgerState (DualBlock m a)) mk → LedgerState (DualBlock m a) mk Source # | |||||||||
HasLedgerTables (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState ByronBlock mk → LedgerTables (LedgerState ByronBlock) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState ByronBlock any → LedgerTables (LedgerState ByronBlock) mk → LedgerState ByronBlock mk Source # | |||||||||
ShelleyBasedEra era ⇒ HasLedgerTables (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (ShelleyBlock proto era) mk → LedgerTables (LedgerState (ShelleyBlock proto era)) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (ShelleyBlock proto era) any → LedgerTables (LedgerState (ShelleyBlock proto era)) mk → LedgerState (ShelleyBlock proto era) mk Source # | |||||||||
LedgerTablesAreTrivial (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). LedgerState ByronBlock mk → LedgerState ByronBlock mk' Source # | |||||||||
CardanoHardForkConstraints c ⇒ SerializeTablesWithHint (LedgerState (HardForkBlock (CardanoEras c))) Source # | |||||||||
Defined in Ouroboros.Consensus.Cardano.Ledger Methods encodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (HardForkBlock (CardanoEras c))) ValuesMK) → LedgerTables (LedgerState (HardForkBlock (CardanoEras c))) ValuesMK → Encoding Source # decodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (HardForkBlock (CardanoEras c))) ValuesMK) → Decoder s (LedgerTables (LedgerState (HardForkBlock (CardanoEras c))) ValuesMK) Source # | |||||||||
SerializeTablesWithHint (LedgerState (HardForkBlock '[ByronBlock])) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.ByronHFC Methods encodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (HardForkBlock '[ByronBlock])) ValuesMK) → LedgerTables (LedgerState (HardForkBlock '[ByronBlock])) ValuesMK → Encoding Source # decodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (HardForkBlock '[ByronBlock])) ValuesMK) → Decoder s (LedgerTables (LedgerState (HardForkBlock '[ByronBlock])) ValuesMK) Source # | |||||||||
ShelleyCompatible proto era ⇒ SerializeTablesWithHint (LedgerState (HardForkBlock '[ShelleyBlock proto era])) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.ShelleyHFC Methods encodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (HardForkBlock '[ShelleyBlock proto era])) ValuesMK) → LedgerTables (LedgerState (HardForkBlock '[ShelleyBlock proto era])) ValuesMK → Encoding Source # decodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (HardForkBlock '[ShelleyBlock proto era])) ValuesMK) → Decoder s (LedgerTables (LedgerState (HardForkBlock '[ShelleyBlock proto era])) ValuesMK) Source # | |||||||||
(Ord (TxIn (LedgerState m)), MemPack (TxIn (LedgerState m)), MemPack (TxOut (LedgerState m))) ⇒ SerializeTablesWithHint (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods encodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (DualBlock m a)) ValuesMK) → LedgerTables (LedgerState (DualBlock m a)) ValuesMK → Encoding Source # decodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (DualBlock m a)) ValuesMK) → Decoder s (LedgerTables (LedgerState (DualBlock m a)) ValuesMK) Source # | |||||||||
SerializeTablesWithHint (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods encodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState ByronBlock) ValuesMK) → LedgerTables (LedgerState ByronBlock) ValuesMK → Encoding Source # decodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState ByronBlock) ValuesMK) → Decoder s (LedgerTables (LedgerState ByronBlock) ValuesMK) Source # | |||||||||
ShelleyCompatible proto era ⇒ SerializeTablesWithHint (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods encodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (ShelleyBlock proto era)) ValuesMK) → LedgerTables (LedgerState (ShelleyBlock proto era)) ValuesMK → Encoding Source # decodeTablesWithHint ∷ SerializeTablesHint (LedgerTables (LedgerState (ShelleyBlock proto era)) ValuesMK) → Decoder s (LedgerTables (LedgerState (ShelleyBlock proto era)) ValuesMK) Source # | |||||||||
CanUpgradeLedgerTables (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (DualBlock m a) mk1 → LedgerState (DualBlock m a) mk2 → LedgerTables (LedgerState (DualBlock m a)) ValuesMK → LedgerTables (LedgerState (DualBlock m a)) ValuesMK Source # | |||||||||
CanUpgradeLedgerTables (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState ByronBlock mk1 → LedgerState ByronBlock mk2 → LedgerTables (LedgerState ByronBlock) ValuesMK → LedgerTables (LedgerState ByronBlock) ValuesMK Source # | |||||||||
CanUpgradeLedgerTables (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (ShelleyBlock proto era) mk1 → LedgerState (ShelleyBlock proto era) mk2 → LedgerTables (LedgerState (ShelleyBlock proto era)) ValuesMK → LedgerTables (LedgerState (ShelleyBlock proto era)) ValuesMK Source # | |||||||||
ApplyBlock (LedgerState ByronBlock) ByronBlock Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods applyBlockLedgerResultWithValidation ∷ ValidationPolicy → ComputeLedgerEvents → LedgerCfg (LedgerState ByronBlock) → ByronBlock → Ticked (LedgerState ByronBlock) ValuesMK → Except (LedgerErr (LedgerState ByronBlock)) (LedgerResult (LedgerState ByronBlock) (LedgerState ByronBlock DiffMK)) Source # applyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg (LedgerState ByronBlock) → ByronBlock → Ticked (LedgerState ByronBlock) ValuesMK → Except (LedgerErr (LedgerState ByronBlock)) (LedgerResult (LedgerState ByronBlock) (LedgerState ByronBlock DiffMK)) Source # reapplyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg (LedgerState ByronBlock) → ByronBlock → Ticked (LedgerState ByronBlock) ValuesMK → LedgerResult (LedgerState ByronBlock) (LedgerState ByronBlock DiffMK) Source # getBlockKeySets ∷ ByronBlock → LedgerTables (LedgerState ByronBlock) KeysMK Source # | |||||||||
Bridge m a ⇒ ApplyBlock (LedgerState (DualBlock m a)) (DualBlock m a) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods applyBlockLedgerResultWithValidation ∷ ValidationPolicy → ComputeLedgerEvents → LedgerCfg (LedgerState (DualBlock m a)) → DualBlock m a → Ticked (LedgerState (DualBlock m a)) ValuesMK → Except (LedgerErr (LedgerState (DualBlock m a))) (LedgerResult (LedgerState (DualBlock m a)) (LedgerState (DualBlock m a) DiffMK)) Source # applyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg (LedgerState (DualBlock m a)) → DualBlock m a → Ticked (LedgerState (DualBlock m a)) ValuesMK → Except (LedgerErr (LedgerState (DualBlock m a))) (LedgerResult (LedgerState (DualBlock m a)) (LedgerState (DualBlock m a) DiffMK)) Source # reapplyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg (LedgerState (DualBlock m a)) → DualBlock m a → Ticked (LedgerState (DualBlock m a)) ValuesMK → LedgerResult (LedgerState (DualBlock m a)) (LedgerState (DualBlock m a) DiffMK) Source # getBlockKeySets ∷ DualBlock m a → LedgerTables (LedgerState (DualBlock m a)) KeysMK Source # | |||||||||
ShelleyCompatible proto era ⇒ ApplyBlock (LedgerState (ShelleyBlock proto era)) (ShelleyBlock proto era) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods applyBlockLedgerResultWithValidation ∷ ValidationPolicy → ComputeLedgerEvents → LedgerCfg (LedgerState (ShelleyBlock proto era)) → ShelleyBlock proto era → Ticked (LedgerState (ShelleyBlock proto era)) ValuesMK → Except (LedgerErr (LedgerState (ShelleyBlock proto era))) (LedgerResult (LedgerState (ShelleyBlock proto era)) (LedgerState (ShelleyBlock proto era) DiffMK)) Source # applyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg (LedgerState (ShelleyBlock proto era)) → ShelleyBlock proto era → Ticked (LedgerState (ShelleyBlock proto era)) ValuesMK → Except (LedgerErr (LedgerState (ShelleyBlock proto era))) (LedgerResult (LedgerState (ShelleyBlock proto era)) (LedgerState (ShelleyBlock proto era) DiffMK)) Source # reapplyBlockLedgerResult ∷ ComputeLedgerEvents → LedgerCfg (LedgerState (ShelleyBlock proto era)) → ShelleyBlock proto era → Ticked (LedgerState (ShelleyBlock proto era)) ValuesMK → LedgerResult (LedgerState (ShelleyBlock proto era)) (LedgerState (ShelleyBlock proto era) DiffMK) Source # getBlockKeySets ∷ ShelleyBlock proto era → LedgerTables (LedgerState (ShelleyBlock proto era)) KeysMK Source # | |||||||||
Generic (LedgerState ByronBlock mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Associated Types
Methods from ∷ LedgerState ByronBlock mk → Rep (LedgerState ByronBlock mk) x # to ∷ Rep (LedgerState ByronBlock mk) x → LedgerState ByronBlock mk # | |||||||||
Generic (LedgerState (ShelleyBlock proto era) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Associated Types
Methods from ∷ LedgerState (ShelleyBlock proto era) mk → Rep (LedgerState (ShelleyBlock proto era) mk) x # to ∷ Rep (LedgerState (ShelleyBlock proto era) mk) x → LedgerState (ShelleyBlock proto era) mk # | |||||||||
(ShowMK mk, CanHardFork xs) ⇒ Show (LedgerState (HardForkBlock xs) mk) | |||||||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods showsPrec ∷ Int → LedgerState (HardForkBlock xs) mk → ShowS # show ∷ LedgerState (HardForkBlock xs) mk → String # showList ∷ [LedgerState (HardForkBlock xs) mk] → ShowS # | |||||||||
(Bridge m a, ShowMK mk) ⇒ Show (LedgerState (DualBlock m a) mk) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
Show (LedgerState ByronBlock mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods showsPrec ∷ Int → LedgerState ByronBlock mk → ShowS # show ∷ LedgerState ByronBlock mk → String # showList ∷ [LedgerState ByronBlock mk] → ShowS # | |||||||||
(ShelleyBasedEra era, ShowMK mk) ⇒ Show (LedgerState (ShelleyBlock proto era) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods showsPrec ∷ Int → LedgerState (ShelleyBlock proto era) mk → ShowS # show ∷ LedgerState (ShelleyBlock proto era) mk → String # showList ∷ [LedgerState (ShelleyBlock proto era) mk] → ShowS # | |||||||||
(EqMK mk, CanHardFork xs) ⇒ Eq (LedgerState (HardForkBlock xs) mk) | |||||||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods (==) ∷ LedgerState (HardForkBlock xs) mk → LedgerState (HardForkBlock xs) mk → Bool # (/=) ∷ LedgerState (HardForkBlock xs) mk → LedgerState (HardForkBlock xs) mk → Bool # | |||||||||
(Bridge m a, EqMK mk) ⇒ Eq (LedgerState (DualBlock m a) mk) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods (==) ∷ LedgerState (DualBlock m a) mk → LedgerState (DualBlock m a) mk → Bool # (/=) ∷ LedgerState (DualBlock m a) mk → LedgerState (DualBlock m a) mk → Bool # | |||||||||
Eq (LedgerState ByronBlock mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods (==) ∷ LedgerState ByronBlock mk → LedgerState ByronBlock mk → Bool # (/=) ∷ LedgerState ByronBlock mk → LedgerState ByronBlock mk → Bool # | |||||||||
(ShelleyBasedEra era, EqMK mk) ⇒ Eq (LedgerState (ShelleyBlock proto era) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods (==) ∷ LedgerState (ShelleyBlock proto era) mk → LedgerState (ShelleyBlock proto era) mk → Bool # (/=) ∷ LedgerState (ShelleyBlock proto era) mk → LedgerState (ShelleyBlock proto era) mk → Bool # | |||||||||
(NoThunksMK mk, CanHardFork xs) ⇒ NoThunks (LedgerState (HardForkBlock xs) mk) | |||||||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → LedgerState (HardForkBlock xs) mk → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → LedgerState (HardForkBlock xs) mk → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (LedgerState (HardForkBlock xs) mk) → String Source # | |||||||||
NoThunks (LedgerState (DualBlock m a) mk) | |||||||||
NoThunks (LedgerState ByronBlock mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods noThunks ∷ Context → LedgerState ByronBlock mk → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → LedgerState ByronBlock mk → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (LedgerState ByronBlock mk) → String Source # | |||||||||
(ShelleyBasedEra era, NoThunksMK mk) ⇒ NoThunks (LedgerState (ShelleyBlock proto era) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods noThunks ∷ Context → LedgerState (ShelleyBlock proto era) mk → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → LedgerState (ShelleyBlock proto era) mk → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (LedgerState (ShelleyBlock proto era) mk) → String Source # | |||||||||
Bridge m a ⇒ GetTip (Ticked (LedgerState (DualBlock m a))) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
GetTip (Ticked (LedgerState ByronBlock)) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked (LedgerState ByronBlock) mk → Point (Ticked (LedgerState ByronBlock)) Source # | |||||||||
GetTip (Ticked (LedgerState (ShelleyBlock proto era))) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods getTip ∷ ∀ (mk ∷ MapKind). Ticked (LedgerState (ShelleyBlock proto era)) mk → Point (Ticked (LedgerState (ShelleyBlock proto era))) Source # | |||||||||
ShelleyBasedEra era ⇒ CanStowLedgerTables (Ticked (LedgerState (ShelleyBlock proto era))) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods stowLedgerTables ∷ Ticked (LedgerState (ShelleyBlock proto era)) ValuesMK → Ticked (LedgerState (ShelleyBlock proto era)) EmptyMK Source # unstowLedgerTables ∷ Ticked (LedgerState (ShelleyBlock proto era)) EmptyMK → Ticked (LedgerState (ShelleyBlock proto era)) ValuesMK Source # | |||||||||
(Bridge m a, NoThunks (TxOut (LedgerState m)), NoThunks (TxIn (LedgerState m)), Show (TxOut (LedgerState m)), Show (TxIn (LedgerState m)), Eq (TxOut (LedgerState m)), Ord (TxIn (LedgerState m)), MemPack (TxIn (LedgerState m))) ⇒ HasLedgerTables (Ticked (LedgerState (DualBlock m a))) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked (LedgerState (DualBlock m a)) mk → LedgerTables (Ticked (LedgerState (DualBlock m a))) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked (LedgerState (DualBlock m a)) any → LedgerTables (Ticked (LedgerState (DualBlock m a))) mk → Ticked (LedgerState (DualBlock m a)) mk Source # | |||||||||
HasLedgerTables (Ticked (LedgerState ByronBlock)) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked (LedgerState ByronBlock) mk → LedgerTables (Ticked (LedgerState ByronBlock)) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked (LedgerState ByronBlock) any → LedgerTables (Ticked (LedgerState ByronBlock)) mk → Ticked (LedgerState ByronBlock) mk Source # | |||||||||
ShelleyBasedEra era ⇒ HasLedgerTables (Ticked (LedgerState (ShelleyBlock proto era))) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked (LedgerState (ShelleyBlock proto era)) mk → LedgerTables (Ticked (LedgerState (ShelleyBlock proto era))) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked (LedgerState (ShelleyBlock proto era)) any → LedgerTables (Ticked (LedgerState (ShelleyBlock proto era))) mk → Ticked (LedgerState (ShelleyBlock proto era)) mk Source # | |||||||||
LedgerTablesAreTrivial (Ticked (LedgerState ByronBlock)) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). Ticked (LedgerState ByronBlock) mk → Ticked (LedgerState ByronBlock) mk' Source # | |||||||||
IndexedMemPack (LedgerState (HardForkBlock '[ByronBlock]) EmptyMK) Void Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.ByronHFC Methods indexedPackedByteCount ∷ LedgerState (HardForkBlock '[ByronBlock]) EmptyMK → Void → Int Source # indexedPackM ∷ LedgerState (HardForkBlock '[ByronBlock]) EmptyMK → Void → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ LedgerState (HardForkBlock '[ByronBlock]) EmptyMK → Unpack b Void Source # indexedTypeName ∷ LedgerState (HardForkBlock '[ByronBlock]) EmptyMK → String Source # | |||||||||
(txout ~ TxOut era, MemPack txout) ⇒ IndexedMemPack (LedgerState (HardForkBlock '[ShelleyBlock proto era]) EmptyMK) txout Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.ShelleyHFC Methods indexedPackedByteCount ∷ LedgerState (HardForkBlock '[ShelleyBlock proto era]) EmptyMK → txout → Int Source # indexedPackM ∷ LedgerState (HardForkBlock '[ShelleyBlock proto era]) EmptyMK → txout → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ LedgerState (HardForkBlock '[ShelleyBlock proto era]) EmptyMK → Unpack b txout Source # indexedTypeName ∷ LedgerState (HardForkBlock '[ShelleyBlock proto era]) EmptyMK → String Source # | |||||||||
(txout ~ TxOut (LedgerState m), IndexedMemPack (LedgerState m EmptyMK) txout) ⇒ IndexedMemPack (LedgerState (DualBlock m a) EmptyMK) txout | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual Methods indexedPackedByteCount ∷ LedgerState (DualBlock m a) EmptyMK → txout → Int Source # indexedPackM ∷ LedgerState (DualBlock m a) EmptyMK → txout → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ LedgerState (DualBlock m a) EmptyMK → Unpack b txout Source # indexedTypeName ∷ LedgerState (DualBlock m a) EmptyMK → String Source # | |||||||||
IndexedMemPack (LedgerState ByronBlock EmptyMK) Void Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods indexedPackedByteCount ∷ LedgerState ByronBlock EmptyMK → Void → Int Source # indexedPackM ∷ LedgerState ByronBlock EmptyMK → Void → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ LedgerState ByronBlock EmptyMK → Unpack b Void Source # indexedTypeName ∷ LedgerState ByronBlock EmptyMK → String Source # | |||||||||
(txout ~ TxOut era, MemPack txout) ⇒ IndexedMemPack (LedgerState (ShelleyBlock proto era) EmptyMK) txout Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Methods indexedPackedByteCount ∷ LedgerState (ShelleyBlock proto era) EmptyMK → txout → Int Source # indexedPackM ∷ LedgerState (ShelleyBlock proto era) EmptyMK → txout → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ LedgerState (ShelleyBlock proto era) EmptyMK → Unpack b txout Source # indexedTypeName ∷ LedgerState (ShelleyBlock proto era) EmptyMK → String Source # | |||||||||
CardanoHardForkConstraints c ⇒ IndexedMemPack (LedgerState (HardForkBlock (CardanoEras c)) EmptyMK) (CardanoTxOut c) Source # | |||||||||
Defined in Ouroboros.Consensus.Cardano.Ledger Methods indexedPackedByteCount ∷ LedgerState (HardForkBlock (CardanoEras c)) EmptyMK → CardanoTxOut c → Int Source # indexedPackM ∷ LedgerState (HardForkBlock (CardanoEras c)) EmptyMK → CardanoTxOut c → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ LedgerState (HardForkBlock (CardanoEras c)) EmptyMK → Unpack b (CardanoTxOut c) Source # indexedTypeName ∷ LedgerState (HardForkBlock (CardanoEras c)) EmptyMK → String Source # | |||||||||
StandardHash blk ⇒ StandardHash (LedgerState blk ∷ MapKind → Type) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Basics | |||||||||
ShelleyCompatible proto era ⇒ DecodeDisk (ShelleyBlock proto era) (LedgerState (ShelleyBlock proto era) EmptyMK) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods decodeDisk ∷ CodecConfig (ShelleyBlock proto era) → ∀ s. Decoder s (LedgerState (ShelleyBlock proto era) EmptyMK) Source # | |||||||||
ShelleyCompatible proto era ⇒ EncodeDisk (ShelleyBlock proto era) (LedgerState (ShelleyBlock proto era) EmptyMK) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeDisk ∷ CodecConfig (ShelleyBlock proto era) → LedgerState (ShelleyBlock proto era) EmptyMK → Encoding Source # | |||||||||
Generic (Ticked (LedgerState ByronBlock) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Associated Types
Methods from ∷ Ticked (LedgerState ByronBlock) mk → Rep (Ticked (LedgerState ByronBlock) mk) x # to ∷ Rep (Ticked (LedgerState ByronBlock) mk) x → Ticked (LedgerState ByronBlock) mk # | |||||||||
Generic (Ticked (LedgerState (ShelleyBlock proto era)) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger Associated Types
Methods from ∷ Ticked (LedgerState (ShelleyBlock proto era)) mk → Rep (Ticked (LedgerState (ShelleyBlock proto era)) mk) x # to ∷ Rep (Ticked (LedgerState (ShelleyBlock proto era)) mk) x → Ticked (LedgerState (ShelleyBlock proto era)) mk # | |||||||||
NoThunks (Ticked (LedgerState (DualBlock m a)) mk) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
NoThunks (Ticked (LedgerState ByronBlock) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger Methods noThunks ∷ Context → Ticked (LedgerState ByronBlock) mk → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → Ticked (LedgerState ByronBlock) mk → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (Ticked (LedgerState ByronBlock) mk) → String Source # | |||||||||
Inject (Flip LedgerState mk) | |||||||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary Methods inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → Flip LedgerState mk x → Flip LedgerState mk (HardForkBlock xs) Source # | |||||||||
Isomorphic (Flip LedgerState mk) | |||||||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary Methods project ∷ NoHardForks blk ⇒ Flip LedgerState mk (HardForkBlock '[blk]) → Flip LedgerState mk blk Source # inject ∷ NoHardForks blk ⇒ Flip LedgerState mk blk → Flip LedgerState mk (HardForkBlock '[blk]) Source # | |||||||||
data LedgerState ByronBlock mk Source # | |||||||||
type TranslationError era (Flip LedgerState mk :.: ShelleyBlock proto) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.ShelleyHFC | |||||||||
type AuxLedgerEvent (LedgerState (HardForkBlock xs)) | |||||||||
type AuxLedgerEvent (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
type AuxLedgerEvent (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||||||
type AuxLedgerEvent (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger | |||||||||
type LedgerCfg (LedgerState (HardForkBlock xs)) | |||||||||
type LedgerCfg (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
type LedgerCfg (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||||||
type LedgerCfg (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger | |||||||||
type LedgerErr (LedgerState (HardForkBlock xs)) | |||||||||
type LedgerErr (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
type LedgerErr (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||||||
type LedgerErr (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger | |||||||||
newtype LedgerState (HardForkBlock xs) mk | |||||||||
type TxIn (LedgerState (HardForkBlock xs)) | Must be the | ||||||||
type TxIn (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
type TxIn (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||||||
type TxIn (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger | |||||||||
type TxOut (LedgerState (HardForkBlock xs)) | Must be the | ||||||||
type TxOut (LedgerState (DualBlock m a)) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
type TxOut (LedgerState ByronBlock) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger | |||||||||
type TxOut (LedgerState (ShelleyBlock proto era)) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger | |||||||||
type Rep (LedgerState ByronBlock mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger type Rep (LedgerState ByronBlock mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.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 (LedgerState (ShelleyBlock proto era) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger type Rep (LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "shelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "shelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era))) :*: (S1 ('MetaSel ('Just "shelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition) :*: S1 ('MetaSel ('Just "shelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (LedgerState (ShelleyBlock proto era)) mk))))) | |||||||||
data LedgerState (DualBlock m a) mk | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual | |||||||||
data LedgerState (ShelleyBlock proto era) mk Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger data LedgerState (ShelleyBlock proto era) mk = ShelleyLedgerState {
| |||||||||
data Ticked (LedgerState (HardForkBlock xs) ∷ MapKind → Type) (mk ∷ MapKind) | |||||||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger data Ticked (LedgerState (HardForkBlock xs) ∷ MapKind → Type) (mk ∷ MapKind) = TickedHardForkLedgerState {} | |||||||||
data Ticked (LedgerState (DualBlock m a) ∷ MapKind → Type) (mk ∷ MapKind) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Dual data Ticked (LedgerState (DualBlock m a) ∷ MapKind → Type) (mk ∷ MapKind) = TickedDualLedgerState {} | |||||||||
data Ticked (LedgerState ByronBlock) (mk ∷ MapKind) Source # | The ticked Byron ledger state | ||||||||
data Ticked (LedgerState (ShelleyBlock proto era) ∷ MapKind → Type) (mk ∷ MapKind) Source # | Ticking only affects the state itself | ||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger data Ticked (LedgerState (ShelleyBlock proto era) ∷ MapKind → Type) (mk ∷ MapKind) = TickedShelleyLedgerState {
| |||||||||
type HeaderHash (LedgerState blk ∷ MapKind → Type) | |||||||||
Defined in Ouroboros.Consensus.Ledger.Basics | |||||||||
type Rep (Ticked (LedgerState ByronBlock) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Byron.Ledger.Ledger type Rep (Ticked (LedgerState ByronBlock) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.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 Rep (Ticked (LedgerState (ShelleyBlock proto era)) mk) Source # | |||||||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger type Rep (Ticked (LedgerState (ShelleyBlock proto era)) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "TickedShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "untickedShelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition)) :*: (S1 ('MetaSel ('Just "tickedShelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era)) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (LedgerState (ShelleyBlock proto era)) mk))))) |
ChainDepState
type CardanoChainDepState c = HardForkChainDepState (CardanoEras c) Source #
The ChainDepState
for CardanoBlock
.
NOTE: the CardanoChainDepState
contains more than just the current era's
ChainDepState
. We don't give access to those internal details through the
pattern synonyms. This is also the reason the pattern synonyms are not
bidirectional.
data HardForkState (f ∷ Type → Type) (xs ∷ [Type]) where Source #
Generic hard fork state
This is used both for the consensus state and the ledger state.
By using a telescope with f ~ LedgerState
, we will keep track of Past
information for eras before the current one:
TZ currentByronState TZ pastByronState $ TZ currentShelleyState TZ pastByronState $ TS pastShelleyState $ TZ currentAllegraState ...
These are some intuitions on how the Telescope operations behave for this type:
extend
Suppose we have a telescope containing the ledger state. The "how to extend" argument would take, say, the final Byron state to the initial Shelley state; and "where to extend from" argument would indicate when we want to extend: when the current slot number has gone past the end of the Byron era.
retract
Suppose we have a telescope containing the consensus state. When we rewind
the consensus state, we might cross a hard fork transition point. So we first
retract the telescope to the era containing the slot number that we want
to rewind to, and only then call rewindChainDepState
on that era. Of course,
retraction may fail (we might not have past consensus state to rewind to
anymore); this failure would require a choice for a particular monad m
.
align
Suppose we have one telescope containing the already-ticked ledger state, and
another telescope containing the consensus state. Since the ledger state has
already been ticked, it might have been advanced to the next era. If this
happens, we should then align the consensus state with the ledger state,
moving it also to the next era, before we can do the consensus header
validation check. Note that in this particular example, the ledger state will
always be ahead of the consensus state, never behind; alignExtend
can be
used in this case.
Bundled Patterns
pattern ChainDepStateAllegra ∷ ChainDepState (BlockProtocol (ShelleyBlock (TPraos c) AllegraEra)) → CardanoChainDepState c | |
pattern ChainDepStateAlonzo ∷ ChainDepState (BlockProtocol (ShelleyBlock (TPraos c) AlonzoEra)) → CardanoChainDepState c | |
pattern ChainDepStateBabbage ∷ ChainDepState (BlockProtocol (ShelleyBlock (Praos c) BabbageEra)) → CardanoChainDepState c | |
pattern ChainDepStateConway ∷ ChainDepState (BlockProtocol (ShelleyBlock (Praos c) ConwayEra)) → CardanoChainDepState c | |
pattern ChainDepStateByron ∷ ChainDepState (BlockProtocol ByronBlock) → CardanoChainDepState c | |
pattern ChainDepStateMary ∷ ChainDepState (BlockProtocol (ShelleyBlock (TPraos c) MaryEra)) → CardanoChainDepState c | |
pattern ChainDepStateShelley ∷ ChainDepState (BlockProtocol (ShelleyBlock (TPraos c) ShelleyEra)) → CardanoChainDepState c |
Instances
Generic (HardForkState f xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.State.Types Associated Types
Methods from ∷ HardForkState f xs → Rep (HardForkState f xs) x # to ∷ Rep (HardForkState f xs) x → HardForkState f xs # | |||||
data Ticked (HardForkChainDepState xs ∷ Type) | |||||
type Prod HardForkState | |||||
type SListIN HardForkState | |||||
type CollapseTo HardForkState a | |||||
type AllN HardForkState (c ∷ Type → Constraint) | |||||
type Same HardForkState | |||||
type Rep (HardForkState f xs) | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.State.Types type Rep (HardForkState f xs) = D1 ('MetaData "HardForkState" "Ouroboros.Consensus.HardFork.Combinator.State.Types" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "HardForkState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Telescope (K Past ∷ Type → Type) (Current f) xs)))) |
EraMismatch
data EraMismatch Source #
Extra info for errors caused by applying a block, header, transaction, or query from one era to a ledger from a different era.
Constructors
EraMismatch | |
Fields
|
Instances
Generic EraMismatch | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras Associated Types
| |||||
Show EraMismatch | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras Methods showsPrec ∷ Int → EraMismatch → ShowS # show ∷ EraMismatch → String # showList ∷ [EraMismatch] → ShowS # | |||||
Eq EraMismatch | |||||
type Rep EraMismatch | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras type Rep EraMismatch = D1 ('MetaData "EraMismatch" "Ouroboros.Consensus.HardFork.Combinator.AcrossEras" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "EraMismatch" 'PrefixI 'True) (S1 ('MetaSel ('Just "ledgerEraName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "otherEraName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) |