ouroboros-consensus-cardano-0.1.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Cardano.Block

Synopsis

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

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 and BlockShelley.

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 BlockAllegraShelleyBlock (TPraos c) (AllegraEra c) → CardanoBlock c 
pattern BlockAlonzoShelleyBlock (TPraos c) (AlonzoEra c) → CardanoBlock c 
pattern BlockByronByronBlockCardanoBlock c 
pattern BlockMaryShelleyBlock (TPraos c) (MaryEra c) → CardanoBlock c 
pattern BlockShelleyShelleyBlock (TPraos c) (ShelleyEra c) → CardanoBlock c 
pattern BlockBabbageShelleyBlock (Praos c) (BabbageEra c) → CardanoBlock c 

Instances

Instances details
SupportedNetworkProtocolVersion ByronBlockHFC Source #

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

Instance details

Defined in Ouroboros.Consensus.Cardano.ByronHFC

CanHardFork xs ⇒ Eq (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

CanHardFork xs ⇒ Show (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

CanHardFork xs ⇒ Show (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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

Defined in Ouroboros.Consensus.Cardano.Condense

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

Defined in Ouroboros.Consensus.Cardano.Node

CanHardFork xs ⇒ NoThunks (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → LedgerState (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → LedgerState (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (LedgerState (HardForkBlock xs)) → String #

CanHardFork xs ⇒ NoThunks (BlockConfig (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (BlockConfig (HardForkBlock xs)) → String #

CanHardFork xs ⇒ NoThunks (CodecConfig (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (CodecConfig (HardForkBlock xs)) → String #

CanHardFork xs ⇒ NoThunks (StorageConfig (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (StorageConfig (HardForkBlock xs)) → String #

Typeable xs ⇒ ShowProxy (HardForkBlock xs ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type Rep (GenTx (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (GenTx (HardForkBlock xs)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTx xs))))
type Rep (TxId (GenTx (HardForkBlock xs))) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs))))
type Rep (Validated (GenTx (HardForkBlock xs))) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (Validated (GenTx (HardForkBlock xs))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs))))
type Rep (Ticked (LedgerState (HardForkBlock xs))) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep (Ticked (LedgerState (HardForkBlock xs))) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.0-inplace" 'False) (C1 ('MetaCons "TickedHardForkLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedHardForkLedgerStateTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransitionInfo) :*: S1 ('MetaSel ('Just "tickedHardForkLedgerStatePerEra") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HardForkState (Ticked :.: LedgerState) xs))))
data BlockQuery (HardForkBlock xs) a 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

