Expand description
Mempool transaction standardness policy checks.
These functions implement zcashd’s mempool policy for rejecting non-standard
transactions. They mirror the logic in zcashd’s IsStandardTx() and
AreInputsStandard().
Constants§
- MAX_
P2SH_ 🔒SIGOPS - Maximum sigops allowed in a P2SH redeemed script (zcashd
MAX_P2SH_SIGOPS). https://github.com/zcash/zcash/blob/v6.11.0/src/policy/policy.h#L20 - 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 - Maximum size in bytes of a standard transaction’s scriptSig (zcashd
MAX_STANDARD_SCRIPTSIG_SIZE). https://github.com/zcash/zcash/blob/v6.11.0/src/policy/policy.cpp#L92-L99 - 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
trueif all transparent inputs are standard. - count_
script_ 🔒push_ ops - Count the number of push operations in a script.
- extract_
p2sh_ 🔒redeemed_ script - Extract the redeemed script bytes from a P2SH scriptSig.
- p2sh_
redeemed_ 🔒script_ sigop_ count - Extracts the P2SH redeemed script’s sigop count for a single input.
- p2sh_
sigop_ 🔒count - Returns the total number of P2SH sigops across all inputs of the transaction.
- script_
sig_ 🔒args_ expected - Returns the expected number of scriptSig arguments for a given script kind.
- standard_
script_ 🔒kind - Classify a script using the
zcash_scriptsolver.