cardano-ledger-byron-1.0.1.0: The blockchain layer of Cardano during the Byron era
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Chain.Common.TxFeePolicy

Synopsis

Documentation

data TxFeePolicy Source #

Transaction fee policy represents a formula to compute the minimal allowed Fee for a transaction. Transactions with lesser fees won't be accepted. The Minimal fee may depend on the properties of a transaction (for example, its Size in bytes), so the policy can't be represented simply as a number.

Recall that a transaction fee is the difference between the sum of its Inputs and the sum of its outputs. The transaction is accepted when minimal_fee(tx) <= fee(tx), where minimal_fee is the function defined By the policy.

The policy can change during the lifetime of the blockchain (using the Update mechanism). At the moment we have just one policy type (a linear Equation on the transaction size), but in the future other policies may Be added. To make this future-proof, we also have an "unknown" policy used By older node versions (the ones that haven't updated yet).

Instances

Instances details
ToJSON TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Generic TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Associated Types

type Rep TxFeePolicyTypeType Source #

Show TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

FromCBOR TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

ToCBOR TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Methods

toCBORTxFeePolicyEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy TxFeePolicySize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [TxFeePolicy] → Size Source #

DecCBOR TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

EncCBOR TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Methods

encCBORTxFeePolicyEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy TxFeePolicySize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [TxFeePolicy] → Size Source #

NFData TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Methods

rnfTxFeePolicy → () Source #

Buildable TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Eq TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Ord TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

NoThunks TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

MonadError SchemaError m ⇒ FromJSON m TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Monad m ⇒ ToJSON m TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

Methods

toJSONTxFeePolicy → m JSValue Source #

type Rep TxFeePolicy Source # 
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

type Rep TxFeePolicy = D1 ('MetaData "TxFeePolicy" "Cardano.Chain.Common.TxFeePolicy" "cardano-ledger-byron-1.0.1.0-inplace" 'False) (C1 ('MetaCons "TxFeePolicyTxSizeLinear" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxSizeLinear)))