data BlockQuery (HardForkBlock xs) a where
type HardForkIndices (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type LedgerUpdate (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type LedgerWarning (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type TipInfo (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

type OtherHeaderEnvelopeError (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type CannotForge (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Forging

type ForgeStateInfo (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Forging

type ForgeStateUpdateError (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Forging

newtype GenTx (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type ApplyTxErr (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

newtype TxId (GenTx (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

newtype Validated (GenTx (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type LedgerCfg (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type AuxLedgerEvent (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type LedgerErr (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

newtype LedgerState (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type BlockProtocol (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

newtype BlockConfig (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

newtype CodecConfig (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

newtype StorageConfig (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

newtype Header (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

data NestedCtxt_ (HardForkBlock xs) a b 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

data NestedCtxt_ (HardForkBlock xs) a b where
data Ticked (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type BlockNodeToClientVersion (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.Common

type BlockNodeToNodeVersion (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.Common

type HeaderHash (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Headers

type CardanoHeader c = Header (CardanoBlock c) Source #

The Cardano header.

data family Header blk Source #

Instances

Instances details
Inject Header 
Instance details

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

Methods

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

ShowProxy (Header ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

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

Eq (Header ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

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

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

Show (Header ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

showsPrecIntHeader (ShelleyBlock proto era) → ShowS Source #

showHeader (ShelleyBlock proto era) → String Source #

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

Generic (Header ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Associated Types

type Rep (Header ByronBlock) ∷ TypeType Source #

Generic (Header (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Associated Types

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

Methods

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

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

Condense (Header ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

condenseHeader (ShelleyBlock proto era) → String Source #

NoThunks (Header ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

Methods

noThunks ∷ Context → Header ByronBlockIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Header ByronBlockIO (Maybe ThunkInfo) #

showTypeOfProxy (Header ByronBlock) → String #

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

noThunks ∷ Context → Header (ShelleyBlock proto era) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Header (ShelleyBlock proto era) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Header (ShelleyBlock proto era)) → String #

HasHeader blk ⇒ StandardHash (Header blk) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

HasHeader (Header ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

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

ShelleyCompatible proto era ⇒ FromCBOR (Annotator (Header (ShelleyBlock proto era))) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

fromCBOR ∷ Decoder s (Annotator (Header (ShelleyBlock proto era)))

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

ShelleyCompatible proto era ⇒ ToCBOR (Header (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Methods

toCBORHeader (ShelleyBlock proto era) → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (Header (ShelleyBlock proto era)) → Size

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

data Header ByronBlock

Byron header

See ByronBlock for comments on why we cache certain values.

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

type Rep (Header ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

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

Defined in Ouroboros.Consensus.Block.Abstract

newtype Header (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Protocol

type HeaderHash (Header blk) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk) = HeaderHash blk
data Header (ShelleyBlock proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

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

Instances details
Inject GenTx 
Instance details

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

Methods

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

data GenTx ByronBlock

Generalized transactions in Byron

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

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data GenTx ByronBlock
type TranslationError era (GenTx :.: ShelleyBlock proto) 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

type TranslationError era (GenTx :.: ShelleyBlock proto) = TranslationError era WrapTx
type Rep (GenTx (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (GenTx (HardForkBlock xs)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTx xs))))
type Rep (GenTx ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

type Rep (GenTx (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool

type Rep (GenTx (ShelleyBlock proto era)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-shelley-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyTx" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxId (EraCrypto era))) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Tx era))))
type Rep (TxId (GenTx (HardForkBlock xs))) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs))))
type Rep (Validated (GenTx (HardForkBlock xs))) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (Validated (GenTx (HardForkBlock xs))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs))))
type Rep (Validated (GenTx ByronBlock)) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

type Rep (Validated (GenTx ByronBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-byron-0.1.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))) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool

type Rep (Validated (GenTx (ShelleyBlock proto era))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-shelley-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyValidatedTx" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxId (EraCrypto era))) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Validated (Tx era)))))
newtype GenTx (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

newtype TxId (GenTx (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

data TxId (GenTx ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data TxId (GenTx ByronBlock)
newtype TxId (GenTx (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool

newtype TxId (GenTx (ShelleyBlock proto era)) = ShelleyTxId (TxId (EraCrypto era))
newtype Validated (GenTx (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

newtype Validated (GenTx ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data Validated (GenTx (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool

data Validated (GenTx (ShelleyBlock proto era)) = ShelleyValidatedTx !(TxId (EraCrypto era)) !(Validated (Tx era))
data GenTx (ShelleyBlock proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool

data GenTx (ShelleyBlock proto era) = ShelleyTx !(TxId (EraCrypto era)) !(Tx era)

data HardForkApplyTxErr (xs ∷ [Type]) where Source #

Instances

Instances details
CanHardFork xs ⇒ Eq (HardForkApplyTxErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

CanHardFork xs ⇒ Show (HardForkApplyTxErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

Generic (HardForkApplyTxErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

Associated Types

type Rep (HardForkApplyTxErr xs) ∷ TypeType Source #

Typeable xs ⇒ ShowProxy (HardForkApplyTxErr xs ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (HardForkApplyTxErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (HardForkApplyTxErr xs) = D1 ('MetaData "HardForkApplyTxErr" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.1.0.0-inplace" 'False) (C1 ('MetaCons "HardForkApplyTxErrFromEra" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (OneEraApplyTxErr xs))) :+: C1 ('MetaCons "HardForkApplyTxErrWrongEra" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (MismatchEraInfo xs))))

data family TxId tx Source #

A generalized transaction, GenTx, identifier.

Instances

Instances details
type Rep (TxId (GenTx (HardForkBlock xs))) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs))))
newtype TxId (GenTx (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

data TxId (GenTx ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Mempool

data TxId (GenTx ByronBlock)
newtype TxId (GenTx (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool

newtype TxId (GenTx (ShelleyBlock proto era)) = ShelleyTxId (TxId (EraCrypto era))

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 #

Instances

Instances details
CanHardFork xs ⇒ Eq (HardForkLedgerError xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanHardFork xs ⇒ Show (HardForkLedgerError xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Generic (HardForkLedgerError xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Associated Types

type Rep (HardForkLedgerError xs) ∷ TypeType Source #

CanHardFork xs ⇒ NoThunks (HardForkLedgerError xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Methods

noThunks ∷ Context → HardForkLedgerError xs → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → HardForkLedgerError xs → IO (Maybe ThunkInfo) #

showTypeOfProxy (HardForkLedgerError xs) → String #

type Rep (HardForkLedgerError xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep (HardForkLedgerError xs) = D1 ('MetaData "HardForkLedgerError" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.0-inplace" 'False) (C1 ('MetaCons "HardForkLedgerErrorFromEra" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraLedgerError xs))) :+: C1 ('MetaCons "HardForkLedgerErrorWrongEra" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe 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 #

Instances

Instances details
CanHardFork xs ⇒ Eq (HardForkEnvelopeErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanHardFork xs ⇒ Show (HardForkEnvelopeErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Generic (HardForkEnvelopeErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Associated Types

type Rep (HardForkEnvelopeErr xs) ∷ TypeType Source #

CanHardFork xs ⇒ NoThunks (HardForkEnvelopeErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Methods

noThunks ∷ Context → HardForkEnvelopeErr xs → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → HardForkEnvelopeErr xs → IO (Maybe ThunkInfo) #

showTypeOfProxy (HardForkEnvelopeErr xs) → String #

type Rep (HardForkEnvelopeErr xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep (HardForkEnvelopeErr xs) = D1 ('MetaData "HardForkEnvelopeErr" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.0-inplace" 'False) (C1 ('MetaCons "HardForkEnvelopeErrFromEra" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraEnvelopeErr xs))) :+: C1 ('MetaCons "HardForkEnvelopeErrWrongEra" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe 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 #

Instances

Instances details
CanHardFork xs ⇒ Eq (OneEraTipInfo xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs ⇒ Show (OneEraTipInfo xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs ⇒ NoThunks (OneEraTipInfo xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Methods

noThunks ∷ Context → OneEraTipInfo xs → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → OneEraTipInfo xs → IO (Maybe ThunkInfo) #

showTypeOfProxy (OneEraTipInfo xs) → String #

Query

data family BlockQuery blk ∷ TypeType Source #

Different queries supported by the ledger, indexed by the result type.

Instances

Instances details
Inject (SomeSecond BlockQuery) 
Instance details

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

Methods

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

SameDepIndex (BlockQuery blk) ⇒ Eq (SomeSecond BlockQuery blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

(∀ result. Show (BlockQuery blk result)) ⇒ Show (SomeSecond BlockQuery blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

data BlockQuery ByronBlock a 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

data BlockQuery (HardForkBlock xs) a 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

data BlockQuery (HardForkBlock xs) a where
data BlockQuery (ShelleyBlock proto era) a 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

data BlockQuery (ShelleyBlock proto era) a 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.

data Either a b where Source #

The Either type represents values with two possibilities: a value of type Either a b is either Left a or 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

Expand

The type Either String Int is the type of values which can be either a String or an Int. The Left constructor can be used only on Strings, and the Right constructor can be used only on Ints:

>>> 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 Ints.

>>> :{
    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 QueryResultEraMismatchEraMismatchCardanoQueryResult c result

A query from a different era than the ledger's era was sent.

Instances

Instances details
Hashable2 Either 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 ∷ (Int → a → Int) → (Int → b → Int) → IntEither a b → Int

MonadError e (Either e) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → Either e a Source #

catchErrorEither e a → (e → Either e a) → Either e a Source #

(Lift a, Lift b) ⇒ Lift (Either a b ∷ Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftEither a b → Q Exp Source #

liftTypedEither a b → Q (TExp (Either a b)) Source #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=)Either e a → (a → Either e b) → Either e b Source #

(>>)Either e a → Either e b → Either e b Source #

return ∷ a → Either e a Source #

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap ∷ (a0 → b) → Either a a0 → Either a b Source #

(<$) ∷ a0 → Either a b → Either a a0 Source #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure ∷ a → Either e a Source #

(<*>)Either e (a → b) → Either e a → Either e b Source #

liftA2 ∷ (a → b → c) → Either e a → Either e b → Either e c Source #

(*>)Either e a → Either e b → Either e b Source #

(<*)Either e a → Either e b → Either e a Source #

Foldable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

foldMonoid m ⇒ Either a m → m Source #

foldMapMonoid m ⇒ (a0 → m) → Either a a0 → m Source #

foldMap'Monoid m ⇒ (a0 → m) → Either a a0 → m Source #

foldr ∷ (a0 → b → b) → b → Either a a0 → b Source #

foldr' ∷ (a0 → b → b) → b → Either a a0 → b Source #

foldl ∷ (b → a0 → b) → b → Either a a0 → b Source #

foldl' ∷ (b → a0 → b) → b → Either a a0 → b Source #

foldr1 ∷ (a0 → a0 → a0) → Either a a0 → a0 Source #

foldl1 ∷ (a0 → a0 → a0) → Either a a0 → a0 Source #

toListEither a a0 → [a0] Source #

nullEither a a0 → Bool Source #

lengthEither a a0 → Int Source #

elemEq a0 ⇒ a0 → Either a a0 → Bool Source #

maximumOrd a0 ⇒ Either a a0 → a0 Source #

minimumOrd a0 ⇒ Either a a0 → a0 Source #

sumNum a0 ⇒ Either a a0 → a0 Source #

productNum a0 ⇒ Either a a0 → a0 Source #

Traversable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverseApplicative f ⇒ (a0 → f b) → Either a a0 → f (Either a b) Source #

sequenceAApplicative f ⇒ Either a (f a0) → f (Either a a0) Source #

mapMMonad m ⇒ (a0 → m b) → Either a a0 → m (Either a b) Source #

sequenceMonad m ⇒ Either a (m a0) → m (Either a a0) Source #

Hashable a ⇒ Hashable1 (Either a) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt ∷ (Int → a0 → Int) → IntEither a a0 → Int

MonadFailure (Either a) 
Instance details

Defined in Basement.Monad

Associated Types

type Failure (Either a)

Methods

mFail ∷ Failure (Either a) → Either a ()

Generic1 (Either a ∷ TypeType)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (Either a) ∷ k → Type Source #

Methods

from1 ∷ ∀ (a0 ∷ k). Either a a0 → Rep1 (Either a) a0 Source #

to1 ∷ ∀ (a0 ∷ k). Rep1 (Either a) a0 → Either a a0 Source #

MonadBaseControl (Either e) (Either e) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM (Either e) a

Methods

liftBaseWith ∷ (RunInBase (Either e) (Either e) → Either e a) → Either e a

restoreM ∷ StM (Either e) a → Either e a

(Eq a, Eq b) ⇒ Eq (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

(==)Either a b → Either a b → Bool Source #

(/=)Either a b → Either a b → Bool Source #

(Ord a, Ord b) ⇒ Ord (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

compareEither a b → Either a b → Ordering Source #

(<)Either a b → Either a b → Bool Source #

(<=)Either a b → Either a b → Bool Source #

(>)Either a b → Either a b → Bool Source #

(>=)Either a b → Either a b → Bool Source #

maxEither a b → Either a b → Either a b Source #

minEither a b → Either a b → Either a b Source #

(Read a, Read b) ⇒ Read (Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

(Show a, Show b) ⇒ Show (Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

showsPrecIntEither a b → ShowS Source #

showEither a b → String Source #

showList ∷ [Either a b] → ShowS Source #

Generic (Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) ∷ TypeType Source #

Methods

fromEither a b → Rep (Either a b) x Source #

toRep (Either a b) x → Either a b Source #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>)Either a b → Either a b → Either a b Source #

sconcatNonEmpty (Either a b) → Either a b Source #

stimesIntegral b0 ⇒ b0 → Either a b → Either a b Source #

(Structured a, Structured b) ⇒ Structured (Either a b) 
Instance details

Defined in Distribution.Utils.Structured

Methods

structureProxy (Either a b) → Structure Source #

structureHash' ∷ Tagged (Either a b) MD5

(Serialise a, Serialise b) ⇒ Serialise (Either a b) 
Instance details

Defined in Codec.Serialise.Class

Methods

encodeEither a b → Encoding #

decode ∷ Decoder s (Either a b) #

encodeList ∷ [Either a b] → Encoding #

decodeList ∷ Decoder s [Either a b] #

(NoThunks a, NoThunks b) ⇒ NoThunks (Either a b) 
Instance details

Defined in NoThunks.Class

Methods

noThunks ∷ Context → Either a b → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Either a b → IO (Maybe ThunkInfo) #

showTypeOfProxy (Either a b) → String #

(Hashable a, Hashable b) ⇒ Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSaltIntEither a b → Int

hashEither a b → Int

(FromCBOR a, FromCBOR b) ⇒ FromCBOR (Either a b) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR ∷ Decoder s (Either a b)

labelProxy (Either a b) → Text

(ToCBOR a, ToCBOR b) ⇒ ToCBOR (Either a b) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOREither a b → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (Either a b) → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Either a b] → Size

Corecursive (Either a b) 
Instance details

Defined in Data.Functor.Foldable

Methods

embed ∷ Base (Either a b) (Either a b) → Either a b

ana ∷ (a0 → Base (Either a b) a0) → a0 → Either a b

apo ∷ (a0 → Base (Either a b) (Either (Either a b) a0)) → a0 → Either a b

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

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

Recursive (Either a b) 
Instance details

Defined in Data.Functor.Foldable

Methods

projectEither a b → Base (Either a b) (Either a b)

cata ∷ (Base (Either a b) a0 → a0) → Either a b → a0

para ∷ (Base (Either a b) (Either a b, a0) → a0) → Either a b → a0

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

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

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

(Ord a, Ord b) ⇒ Ord (Either a b) 
Instance details

Defined in PlutusTx.Ord

Methods

compareEither a b → Either a b → Ordering

(<)Either a b → Either a b → Bool

(<=)Either a b → Either a b → Bool

(>)Either a b → Either a b → Bool

(>=)Either a b → Either a b → Bool

maxEither a b → Either a b → Either a b

minEither a b → Either a b → Either a b

MonoFoldable (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMapMonoid m ⇒ (Element (Either a b) → m) → Either a b → m

ofoldr ∷ (Element (Either a b) → b0 → b0) → b0 → Either a b → b0

ofoldl' ∷ (a0 → Element (Either a b) → a0) → a0 → Either a b → a0

otoListEither a b → [Element (Either a b)]

oall ∷ (Element (Either a b) → Bool) → Either a b → Bool

oany ∷ (Element (Either a b) → Bool) → Either a b → Bool

onullEither a b → Bool

olengthEither a b → Int

olength64Either a b → Int64

ocompareLengthIntegral i ⇒ Either a b → i → Ordering

otraverse_Applicative f ⇒ (Element (Either a b) → f b0) → Either a b → f ()

ofor_Applicative f ⇒ Either a b → (Element (Either a b) → f b0) → f ()

omapM_Applicative m ⇒ (Element (Either a b) → m ()) → Either a b → m ()

oforM_Applicative m ⇒ Either a b → (Element (Either a b) → m ()) → m ()

ofoldlMMonad m ⇒ (a0 → Element (Either a b) → m a0) → a0 → Either a b → m a0

ofoldMap1ExSemigroup m ⇒ (Element (Either a b) → m) → Either a b → m

ofoldr1Ex ∷ (Element (Either a b) → Element (Either a b) → Element (Either a b)) → Either a b → Element (Either a b)

ofoldl1Ex' ∷ (Element (Either a b) → Element (Either a b) → Element (Either a b)) → Either a b → Element (Either a b)

headExEither a b → Element (Either a b)

lastExEither a b → Element (Either a b)

unsafeHeadEither a b → Element (Either a b)

unsafeLastEither a b → Element (Either a b)

maximumByEx ∷ (Element (Either a b) → Element (Either a b) → Ordering) → Either a b → Element (Either a b)

minimumByEx ∷ (Element (Either a b) → Element (Either a b) → Ordering) → Either a b → Element (Either a b)

oelem ∷ Element (Either a b) → Either a b → Bool

onotElem ∷ Element (Either a b) → Either a b → Bool

MonoTraversable (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverseApplicative f ⇒ (Element (Either a b) → f (Element (Either a b))) → Either a b → f (Either a b)

omapMApplicative m ⇒ (Element (Either a b) → m (Element (Either a b))) → Either a b → m (Either a b)

MonoFunctor (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

omap ∷ (Element (Either a b) → Element (Either a b)) → Either a b → Either a b

MonoPointed (Either a b) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint ∷ Element (Either a b) → Either a b

(a ~ a', b ~ b') ⇒ Each (Either a a') (Either b b') a b 
Instance details

Defined in Lens.Micro.Internal

Methods

each ∷ Traversal (Either a a') (Either b b') a b

type Failure (Either a) 
Instance details

Defined in Basement.Monad

type Failure (Either a) = a
type StM (Either e) a 
Instance details

Defined in Control.Monad.Trans.Control

type StM (Either e) a = a
type Rep1 (Either a ∷ TypeType) 
Instance details

Defined in GHC.Generics

type Rep (Either a b) 
Instance details

Defined in GHC.Generics

type Base (Either a b) 
Instance details

Defined in Data.Functor.Foldable

type Base (Either a b) = Const (Either a b) ∷ TypeType
type Element (Either a b) 
Instance details

Defined in Data.MonoTraversable

type Element (Either a b) = b

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, ... CodecConfigs.

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

Instances details
CanHardFork xs ⇒ NoThunks (CodecConfig (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (CodecConfig (HardForkBlock xs)) → String #

newtype CodecConfig ByronBlock 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (CodecConfig ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (CodecConfig ByronBlock) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-byron-0.1.0.0-inplace" 'True) (C1 ('MetaCons "ByronCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "getByronEpochSlots") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpochSlots)))
type Rep (CodecConfig (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Config

type Rep (CodecConfig (ShelleyBlock proto era)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Shelley.Ledger.Config" "ouroboros-consensus-shelley-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyCodecConfig" 'PrefixI 'False) (U1TypeType))
newtype CodecConfig (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data CodecConfig (ShelleyBlock proto era)

No particular codec configuration is needed for Shelley

Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Config

BlockConfig

data family BlockConfig blk Source #

Static configuration required to work with this type of blocks

Instances

Instances details
CanHardFork xs ⇒ NoThunks (BlockConfig (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (BlockConfig (HardForkBlock xs)) → String #

data BlockConfig ByronBlock

Extended configuration we need for Byron

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

data BlockConfig ByronBlock = ByronConfig {}
type Rep (BlockConfig ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (BlockConfig ByronBlock) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-byron-0.1.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)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Config

type Rep (BlockConfig (ShelleyBlock proto era)) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Shelley.Ledger.Config" "ouroboros-consensus-shelley-0.1.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 (EraCrypto era)) (VKey 'BlockIssuer (EraCrypto era)))))))
newtype BlockConfig (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data BlockConfig (ShelleyBlock proto era) 
Instance details

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, ... BlockConfigs.

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, ... StorageConfigs.

data family StorageConfig blk Source #

Config needed for the NodeInitStorage class. Defined here to avoid circular dependencies.

Instances

Instances details
CanHardFork xs ⇒ NoThunks (StorageConfig (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (StorageConfig (HardForkBlock xs)) → String #

newtype StorageConfig ByronBlock 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (StorageConfig ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Config

type Rep (StorageConfig ByronBlock) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Byron.Ledger.Config" "ouroboros-consensus-byron-0.1.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)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Config

type Rep (StorageConfig (ShelleyBlock proto era)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Shelley.Ledger.Config" "ouroboros-consensus-shelley-0.1.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) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data StorageConfig (ShelleyBlock proto era) 
Instance details

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, ... PartialConsensusConfigs.

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

Instances details
Generic (ConsensusConfig (PBft c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (ConsensusConfig (PBft c)) ∷ TypeType Source #

Generic (ConsensusConfig (HardForkProtocol xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Associated Types

type Rep (ConsensusConfig (HardForkProtocol xs)) ∷ TypeType Source #

Generic (ConsensusConfig (Praos c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Associated Types

type Rep (ConsensusConfig (Praos c)) ∷ TypeType Source #

Generic (ConsensusConfig (TPraos c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep (ConsensusConfig (TPraos c)) ∷ TypeType Source #

NoThunks (ConsensusConfig (PBft c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Methods

noThunks ∷ Context → ConsensusConfig (PBft c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (PBft c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (PBft c)) → String #

CanHardFork xs ⇒ NoThunks (ConsensusConfig (HardForkProtocol xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → ConsensusConfig (HardForkProtocol xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (HardForkProtocol xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (HardForkProtocol xs)) → String #

PraosCrypto c ⇒ NoThunks (ConsensusConfig (Praos c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Methods

noThunks ∷ Context → ConsensusConfig (Praos c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (Praos c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (Praos c)) → String #

PraosCrypto c ⇒ NoThunks (ConsensusConfig (TPraos c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

noThunks ∷ Context → ConsensusConfig (TPraos c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (TPraos c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (TPraos c)) → String #

type Rep (ConsensusConfig (PBft c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (ConsensusConfig (PBft c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "PBftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftParams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PBftParams)))
type Rep (ConsensusConfig (HardForkProtocol xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type Rep (ConsensusConfig (HardForkProtocol xs)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.HardFork.Combinator.Basics" "ouroboros-consensus-0.1.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 (Praos c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep (ConsensusConfig (Praos c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.Praos" "ouroboros-consensus-protocol-0.1.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)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep (ConsensusConfig (TPraos c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.1.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)))))
newtype ConsensusConfig (PBft c)

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data ConsensusConfig (HardForkProtocol xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data ConsensusConfig (Praos c)

Static configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data ConsensusConfig (TPraos c)

Static configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

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, ... PartialLedgerConfigs.

NOTE: not LedgerConfig, but PartialLedgerConfig.

data HardForkLedgerConfig (xs ∷ [Type]) where Source #

Instances

Instances details
Generic (HardForkLedgerConfig xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Associated Types

type Rep (HardForkLedgerConfig xs) ∷ TypeType Source #

CanHardFork xs ⇒ NoThunks (HardForkLedgerConfig xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → HardForkLedgerConfig xs → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → HardForkLedgerConfig xs → IO (Maybe ThunkInfo) #

showTypeOfProxy (HardForkLedgerConfig xs) → String #

type Rep (HardForkLedgerConfig xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type Rep (HardForkLedgerConfig xs) = D1 ('MetaData "HardForkLedgerConfig" "Ouroboros.Consensus.HardFork.Combinator.Basics" "ouroboros-consensus-0.1.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 = LedgerState (CardanoBlock c) 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 Source #

Ledger state associated with a block

Instances

Instances details
Inject LedgerState 
Instance details

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

Methods

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

CanHardFork xs ⇒ Eq (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

CanHardFork xs ⇒ Show (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

CanHardFork xs ⇒ NoThunks (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → LedgerState (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → LedgerState (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (LedgerState (HardForkBlock xs)) → String #

data LedgerState ByronBlock 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type TranslationError era (LedgerState :.: ShelleyBlock proto) 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

type TranslationError era (LedgerState :.: ShelleyBlock proto) = Void
type Rep (LedgerState ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (LedgerState ByronBlock) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-byron-0.1.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)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (LedgerState (ShelleyBlock proto era)) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-shelley-0.1.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))))
type Rep (Ticked (LedgerState (HardForkBlock xs))) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep (Ticked (LedgerState (HardForkBlock xs))) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.0-inplace" 'False) (C1 ('MetaCons "TickedHardForkLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedHardForkLedgerStateTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransitionInfo) :*: S1 ('MetaSel ('Just "tickedHardForkLedgerStatePerEra") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HardForkState (Ticked :.: LedgerState) xs))))
type Rep (Ticked (LedgerState ByronBlock)) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (Ticked (LedgerState ByronBlock)) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-byron-0.1.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))) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (Ticked (LedgerState (ShelleyBlock proto era))) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-shelley-0.1.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)))))
type LedgerCfg (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type LedgerCfg (LedgerState ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type LedgerCfg (LedgerState (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type AuxLedgerEvent (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type AuxLedgerEvent (LedgerState ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type AuxLedgerEvent (LedgerState (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type LedgerErr (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type LedgerErr (LedgerState ByronBlock) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type LedgerErr (LedgerState ByronBlock) = ChainValidationError
type LedgerErr (LedgerState (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

newtype LedgerState (HardForkBlock xs) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data Ticked (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked (LedgerState ByronBlock)

The ticked Byron ledger state

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

data Ticked (LedgerState (ShelleyBlock proto era))

Ticking only affects the state itself

Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type HeaderHash (LedgerState blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

data LedgerState (ShelleyBlock proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

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 ∷ TypeType) (xs ∷ [Type]) where Source #

Generic hard fork state

This is used both for the consensus state and the ledger state.

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

Instances details
Eq EraMismatch 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Show EraMismatch 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Generic EraMismatch 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Associated Types

type Rep EraMismatchTypeType Source #

type Rep EraMismatch 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

type Rep EraMismatch = D1 ('MetaData "EraMismatch" "Ouroboros.Consensus.HardFork.Combinator.AcrossEras" "ouroboros-consensus-0.1.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)))