Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.ByronSpec.Ledger.Mempool
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
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
Generic (Validated (GenTx ByronSpecBlock)) Source # | |||||
Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool Associated Types
Methods from ∷ Validated (GenTx ByronSpecBlock) → Rep (Validated (GenTx ByronSpecBlock)) x # to ∷ Rep (Validated (GenTx ByronSpecBlock)) x → Validated (GenTx ByronSpecBlock) # | |||||
Bridge m a ⇒ Show (Validated (GenTx (DualBlock m a))) | |||||
Show (Validated (GenTx ByronSpecBlock)) Source # | |||||
Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool | |||||
NoThunks (Validated (GenTx (DualBlock m a))) | |||||
NoThunks (Validated (GenTx ByronSpecBlock)) Source # | |||||
Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool | |||||
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.25.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 # | |||||
Defined in Ouroboros.Consensus.ByronSpec.Ledger.Mempool type Rep (Validated (GenTx ByronSpecBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.ByronSpec.Ledger.Mempool" "ouroboros-consensus-cardano-0.24.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)) | |||||
data Validated (GenTx (DualBlock m a)) | |||||
Defined in Ouroboros.Consensus.Ledger.Dual data Validated (GenTx (DualBlock m a)) = ValidatedDualGenTx {
| |||||
newtype Validated (GenTx ByronSpecBlock) Source # | |||||
Orphan instances
LedgerSupportsMempool ByronSpecBlock Source # | |||||
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 ∷ ComputeDiffs → LedgerConfig ByronSpecBlock → SlotNo → Validated (GenTx ByronSpecBlock) → TickedLedgerState ByronSpecBlock ValuesMK → Except (ApplyTxErr ByronSpecBlock) (TickedLedgerState ByronSpecBlock TrackingMK) Source # reapplyTxs ∷ ComputeDiffs → LedgerConfig ByronSpecBlock → SlotNo → [(Validated (GenTx ByronSpecBlock), extra)] → TickedLedgerState ByronSpecBlock ValuesMK → ReapplyTxsResult extra ByronSpecBlock Source # txForgetValidated ∷ Validated (GenTx ByronSpecBlock) → GenTx ByronSpecBlock Source # getTransactionKeySets ∷ GenTx ByronSpecBlock → LedgerTables (LedgerState ByronSpecBlock) KeysMK Source # prependMempoolDiffs ∷ TickedLedgerState ByronSpecBlock DiffMK → TickedLedgerState ByronSpecBlock DiffMK → TickedLedgerState ByronSpecBlock DiffMK Source # applyMempoolDiffs ∷ LedgerTables (LedgerState ByronSpecBlock) ValuesMK → LedgerTables (LedgerState ByronSpecBlock) KeysMK → TickedLedgerState ByronSpecBlock DiffMK → TickedLedgerState ByronSpecBlock ValuesMK Source # | |||||
TxLimits ByronSpecBlock Source # | |||||
Associated Types
Methods txMeasure ∷ LedgerConfig ByronSpecBlock → TickedLedgerState ByronSpecBlock ValuesMK → GenTx ByronSpecBlock → Except (ApplyTxErr ByronSpecBlock) (TxMeasure ByronSpecBlock) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig ByronSpecBlock → TickedLedgerState ByronSpecBlock mk → TxMeasure ByronSpecBlock Source # | |||||
Generic (Validated (GenTx ByronSpecBlock)) Source # | |||||
Associated Types
Methods from ∷ Validated (GenTx ByronSpecBlock) → Rep (Validated (GenTx ByronSpecBlock)) x # to ∷ Rep (Validated (GenTx ByronSpecBlock)) x → Validated (GenTx ByronSpecBlock) # | |||||
Generic (GenTx ByronSpecBlock) Source # | |||||
Associated Types
Methods from ∷ GenTx ByronSpecBlock → Rep (GenTx ByronSpecBlock) x # to ∷ Rep (GenTx ByronSpecBlock) x → GenTx ByronSpecBlock # | |||||
Show (Validated (GenTx ByronSpecBlock)) Source # | |||||
Show (GenTx ByronSpecBlock) Source # | |||||
NoThunks (Validated (GenTx ByronSpecBlock)) Source # | |||||
NoThunks (GenTx ByronSpecBlock) Source # | |||||
Serialise (GenTx ByronSpecBlock) Source # | |||||
Methods encode ∷ GenTx ByronSpecBlock → Encoding Source # decode ∷ Decoder s (GenTx ByronSpecBlock) Source # encodeList ∷ [GenTx ByronSpecBlock] → Encoding Source # decodeList ∷ Decoder s [GenTx ByronSpecBlock] Source # |