Module policy
Expand description
Bitcoin policy.
This module exposes some constants and functions used in the reference implementation and which, as a consequence, define some network rules.
§Warning
While the constants present in this module are very unlikely to change, they do not define Bitcoin. As such they must not be relied upon as if they were consensus rules.
These values were taken from bitcoind v0.21.1 (194b9b8792d9b0798fdb570b79fa51f1d1f5ebaf).
Constants§
- DEFAULT_
BYTES_ PER_ SIGOP - The number of bytes equivalent per signature operation. Affects transaction relay through the virtual size computation.
- DEFAULT_
INCREMENTAL_ RELAY_ FEE - The minimum incremental feerate (despite the name), in sats per virtual kilobyte for RBF.
- DEFAULT_
MEMPOOL_ EXPIRY - Default number of hours for an unconfirmed transaction to expire in most of the network nodes’ mempools.
- DEFAULT_
MIN_ RELAY_ TX_ FEE - Minimum feerate, in sats per virtual kilobyte, for a transaction to be relayed by most nodes on the network.
- DUST_
RELAY_ TX_ FEE - The minimum feerate, in sats per kilo-virtualbyte, for defining dust. An output is considered dust if spending it under this feerate would cost more in fee.
- MAX_
STANDARD_ TX_ SIGOPS_ COST - Maximum number of sigops in a standard tx.
- MAX_
STANDARD_ TX_ WEIGHT - Maximum weight of a transaction for it to be relayed by most nodes on the network
- MIN_
STANDARD_ TX_ NONWITNESS_ SIZE - Minimum non-witness size for a standard transaction (1 segwit input + 1 P2WPKH output = 82 bytes)
Functions§
- get_
virtual_ tx_ size - The virtual transaction size, as computed by default by bitcoind node.