Skip to main content

Module policy

Module policy 

Source
Expand description

Mempool transaction standardness policy constants and helpers.

These mirror zcashd’s mempool policy for rejecting non-standard transactions (IsStandardTx() and AreInputsStandard()). The transparent-input checks now live in zebra-consensus, where the transaction verifier applies them before script verification; they are re-exported here and used by the storage-time policy in the parent module.

Constants§

MAX_STANDARD_MULTISIG_PUBKEYS 🔒
Maximum number of public keys allowed in a standard multisig script. https://github.com/zcash/zcash/blob/v6.11.0/src/policy/policy.cpp#L46-L48
MAX_STANDARD_SCRIPTSIG_SIZE 🔒
The maximum size in bytes of the scriptSig of a standard transaction input.
MAX_STANDARD_TX_SIGOPS 🔒
Maximum number of signature operations allowed per standard transaction (zcashd MAX_STANDARD_TX_SIGOPS). https://github.com/zcash/zcash/blob/v6.11.0/src/policy/policy.h#L22

Functions§

are_inputs_standard 🔒
Returns true if all of a transaction’s transparent inputs are standard.
standard_script_kind 🔒
Classify a script using the zcash_script solver.