Skip to main content

Module zip317

Module zip317 

Source
Expand description

Types related to implementing a FeeRule provides ZIP 317 fee calculation.

Structs§

FeeRule
A FeeRule implementation that implements the ZIP 317 fee rule.

Enums§

FeeError
Errors that can occur in ZIP 317 fee computation

Constants§

GRACE_ACTIONS
The minimum number of logical actions that must be paid according to ZIP 317.
MARGINAL_FEEDeprecated
The ZIP 317 marginal fee before Revision 2 (ZIP 2009).
MAX_TRANSPARENT_INPUT_SIZE
The consensus maximum size of a serialized transparent input: outpoint (36) + CompactSize prefix for the scriptSig (at most 9) + scriptSig (at most MAX_SCRIPT_SIZE = 10_000) + sequence (4). This is the safe upper bound for a transparent input whose script size is unknown.
MINIMUM_FEEDeprecated
The ZIP 317 minimum conventional fee before Revision 2 (ZIP 2009). Equivalent to MARGINAL_FEE * GRACE_ACTIONS.
P2PKH_STANDARD_INPUT_SIZE
The standard size of a P2PKH input, in bytes, according to ZIP 317.
P2PKH_STANDARD_OUTPUT_SIZE
The standard size of a P2PKH output, in bytes, according to ZIP 317.
TRANSPARENT_BUNDLE_OVERHEAD
The per-bundle overhead of a transparent bundle: two CompactSize vector-length prefixes (one for vin, one for vout), at most 9 bytes each.
TX_HEADER_SIZE
The fixed size of a Zcash transaction header: version (4) + consensus_branch_id (4) + lock_time (4) + expiry_height (4). The constant leaves room for future header fields.

Functions§

marginal_fee
Returns the ZIP 317 marginal fee, in zatoshis per logical action, for a transaction expected to be mined at target_height on the network params describes.
minimum_fee
Returns the ZIP 317 minimum conventional fee at target_height: marginal_fee times GRACE_ACTIONS.