ouroboros-consensus:unstable-byronspec
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Synopsis

Type family instances

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

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

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 #

(Typeable m, Typeable a) ⇒ ShowProxy (GenTx (DualBlock m a) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showProxy ∷ Proxy (GenTx (DualBlock m a)) → String #

(Typeable m, Typeable a) ⇒ ShowProxy (TxId (GenTx (DualBlock m a)) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showProxy ∷ Proxy (TxId (GenTx (DualBlock m a))) → String #

Eq (GenTxId m) ⇒ Eq (TxId (GenTx (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

(==) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool #

(/=) ∷ TxId (GenTx (DualBlock m a)) → TxId (GenTx (DualBlock m a)) → Bool #

Ord (GenTxId m) ⇒ Ord (TxId (GenTx (DualBlock m a))) Source # 
Instance details

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)) #

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

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Associated Types

type Rep (Validated (GenTx ByronSpecBlock)) 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx ByronSpecBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-4.0.0.0-inplace-unstable-byronspec" 'True) (C1 ('MetaCons "ValidatedByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronSpecBlock))))
Generic (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Associated Types

type Rep (GenTx ByronSpecBlock) 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (GenTx ByronSpecBlock) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-4.0.0.0-inplace-unstable-byronspec" 'True) (C1 ('MetaCons "ByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByronSpecGenTx)))
Bridge m a ⇒ Show (Validated (GenTx (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec ∷ Int → Validated (GenTx (DualBlock m a)) → ShowS #

show ∷ Validated (GenTx (DualBlock m a)) → String #

showList ∷ [Validated (GenTx (DualBlock m a))] → ShowS #

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

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Bridge m a ⇒ Show (GenTx (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec ∷ Int → GenTx (DualBlock m a) → ShowS #

show ∷ GenTx (DualBlock m a) → String #

showList ∷ [GenTx (DualBlock m a)] → ShowS #

Show (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Show (GenTxId m) ⇒ Show (TxId (GenTx (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec ∷ Int → TxId (GenTx (DualBlock m a)) → ShowS #

show ∷ TxId (GenTx (DualBlock m a)) → String #

showList ∷ [TxId (GenTx (DualBlock m a))] → ShowS #

NoThunks (Validated (GenTx (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

NoThunks (GenTx (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

NoThunks (TxId (GenTx (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Bridge m a ⇒ HasTxId (GenTx (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

txId ∷ GenTx (DualBlock m a) → TxId (GenTx (DualBlock m a)) Source #

HasRawTxId (GenTxId m) ⇒ HasRawTxId (TxId (GenTx (DualBlock m a))) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type RawTxId (TxId (GenTx (DualBlock m a))) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type RawTxId (TxId (GenTx (DualBlock m a))) = RawTxId (GenTxId m)

Methods

getRawTxId ∷ TxId (GenTx (DualBlock m a)) → RawTxId (TxId (GenTx (DualBlock m a)))

Serialise (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

newtype GenTx ByronSpecBlock Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx (HardForkBlock xs))) Source # 
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-4.0.0.0-inplace" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs))))
type Rep (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx ByronSpecBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-4.0.0.0-inplace-unstable-byronspec" 'True) (C1 ('MetaCons "ValidatedByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronSpecBlock))))
type Rep (GenTx (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

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

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (GenTx ByronSpecBlock) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-4.0.0.0-inplace-unstable-byronspec" 'True) (C1 ('MetaCons "ByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByronSpecGenTx)))
type Rep (TxId (GenTx (HardForkBlock xs))) Source # 
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-4.0.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs))))
newtype Validated (GenTx (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

data Validated (GenTx (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

newtype Validated (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

newtype GenTx (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

newtype TxId (GenTx (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

newtype TxId (GenTx (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type RawTxId (TxId (GenTx (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

type RawTxId (TxId (GenTx (HardForkBlock xs))) = ShortByteString
type RawTxId (TxId (GenTx (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type RawTxId (TxId (GenTx (DualBlock m a))) = RawTxId (GenTxId m)
data GenTx (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data family Validated x Source #

" Validated " transaction or block

The ledger defines how to validate transactions and blocks. It's possible the type before and after validation may be distinct (eg Alonzo transactions), which originally motivated this family.

We also gain the related benefit that certain interface functions, such as those that reapply blocks, can have a more precise type now. TODO

Similarly, the Node-to-Client mini protocols can explicitly indicate that the client trusts the blocks from the local server, by having the server send Validated blocks to the client. TODO

Note that validation has different implications for a transaction than for a block. In particular, a validated transaction can be " reapplied " to different ledger states, whereas a validated block must only be " reapplied " to the exact same ledger state (eg as part of rebuilding from an on-disk ledger snapshot).

Since the ledger defines validation, see the ledger details for concrete examples of what determines the validity (wrt to a LedgerState) of a transaction and/or block. Example properties include: a transaction's claimed inputs exist and are still unspent, a block carries a sufficient cryptographic signature, etc.

Instances

Instances details
Generic (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Associated Types

type Rep (Validated (GenTx ByronSpecBlock)) 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx ByronSpecBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-4.0.0.0-inplace-unstable-byronspec" 'True) (C1 ('MetaCons "ValidatedByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronSpecBlock))))
Bridge m a ⇒ Show (Validated (GenTx (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec ∷ Int → Validated (GenTx (DualBlock m a)) → ShowS #

show ∷ Validated (GenTx (DualBlock m a)) → String #

showList ∷ [Validated (GenTx (DualBlock m a))] → ShowS #

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

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

NoThunks (Validated (GenTx (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx (HardForkBlock xs))) Source # 
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-4.0.0.0-inplace" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs))))
type Rep (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx ByronSpecBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-4.0.0.0-inplace-unstable-byronspec" 'True) (C1 ('MetaCons "ValidatedByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronSpecBlock))))
newtype Validated (GenTx (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

data Validated (GenTx (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

newtype Validated (GenTx ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

Orphan instances

LedgerSupportsMempool ByronSpecBlock Source # 
Instance details

Methods

txInvariant ∷ GenTx ByronSpecBlock → Bool Source #

applyTx ∷ LedgerConfig ByronSpecBlock → WhetherToIntervene → SlotNo → GenTx ByronSpecBlock → TickedLedgerState ByronSpecBlock ValuesMK → Except (ApplyTxErr ByronSpecBlock) (TickedLedgerState ByronSpecBlock DiffMK, Validated (GenTx ByronSpecBlock)) Source #

reapplyTx ∷ LedgerConfig ByronSpecBlock → SlotNo → Validated (GenTx ByronSpecBlock) → TickedLedgerState ByronSpecBlock ValuesMK → Except (ApplyTxErr ByronSpecBlock) (TickedLedgerState ByronSpecBlock ValuesMK) Source #

reapplyTxs ∷ ∀ (wtd ∷ WhatToDoWithTxDiffs) extra. LedgerConfig ByronSpecBlock → SlotNo → [(Validated (GenTx ByronSpecBlock), InputTxDiffs ByronSpecBlock wtd, extra)] → TickedLedgerState ByronSpecBlock ValuesMK → ReapplyTxsResult extra ByronSpecBlock wtd Source #

txForgetValidated ∷ Validated (GenTx ByronSpecBlock) → GenTx ByronSpecBlock Source #

getTransactionKeySets ∷ GenTx ByronSpecBlock → LedgerTables ByronSpecBlock KeysMK Source #

prependMempoolDiffs ∷ TickedLedgerState ByronSpecBlock DiffMK → TickedLedgerState ByronSpecBlock DiffMK → TickedLedgerState ByronSpecBlock DiffMK Source #

applyMempoolDiffs ∷ LedgerTables ByronSpecBlock ValuesMK → LedgerTables ByronSpecBlock KeysMK → TickedLedgerState ByronSpecBlock DiffMK → TickedLedgerState ByronSpecBlock ValuesMK Source #

mkMempoolApplyTxError ∷ ∀ (mk ∷ MapKind). TickedLedgerState ByronSpecBlock mk → Text → Maybe (ApplyTxErr ByronSpecBlock) Source #

TxLimits ByronSpecBlock Source # 
Instance details

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

Associated Types

type Rep (Validated (GenTx ByronSpecBlock)) 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (Validated (GenTx ByronSpecBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-4.0.0.0-inplace-unstable-byronspec" 'True) (C1 ('MetaCons "ValidatedByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetValidatedByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx ByronSpecBlock))))
Generic (GenTx ByronSpecBlock) Source # 
Instance details

Associated Types

type Rep (GenTx ByronSpecBlock) 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool

type Rep (GenTx ByronSpecBlock) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-4.0.0.0-inplace-unstable-byronspec" 'True) (C1 ('MetaCons "ByronSpecGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unByronSpecGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByronSpecGenTx)))
Show (Validated (GenTx ByronSpecBlock)) Source # 
Instance details

Show (GenTx ByronSpecBlock) Source # 
Instance details

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

NoThunks (GenTx ByronSpecBlock) Source # 
Instance details

Serialise (GenTx ByronSpecBlock) Source # 
Instance details