Expand description
An implementation of the [ZIP-317] fee calculations for UnminedTxs:
Enumsยง
- Error
- Errors related to ZIP-317.
Constantsยง
- BLOCK_
PRODUCTION_ ๐WEIGHT_ RATIO_ CAP - The recommended weight ratio cap for ZIP-317 block production.
weight_ratio_cap
in ZIP-317. - BLOCK_
UNPAID_ ACTION_ LIMIT - If a tx has more than
BLOCK_UNPAID_ACTION_LIMIT
โunpaid actionsโ, it will never be mined by the Recommended algorithm for block template construction, implemented in Zebra here. - GRACE_
ACTIONS ๐ - The number of grace logical actions allowed by the ZIP-317 fee calculation.
- MARGINAL_
FEE ๐ - The marginal fee for the ZIP-317 fee calculation, in zatoshis per logical action.
- MEMPOOL_
TX_ FEE_ REQUIREMENT_ CAP - The fee cap for
MIN_MEMPOOL_TX_FEE_RATE
minimum required mempool fees. - MIN_
BLOCK_ ๐PRODUCTION_ SUBSTITUTE_ FEE - The minimum fee for the block production weight ratio calculation, in zatoshis. If a transaction has a lower fee, this value is used instead.
- MIN_
MEMPOOL_ TX_ FEE_ RATE - The minimum fee per kilobyte for Zebra mempool transactions. Also used as the minimum fee for a mempool transaction.
- P2PKH_
STANDARD_ ๐INPUT_ SIZE - The standard size of p2pkh inputs for the ZIP-317 fee calculation, in bytes.
- P2PKH_
STANDARD_ ๐OUTPUT_ SIZE - The standard size of p2pkh outputs for the ZIP-317 fee calculation, in bytes.
Functionsยง
- conventional_
actions - Returns the conventional actions for
transaction
,max(logical_actions, GRACE_ACTIONS)
, as defined by ZIP-317. - conventional_
fee - Returns the conventional fee for
transaction
, as defined by ZIP-317. - conventional_
fee_ weight_ ratio - Returns the block production fee weight ratio for
transaction
, as defined by ZIP-317. - mempool_
checks - Make ZIP-317 checks before inserting a transaction into the mempool.
- unpaid_
actions - Returns the number of unpaid actions for
transaction
, as defined by ZIP-317.