Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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).