Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Shelley.Ledger.Mempool
Description
Shelley mempool integration
TODO nearly all of the logic in this module belongs in cardano-ledger, not ouroboros-consensus; ouroboros-consensus-cardano should just be "glue code".
Synopsis
- data family GenTx blk
- newtype ApplyTxError era = ApplyTxError (NonEmpty (PredicateFailure (EraRule "LEDGER" era)))
- data family TxId blk
- data family Validated x
- fixedBlockBodyOverhead ∷ Num a ⇒ a
- mkShelleyTx ∷ ShelleyBasedEra era ⇒ Tx era → GenTx (ShelleyBlock proto era)
- mkShelleyValidatedTx ∷ ShelleyBasedEra era ⇒ Validated (Tx era) → Validated (GenTx (ShelleyBlock proto era))
- perTxOverhead ∷ Num a ⇒ a
- data AlonzoMeasure = AlonzoMeasure {
- byteSize ∷ !(IgnoringOverflow ByteSize32)
- exUnits ∷ !(ExUnits' Natural)
- data ConwayMeasure = ConwayMeasure {}
- fromExUnits ∷ ExUnits → ExUnits' Natural
Documentation
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
newtype ApplyTxError era Source #
Constructors
ApplyTxError (NonEmpty (PredicateFailure (EraRule "LEDGER" era))) |
Instances
Typeable era ⇒ ShowProxy (ApplyTxError era ∷ Type) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
(Era era, DecCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ FromCBOR (ApplyTxError era) | |
Defined in Cardano.Ledger.Shelley.API.Mempool | |
(Era era, EncCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ ToCBOR (ApplyTxError era) | |
Defined in Cardano.Ledger.Shelley.API.Mempool Methods toCBOR ∷ ApplyTxError era → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (ApplyTxError era) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ApplyTxError era] → Size Source # | |
(Era era, DecCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ DecCBOR (ApplyTxError era) | |
Defined in Cardano.Ledger.Shelley.API.Mempool | |
(Era era, EncCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ EncCBOR (ApplyTxError era) | |
Defined in Cardano.Ledger.Shelley.API.Mempool Methods encCBOR ∷ ApplyTxError era → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (ApplyTxError era) → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ApplyTxError era] → Size Source # | |
Show (PredicateFailure (EraRule "LEDGER" era)) ⇒ Show (ApplyTxError era) | |
Defined in Cardano.Ledger.Shelley.API.Mempool Methods showsPrec ∷ Int → ApplyTxError era → ShowS # show ∷ ApplyTxError era → String # showList ∷ [ApplyTxError era] → ShowS # | |
Eq (PredicateFailure (EraRule "LEDGER" era)) ⇒ Eq (ApplyTxError era) | |
Defined in Cardano.Ledger.Shelley.API.Mempool Methods (==) ∷ ApplyTxError era → ApplyTxError era → Bool # (/=) ∷ ApplyTxError era → ApplyTxError era → Bool # | |
ShelleyBasedEra era ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (ApplyTxError era) Source # |
|
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ApplyTxError era → Encoding Source # decodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ∀ s. Decoder s (ApplyTxError era) Source # |
A generalized transaction, GenTx
, identifier.
Instances
SerialiseNodeToClient ByronBlock (GenTxId ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation | |
SerialiseNodeToNode ByronBlock (GenTxId ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Node.Serialisation | |
(Typeable m, Typeable a) ⇒ ShowProxy (TxId (GenTx (DualBlock m a)) ∷ Type) | |
ShowProxy (TxId (GenTx ByronBlock)) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
(Typeable era, Typeable proto) ⇒ ShowProxy (TxId (GenTx (ShelleyBlock proto era)) ∷ Type) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
(Typeable era, Typeable proto, Crypto (ProtoCrypto proto)) ⇒ DecCBOR (TxId (GenTx (ShelleyBlock proto era))) Source # | |
(Typeable era, Typeable proto, Crypto (ProtoCrypto proto)) ⇒ EncCBOR (TxId (GenTx (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods encCBOR ∷ TxId (GenTx (ShelleyBlock proto era)) → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (TxId (GenTx (ShelleyBlock proto era))) → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [TxId (GenTx (ShelleyBlock proto era))] → Size Source # | |
Show (GenTxId ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
Show (GenTxId (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
Show (GenTxId m) ⇒ Show (TxId (GenTx (DualBlock m a))) | |
Eq (GenTxId m) ⇒ Eq (TxId (GenTx (DualBlock m a))) | |
Eq (TxId (GenTx ByronBlock)) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods (==) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (/=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # | |
Eq (TxId (GenTx (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods (==) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (/=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # | |
Ord (GenTxId m) ⇒ Ord (TxId (GenTx (DualBlock m a))) | |
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)) # | |
Ord (TxId (GenTx ByronBlock)) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods compare ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Ordering # (<) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (<=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (>) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # (>=) ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → Bool # max ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) # min ∷ TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) → TxId (GenTx ByronBlock) # | |
Ord (TxId (GenTx (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods compare ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Ordering # (<) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (<=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (>) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (>=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # max ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) # min ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) # | |
NoThunks (TxId (GenTx (DualBlock m a))) | |
NoThunks (TxId (GenTx ByronBlock)) Source # | |
NoThunks (TxId (GenTx (ShelleyBlock proto era))) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
Condense (GenTxId ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
Condense (GenTxId (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |
ShelleyCompatible proto era ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (GenTxId (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → GenTxId (ShelleyBlock proto era) → Encoding Source # decodeNodeToClient ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → ∀ s. Decoder s (GenTxId (ShelleyBlock proto era)) Source # | |
ShelleyCompatible proto era ⇒ SerialiseNodeToNode (ShelleyBlock proto era) (GenTxId (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Node.Serialisation Methods encodeNodeToNode ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToNodeVersion (ShelleyBlock proto era) → GenTxId (ShelleyBlock proto era) → Encoding Source # decodeNodeToNode ∷ CodecConfig (ShelleyBlock proto era) → BlockNodeToNodeVersion (ShelleyBlock proto era) → ∀ s. Decoder s (GenTxId (ShelleyBlock proto era)) Source # | |
type Rep (TxId (GenTx (HardForkBlock xs))) | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool type Rep (TxId (GenTx (HardForkBlock xs))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.HardFork.Combinator.Mempool" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "HardForkGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraGenTxId xs)))) | |
newtype TxId (GenTx (HardForkBlock xs)) | |
newtype TxId (GenTx (DualBlock m a)) | |
Defined in Ouroboros.Consensus.Ledger.Dual | |
data TxId (GenTx ByronBlock) Source # | |
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |
newtype TxId (GenTx (ShelleyBlock proto era)) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool |
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
(Typeable era, Typeable proto) ⇒ ShowProxy (Validated (GenTx (ShelleyBlock proto era)) ∷ Type) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
Generic (Validated (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Associated Types
Methods from ∷ Validated (GenTx ByronBlock) → Rep (Validated (GenTx ByronBlock)) x # to ∷ Rep (Validated (GenTx ByronBlock)) x → Validated (GenTx ByronBlock) # | |||||
Generic (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Associated Types
Methods from ∷ Validated (GenTx (ShelleyBlock proto era)) → Rep (Validated (GenTx (ShelleyBlock proto era))) x # to ∷ Rep (Validated (GenTx (ShelleyBlock proto era))) x → Validated (GenTx (ShelleyBlock proto era)) # | |||||
Bridge m a ⇒ Show (Validated (GenTx (DualBlock m a))) | |||||
Show (Validated (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
ShelleyBasedEra era ⇒ Show (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
Eq (Validated (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool Methods (==) ∷ Validated (GenTx ByronBlock) → Validated (GenTx ByronBlock) → Bool # (/=) ∷ Validated (GenTx ByronBlock) → Validated (GenTx ByronBlock) → Bool # | |||||
ShelleyBasedEra era ⇒ Eq (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods (==) ∷ Validated (GenTx (ShelleyBlock proto era)) → Validated (GenTx (ShelleyBlock proto era)) → Bool # (/=) ∷ Validated (GenTx (ShelleyBlock proto era)) → Validated (GenTx (ShelleyBlock proto era)) → Bool # | |||||
NoThunks (Validated (GenTx (DualBlock m a))) | |||||
NoThunks (Validated (GenTx ByronBlock)) Source # | |||||
ShelleyBasedEra era ⇒ NoThunks (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.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.26.0.0-inplace" 'True) (C1 ('MetaCons "HardForkValidatedGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHardForkValidatedGenTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OneEraValidatedGenTx xs)))) | |||||
type Rep (Validated (GenTx ByronBlock)) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool type Rep (Validated (GenTx ByronBlock)) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Byron.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.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))) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool type Rep (Validated (GenTx (ShelleyBlock proto era))) = D1 ('MetaData "Validated" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyValidatedTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Validated (Tx era))))) | |||||
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 ByronBlock) Source # | |||||
Defined in Ouroboros.Consensus.Byron.Ledger.Mempool | |||||
data Validated (GenTx (ShelleyBlock proto era)) Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool |
fixedBlockBodyOverhead ∷ Num a ⇒ a Source #
txInBlockSize
is used to estimate how many transactions we can grab from
the Mempool to put into the block we are going to forge without exceeding
the maximum block body size according to the ledger. If we exceed that
limit, we will have forged a block that is invalid according to the ledger.
We ourselves won't even adopt it, causing us to lose our slot, something we
must try to avoid.
For this reason it is better to overestimate the size of a transaction than to underestimate. The only downside is that we maybe could have put one (or more?) transactions extra in that block.
As the sum of the serialised transaction sizes is not equal to the size of
the serialised block body (TxSeq
) consisting of those transactions
(see cardano-node#1545 for an example), we account for some extra overhead
per transaction as a safety margin.
Also see perTxOverhead
.
mkShelleyTx ∷ ShelleyBasedEra era ⇒ Tx era → GenTx (ShelleyBlock proto era) Source #
mkShelleyValidatedTx ∷ ShelleyBasedEra era ⇒ Validated (Tx era) → Validated (GenTx (ShelleyBlock proto era)) Source #
perTxOverhead ∷ Num a ⇒ a Source #
Exported for tests
data AlonzoMeasure Source #
Constructors
AlonzoMeasure | |
Fields
|
Instances
Monoid AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods mappend ∷ AlonzoMeasure → AlonzoMeasure → AlonzoMeasure # mconcat ∷ [AlonzoMeasure] → AlonzoMeasure # | |||||
Semigroup AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods (<>) ∷ AlonzoMeasure → AlonzoMeasure → AlonzoMeasure # sconcat ∷ NonEmpty AlonzoMeasure → AlonzoMeasure # stimes ∷ Integral b ⇒ b → AlonzoMeasure → AlonzoMeasure # | |||||
Generic AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Associated Types
| |||||
Show AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods showsPrec ∷ Int → AlonzoMeasure → ShowS # show ∷ AlonzoMeasure → String # showList ∷ [AlonzoMeasure] → ShowS # | |||||
Eq AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
Measure AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods plus ∷ AlonzoMeasure → AlonzoMeasure → AlonzoMeasure Source # min ∷ AlonzoMeasure → AlonzoMeasure → AlonzoMeasure Source # max ∷ AlonzoMeasure → AlonzoMeasure → AlonzoMeasure Source # | |||||
NoThunks AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
HasByteSize AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods | |||||
TxMeasureMetrics AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
type Rep AlonzoMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool type Rep AlonzoMeasure = D1 ('MetaData "AlonzoMeasure" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "AlonzoMeasure" 'PrefixI 'True) (S1 ('MetaSel ('Just "byteSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IgnoringOverflow ByteSize32)) :*: S1 ('MetaSel ('Just "exUnits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ExUnits' Natural)))) |
data ConwayMeasure Source #
Constructors
ConwayMeasure | |
Fields |
Instances
Monoid ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods mappend ∷ ConwayMeasure → ConwayMeasure → ConwayMeasure # mconcat ∷ [ConwayMeasure] → ConwayMeasure # | |||||
Semigroup ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods (<>) ∷ ConwayMeasure → ConwayMeasure → ConwayMeasure # sconcat ∷ NonEmpty ConwayMeasure → ConwayMeasure # stimes ∷ Integral b ⇒ b → ConwayMeasure → ConwayMeasure # | |||||
Generic ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Associated Types
| |||||
Show ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods showsPrec ∷ Int → ConwayMeasure → ShowS # show ∷ ConwayMeasure → String # showList ∷ [ConwayMeasure] → ShowS # | |||||
Eq ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
Measure ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods plus ∷ ConwayMeasure → ConwayMeasure → ConwayMeasure Source # min ∷ ConwayMeasure → ConwayMeasure → ConwayMeasure Source # max ∷ ConwayMeasure → ConwayMeasure → ConwayMeasure Source # | |||||
NoThunks ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
HasByteSize ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool Methods | |||||
TxMeasureMetrics ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool | |||||
type Rep ConwayMeasure Source # | |||||
Defined in Ouroboros.Consensus.Shelley.Ledger.Mempool type Rep ConwayMeasure = D1 ('MetaData "ConwayMeasure" "Ouroboros.Consensus.Shelley.Ledger.Mempool" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ConwayMeasure" 'PrefixI 'True) (S1 ('MetaSel ('Just "alonzoMeasure") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AlonzoMeasure) :*: S1 ('MetaSel ('Just "refScriptsSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (IgnoringOverflow ByteSize32)))) |
Orphan instances
Typeable era ⇒ ShowProxy (ApplyTxError era ∷ Type) Source # | |||||
(Typeable era, Typeable proto) ⇒ ShowProxy (Validated (GenTx (ShelleyBlock proto era)) ∷ Type) Source # | |||||
(Typeable era, Typeable proto) ⇒ ShowProxy (GenTx (ShelleyBlock proto era) ∷ Type) Source # | |||||
(Typeable era, Typeable proto) ⇒ ShowProxy (TxId (GenTx (ShelleyBlock proto era)) ∷ Type) Source # | |||||
ShelleyCompatible proto era ⇒ FromCBOR (GenTx (ShelleyBlock proto era)) Source # | |||||
ShelleyCompatible proto era ⇒ ToCBOR (GenTx (ShelleyBlock proto era)) Source # | |||||
(Typeable era, Typeable proto, Crypto (ProtoCrypto proto)) ⇒ DecCBOR (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
(Typeable era, Typeable proto, Crypto (ProtoCrypto proto)) ⇒ EncCBOR (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
Methods encCBOR ∷ TxId (GenTx (ShelleyBlock proto era)) → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (TxId (GenTx (ShelleyBlock proto era))) → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [TxId (GenTx (ShelleyBlock proto era))] → Size Source # | |||||
Generic (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Associated Types
Methods from ∷ Validated (GenTx (ShelleyBlock proto era)) → Rep (Validated (GenTx (ShelleyBlock proto era))) x # to ∷ Rep (Validated (GenTx (ShelleyBlock proto era))) x → Validated (GenTx (ShelleyBlock proto era)) # | |||||
Generic (GenTx (ShelleyBlock proto era)) Source # | |||||
Associated Types
Methods from ∷ GenTx (ShelleyBlock proto era) → Rep (GenTx (ShelleyBlock proto era)) x # to ∷ Rep (GenTx (ShelleyBlock proto era)) x → GenTx (ShelleyBlock proto era) # | |||||
ShelleyBasedEra era ⇒ Show (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
ShelleyBasedEra era ⇒ Show (GenTx (ShelleyBlock proto era)) Source # | |||||
Show (GenTxId (ShelleyBlock proto era)) Source # | |||||
ShelleyBasedEra era ⇒ Eq (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
Methods (==) ∷ Validated (GenTx (ShelleyBlock proto era)) → Validated (GenTx (ShelleyBlock proto era)) → Bool # (/=) ∷ Validated (GenTx (ShelleyBlock proto era)) → Validated (GenTx (ShelleyBlock proto era)) → Bool # | |||||
ShelleyBasedEra era ⇒ Eq (GenTx (ShelleyBlock proto era)) Source # | |||||
Methods (==) ∷ GenTx (ShelleyBlock proto era) → GenTx (ShelleyBlock proto era) → Bool # (/=) ∷ GenTx (ShelleyBlock proto era) → GenTx (ShelleyBlock proto era) → Bool # | |||||
Eq (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
Methods (==) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (/=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # | |||||
Ord (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
Methods compare ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Ordering # (<) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (<=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (>) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # (>=) ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → Bool # max ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) # min ∷ TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) → TxId (GenTx (ShelleyBlock proto era)) # | |||||
ShelleyBasedEra era ⇒ NoThunks (Validated (GenTx (ShelleyBlock proto era))) Source # | |||||
ShelleyBasedEra era ⇒ NoThunks (GenTx (ShelleyBlock proto era)) Source # | |||||
NoThunks (TxId (GenTx (ShelleyBlock proto era))) Source # | |||||
ShelleyBasedEra era ⇒ ConvertRawTxId (GenTx (ShelleyBlock proto era)) Source # | |||||
Methods toRawTxIdHash ∷ TxId (GenTx (ShelleyBlock proto era)) → ShortByteString Source # | |||||
ShelleyBasedEra era ⇒ HasTxId (GenTx (ShelleyBlock proto era)) Source # | |||||
Methods txId ∷ GenTx (ShelleyBlock proto era) → TxId (GenTx (ShelleyBlock proto era)) Source # | |||||
ShelleyBasedEra era ⇒ Condense (GenTx (ShelleyBlock proto era)) Source # | |||||
Condense (GenTxId (ShelleyBlock proto era)) Source # | |||||
ShelleyBasedEra era ⇒ HasTxs (ShelleyBlock proto era) Source # | |||||
Methods extractTxs ∷ ShelleyBlock proto era → [GenTx (ShelleyBlock proto era)] Source # | |||||
(ShelleyCompatible proto era, TxLimits (ShelleyBlock proto era)) ⇒ LedgerSupportsMempool (ShelleyBlock proto era) Source # | |||||
Methods txInvariant ∷ GenTx (ShelleyBlock proto era) → Bool Source # applyTx ∷ LedgerConfig (ShelleyBlock proto era) → WhetherToIntervene → SlotNo → GenTx (ShelleyBlock proto era) → TickedLedgerState (ShelleyBlock proto era) ValuesMK → Except (ApplyTxErr (ShelleyBlock proto era)) (TickedLedgerState (ShelleyBlock proto era) DiffMK, Validated (GenTx (ShelleyBlock proto era))) Source # reapplyTx ∷ ComputeDiffs → LedgerConfig (ShelleyBlock proto era) → SlotNo → Validated (GenTx (ShelleyBlock proto era)) → TickedLedgerState (ShelleyBlock proto era) ValuesMK → Except (ApplyTxErr (ShelleyBlock proto era)) (TickedLedgerState (ShelleyBlock proto era) TrackingMK) Source # reapplyTxs ∷ ComputeDiffs → LedgerConfig (ShelleyBlock proto era) → SlotNo → [(Validated (GenTx (ShelleyBlock proto era)), extra)] → TickedLedgerState (ShelleyBlock proto era) ValuesMK → ReapplyTxsResult extra (ShelleyBlock proto era) Source # txForgetValidated ∷ Validated (GenTx (ShelleyBlock proto era)) → GenTx (ShelleyBlock proto era) Source # getTransactionKeySets ∷ GenTx (ShelleyBlock proto era) → LedgerTables (LedgerState (ShelleyBlock proto era)) KeysMK Source # prependMempoolDiffs ∷ TickedLedgerState (ShelleyBlock proto era) DiffMK → TickedLedgerState (ShelleyBlock proto era) DiffMK → TickedLedgerState (ShelleyBlock proto era) DiffMK Source # applyMempoolDiffs ∷ LedgerTables (LedgerState (ShelleyBlock proto era)) ValuesMK → LedgerTables (LedgerState (ShelleyBlock proto era)) KeysMK → TickedLedgerState (ShelleyBlock proto era) DiffMK → TickedLedgerState (ShelleyBlock proto era) ValuesMK Source # | |||||
ShelleyCompatible p AllegraEra ⇒ TxLimits (ShelleyBlock p AllegraEra) Source # | |||||
Associated Types
Methods txMeasure ∷ LedgerConfig (ShelleyBlock p AllegraEra) → TickedLedgerState (ShelleyBlock p AllegraEra) ValuesMK → GenTx (ShelleyBlock p AllegraEra) → Except (ApplyTxErr (ShelleyBlock p AllegraEra)) (TxMeasure (ShelleyBlock p AllegraEra)) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig (ShelleyBlock p AllegraEra) → TickedLedgerState (ShelleyBlock p AllegraEra) mk → TxMeasure (ShelleyBlock p AllegraEra) Source # | |||||
ShelleyCompatible p AlonzoEra ⇒ TxLimits (ShelleyBlock p AlonzoEra) Source # | |||||
Associated Types
Methods txMeasure ∷ LedgerConfig (ShelleyBlock p AlonzoEra) → TickedLedgerState (ShelleyBlock p AlonzoEra) ValuesMK → GenTx (ShelleyBlock p AlonzoEra) → Except (ApplyTxErr (ShelleyBlock p AlonzoEra)) (TxMeasure (ShelleyBlock p AlonzoEra)) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig (ShelleyBlock p AlonzoEra) → TickedLedgerState (ShelleyBlock p AlonzoEra) mk → TxMeasure (ShelleyBlock p AlonzoEra) Source # | |||||
ShelleyCompatible p BabbageEra ⇒ TxLimits (ShelleyBlock p BabbageEra) Source # | We anachronistically use | ||||
Associated Types
Methods txMeasure ∷ LedgerConfig (ShelleyBlock p BabbageEra) → TickedLedgerState (ShelleyBlock p BabbageEra) ValuesMK → GenTx (ShelleyBlock p BabbageEra) → Except (ApplyTxErr (ShelleyBlock p BabbageEra)) (TxMeasure (ShelleyBlock p BabbageEra)) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig (ShelleyBlock p BabbageEra) → TickedLedgerState (ShelleyBlock p BabbageEra) mk → TxMeasure (ShelleyBlock p BabbageEra) Source # | |||||
ShelleyCompatible p ConwayEra ⇒ TxLimits (ShelleyBlock p ConwayEra) Source # | |||||
Associated Types
Methods txMeasure ∷ LedgerConfig (ShelleyBlock p ConwayEra) → TickedLedgerState (ShelleyBlock p ConwayEra) ValuesMK → GenTx (ShelleyBlock p ConwayEra) → Except (ApplyTxErr (ShelleyBlock p ConwayEra)) (TxMeasure (ShelleyBlock p ConwayEra)) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig (ShelleyBlock p ConwayEra) → TickedLedgerState (ShelleyBlock p ConwayEra) mk → TxMeasure (ShelleyBlock p ConwayEra) Source # | |||||
ShelleyCompatible p MaryEra ⇒ TxLimits (ShelleyBlock p MaryEra) Source # | |||||
Associated Types
Methods txMeasure ∷ LedgerConfig (ShelleyBlock p MaryEra) → TickedLedgerState (ShelleyBlock p MaryEra) ValuesMK → GenTx (ShelleyBlock p MaryEra) → Except (ApplyTxErr (ShelleyBlock p MaryEra)) (TxMeasure (ShelleyBlock p MaryEra)) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig (ShelleyBlock p MaryEra) → TickedLedgerState (ShelleyBlock p MaryEra) mk → TxMeasure (ShelleyBlock p MaryEra) Source # | |||||
ShelleyCompatible p ShelleyEra ⇒ TxLimits (ShelleyBlock p ShelleyEra) Source # | |||||
Associated Types
Methods txMeasure ∷ LedgerConfig (ShelleyBlock p ShelleyEra) → TickedLedgerState (ShelleyBlock p ShelleyEra) ValuesMK → GenTx (ShelleyBlock p ShelleyEra) → Except (ApplyTxErr (ShelleyBlock p ShelleyEra)) (TxMeasure (ShelleyBlock p ShelleyEra)) Source # blockCapacityTxMeasure ∷ ∀ (mk ∷ MapKind). LedgerConfig (ShelleyBlock p ShelleyEra) → TickedLedgerState (ShelleyBlock p ShelleyEra) mk → TxMeasure (ShelleyBlock p ShelleyEra) Source # |