Safe Haskell | None |
---|---|
Language | Haskell2010 |
Test.Consensus.Mempool.Fairness.TestBlock
Synopsis
- type TestBlock = TestBlockWith Tx
- data family PayloadDependentState ptype (mk ∷ MapKind)
- data Tx
- mkGenTx ∷ Int → ByteSize32 → GenTx TestBlock
- txSize ∷ Tx → ByteSize32
- unGenTx ∷ GenTx TestBlock → Tx
Documentation
type TestBlock = TestBlockWith Tx Source #
data family PayloadDependentState ptype (mk ∷ MapKind) Source #
Instances
The fairness test for transaction sizes only cares about said aspect.
We do need to keep track of the transaction id.
All transactions will be accepted by the mempool.
Instances
NFData Tx Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
Generic Tx Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
| |||||||||
Show Tx Source # | |||||||||
Eq Tx Source # | |||||||||
Ord Tx Source # | |||||||||
NoThunks Tx Source # | |||||||||
LedgerSupportsMempool TestBlock Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods txInvariant ∷ GenTx TestBlock → Bool Source # applyTx ∷ LedgerConfig TestBlock → WhetherToIntervene → SlotNo → GenTx TestBlock → TickedLedgerState TestBlock ValuesMK → Except (ApplyTxErr TestBlock) (TickedLedgerState TestBlock DiffMK, Validated (GenTx TestBlock)) Source # reapplyTx ∷ ComputeDiffs → LedgerConfig TestBlock → SlotNo → Validated (GenTx TestBlock) → TickedLedgerState TestBlock ValuesMK → Except (ApplyTxErr TestBlock) (TickedLedgerState TestBlock TrackingMK) Source # reapplyTxs ∷ ComputeDiffs → LedgerConfig TestBlock → SlotNo → [(Validated (GenTx TestBlock), extra)] → TickedLedgerState TestBlock ValuesMK → ReapplyTxsResult extra TestBlock Source # txForgetValidated ∷ Validated (GenTx TestBlock) → GenTx TestBlock Source # getTransactionKeySets ∷ GenTx TestBlock → LedgerTables (LedgerState TestBlock) KeysMK Source # prependMempoolDiffs ∷ TickedLedgerState TestBlock DiffMK → TickedLedgerState TestBlock DiffMK → TickedLedgerState TestBlock DiffMK Source # applyMempoolDiffs ∷ LedgerTables (LedgerState TestBlock) ValuesMK → LedgerTables (LedgerState TestBlock) KeysMK → TickedLedgerState TestBlock DiffMK → TickedLedgerState TestBlock ValuesMK Source # | |||||||||
TxLimits TestBlock Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
Methods txMeasure ∷ LedgerConfig TestBlock → TickedLedgerState TestBlock ValuesMK → GenTx TestBlock → Except (ApplyTxErr TestBlock) (TxMeasure TestBlock) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig TestBlock → TickedLedgerState TestBlock mk → TxMeasure TestBlock Source # | |||||||||
PayloadSemantics Tx Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
| |||||||||
NFData (GenTx TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
Generic (CodecConfig TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
Methods from ∷ CodecConfig TestBlock → Rep (CodecConfig TestBlock) x # to ∷ Rep (CodecConfig TestBlock) x → CodecConfig TestBlock # | |||||||||
Generic (StorageConfig TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
Methods from ∷ StorageConfig TestBlock → Rep (StorageConfig TestBlock) x # to ∷ Rep (StorageConfig TestBlock) x → StorageConfig TestBlock # | |||||||||
Generic (Validated (GenTx TestBlock)) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
| |||||||||
Generic (GenTx TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
| |||||||||
Generic (TxId (GenTx TestBlock)) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
| |||||||||
Show (CodecConfig TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
Show (StorageConfig TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
Show (Validated (GenTx TestBlock)) Source # | |||||||||
Show (GenTx TestBlock) Source # | |||||||||
Show (TxId (GenTx TestBlock)) Source # | |||||||||
Eq (GenTx TestBlock) Source # | |||||||||
Eq (TxId (GenTx TestBlock)) Source # | |||||||||
Ord (GenTx TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods compare ∷ GenTx TestBlock → GenTx TestBlock → Ordering # (<) ∷ GenTx TestBlock → GenTx TestBlock → Bool # (<=) ∷ GenTx TestBlock → GenTx TestBlock → Bool # (>) ∷ GenTx TestBlock → GenTx TestBlock → Bool # (>=) ∷ GenTx TestBlock → GenTx TestBlock → Bool # | |||||||||
Ord (TxId (GenTx TestBlock)) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods compare ∷ TxId (GenTx TestBlock) → TxId (GenTx TestBlock) → Ordering # (<) ∷ TxId (GenTx TestBlock) → TxId (GenTx TestBlock) → Bool # (<=) ∷ TxId (GenTx TestBlock) → TxId (GenTx TestBlock) → Bool # (>) ∷ TxId (GenTx TestBlock) → TxId (GenTx TestBlock) → Bool # (>=) ∷ TxId (GenTx TestBlock) → TxId (GenTx TestBlock) → Bool # max ∷ TxId (GenTx TestBlock) → TxId (GenTx TestBlock) → TxId (GenTx TestBlock) # min ∷ TxId (GenTx TestBlock) → TxId (GenTx TestBlock) → TxId (GenTx TestBlock) # | |||||||||
NoThunks (CodecConfig TestBlock) Source # | |||||||||
NoThunks (StorageConfig TestBlock) Source # | |||||||||
NoThunks (Validated (GenTx TestBlock)) Source # | |||||||||
NoThunks (GenTx TestBlock) Source # | |||||||||
NoThunks (TxId (GenTx TestBlock)) Source # | |||||||||
HasTxId (GenTx TestBlock) Source # | |||||||||
CanStowLedgerTables (LedgerState TestBlock) Source # | |||||||||
HasLedgerTables (LedgerState TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState TestBlock mk → LedgerTables (LedgerState TestBlock) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState TestBlock any → LedgerTables (LedgerState TestBlock) mk → LedgerState TestBlock mk Source # | |||||||||
LedgerTablesAreTrivial (LedgerState TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). LedgerState TestBlock mk → LedgerState TestBlock mk' Source # | |||||||||
CanUpgradeLedgerTables (LedgerState TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState TestBlock mk1 → LedgerState TestBlock mk2 → LedgerTables (LedgerState TestBlock) ValuesMK → LedgerTables (LedgerState TestBlock) ValuesMK Source # | |||||||||
Generic (PayloadDependentState Tx mk) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Associated Types
Methods from ∷ PayloadDependentState Tx mk → Rep (PayloadDependentState Tx mk) x # to ∷ Rep (PayloadDependentState Tx mk) x → PayloadDependentState Tx mk # | |||||||||
Show (PayloadDependentState Tx mk) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
Eq (PayloadDependentState Tx mk) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods (==) ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → Bool # (/=) ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → Bool # | |||||||||
Ord (PayloadDependentState Tx mk) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods compare ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → Ordering # (<) ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → Bool # (<=) ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → Bool # (>) ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → Bool # (>=) ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → Bool # max ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → PayloadDependentState Tx mk # min ∷ PayloadDependentState Tx mk → PayloadDependentState Tx mk → PayloadDependentState Tx mk # | |||||||||
NoThunks (PayloadDependentState Tx mk) Source # | |||||||||
HasLedgerTables (Ticked (LedgerState TestBlock)) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked (LedgerState TestBlock) mk → LedgerTables (Ticked (LedgerState TestBlock)) mk Source # withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked (LedgerState TestBlock) any → LedgerTables (Ticked (LedgerState TestBlock)) mk → Ticked (LedgerState TestBlock) mk Source # | |||||||||
LedgerTablesAreTrivial (Ticked (LedgerState TestBlock)) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). Ticked (LedgerState TestBlock) mk → Ticked (LedgerState TestBlock) mk' Source # | |||||||||
Serialise (PayloadDependentState Tx mk) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods encode ∷ PayloadDependentState Tx mk → Encoding Source # decode ∷ Decoder s (PayloadDependentState Tx mk) Source # encodeList ∷ [PayloadDependentState Tx mk] → Encoding Source # decodeList ∷ Decoder s [PayloadDependentState Tx mk] Source # | |||||||||
IndexedMemPack (LedgerState TestBlock EmptyMK) Void Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock Methods indexedPackedByteCount ∷ LedgerState TestBlock EmptyMK → Void → Int Source # indexedPackM ∷ LedgerState TestBlock EmptyMK → Void → Pack s () Source # indexedUnpackM ∷ Buffer b ⇒ LedgerState TestBlock EmptyMK → Unpack b Void Source # indexedTypeName ∷ LedgerState TestBlock EmptyMK → String Source # | |||||||||
type Rep Tx Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock type Rep Tx = D1 ('MetaData "Tx" "Test.Consensus.Mempool.Fairness.TestBlock" "ouroboros-consensus-0.26.0.0-inplace-consensus-test" 'False) (C1 ('MetaCons "Tx" 'PrefixI 'True) (S1 ('MetaSel ('Just "txNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "txSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteSize32))) | |||||||||
data CodecConfig TestBlock Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
data StorageConfig TestBlock Source # | |||||||||
type ApplyTxErr TestBlock Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
newtype GenTx TestBlock Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
type TxMeasure TestBlock Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
type PayloadDependentError Tx Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
data PayloadDependentState Tx mk Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
type Rep (CodecConfig TestBlock) Source # | |||||||||
type Rep (StorageConfig TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
type Rep (Validated (GenTx TestBlock)) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock type Rep (Validated (GenTx TestBlock)) = D1 ('MetaData "Validated" "Test.Consensus.Mempool.Fairness.TestBlock" "ouroboros-consensus-0.26.0.0-inplace-consensus-test" 'True) (C1 ('MetaCons "ValidatedGenTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx TestBlock)))) | |||||||||
type Rep (GenTx TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock type Rep (GenTx TestBlock) = D1 ('MetaData "GenTx" "Test.Consensus.Mempool.Fairness.TestBlock" "ouroboros-consensus-0.26.0.0-inplace-consensus-test" 'True) (C1 ('MetaCons "TestBlockGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tx))) | |||||||||
type Rep (TxId (GenTx TestBlock)) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock type Rep (TxId (GenTx TestBlock)) = D1 ('MetaData "TxId" "Test.Consensus.Mempool.Fairness.TestBlock" "ouroboros-consensus-0.26.0.0-inplace-consensus-test" 'True) (C1 ('MetaCons "TestBlockTxId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Tx))) | |||||||||
newtype Validated (GenTx TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
newtype TxId (GenTx TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
type TxIn (LedgerState TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
type TxOut (LedgerState TestBlock) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock | |||||||||
type Rep (PayloadDependentState Tx mk) Source # | |||||||||
Defined in Test.Consensus.Mempool.Fairness.TestBlock |
txSize ∷ Tx → ByteSize32 Source #