ouroboros-consensus-0.18.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Synopsis

Value for each era

Values for some eras

Value for one era

newtype OneEraBlock xs Source #

Constructors

OneEraBlock 

Fields

Instances

Instances details
CanHardFork xs ⇒ Show (OneEraBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Methods

showsPrecIntOneEraBlock xs → ShowS #

showOneEraBlock xs → String #

showList ∷ [OneEraBlock xs] → ShowS #

newtype OneEraGenTx xs Source #

Constructors

OneEraGenTx 

Fields

newtype OneEraGenTxId xs Source #

Constructors

OneEraGenTxId 

Instances

Instances details
CanHardFork xs ⇒ Show (OneEraGenTxId xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Methods

showsPrecIntOneEraGenTxId xs → ShowS #

showOneEraGenTxId xs → String #

showList ∷ [OneEraGenTxId xs] → ShowS #

CanHardFork xs ⇒ Eq (OneEraGenTxId xs) Source #

This instance compares the underlying raw hash (toRawTxIdHash) of the TxId.

Note that this means that transactions in different eras can have equal TxIds. This should only be the case when the transaction format is backwards compatible from one era to the next.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Methods

(==)OneEraGenTxId xs → OneEraGenTxId xs → Bool #

(/=)OneEraGenTxId xs → OneEraGenTxId xs → Bool #

CanHardFork xs ⇒ Ord (OneEraGenTxId xs) Source #

See the corresponding Eq instance.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs ⇒ NoThunks (OneEraGenTxId xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

newtype OneEraHash (xs ∷ [k]) Source #

The hash for an era

This type is special: we don't use an NS here, because the hash by itself should not allow us to differentiate between eras. If it did, the size of the hash would necessarily have to increase, and that leads to trouble. So, the type parameter xs here is merely a phantom one, and we just store the underlying raw hash.

Constructors

OneEraHash 

Instances

Instances details
Show (OneEraHash xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Methods

showsPrecIntOneEraHash xs → ShowS #

showOneEraHash xs → String #

showList ∷ [OneEraHash xs] → ShowS #

Eq (OneEraHash xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Methods

(==)OneEraHash xs → OneEraHash xs → Bool #

(/=)OneEraHash xs → OneEraHash xs → Bool #

Ord (OneEraHash xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Methods

compareOneEraHash xs → OneEraHash xs → Ordering #

(<)OneEraHash xs → OneEraHash xs → Bool #

(<=)OneEraHash xs → OneEraHash xs → Bool #

(>)OneEraHash xs → OneEraHash xs → Bool #

(>=)OneEraHash xs → OneEraHash xs → Bool #

maxOneEraHash xs → OneEraHash xs → OneEraHash xs #

minOneEraHash xs → OneEraHash xs → OneEraHash xs #

NoThunks (OneEraHash xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Condense (OneEraHash xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Methods

condenseOneEraHash xs → String Source #

Serialise (OneEraHash xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

newtype OneEraIsLeader xs Source #

Constructors

OneEraIsLeader 

Value for two different eras

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
Generic EraMismatch Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Associated Types

type Rep EraMismatchTypeType #

Show EraMismatch Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

Eq EraMismatch Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

type Rep EraMismatch Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

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

newtype MismatchEraInfo xs Source #

Constructors

MismatchEraInfo 

Fields

mismatchFutureEraSListI xs ⇒ MismatchEraInfo (x ': xs) → NS SingleEraInfo xs Source #

A mismatch _must_ involve a future era

mkEraMismatchSListI xs ⇒ MismatchEraInfo xs → EraMismatch Source #

When a transaction or block from a certain era was applied to a ledger from another era, we get a MismatchEraInfo.

Given such a MismatchEraInfo, return the name of the era of the transaction/block and the name of the era of the ledger.

Utility

getSameValue ∷ ∀ xs a. (IsNonEmpty xs, Eq a, SListI xs, HasCallStack) ⇒ NP (K a) xs → a Source #