mirror of
https://github.com/bitcoin/bips.git
synced 2025-11-24 14:33:33 +00:00
Merge pull request #2036 from instagibbs/2025-11-bip54_sum_sigops
bip54: clarify sigops counting, borrow bip16 language
This commit is contained in:
commit
66a41d32bf
14
bip-0054.md
14
bip-0054.md
@ -69,12 +69,14 @@ Given a block at height `N`:
|
|||||||
A limit is set on the number of potentially executed signature operations in validating a
|
A limit is set on the number of potentially executed signature operations in validating a
|
||||||
transaction. It applies to all transactions in the block except the coinbase transaction[^1]. For
|
transaction. It applies to all transactions in the block except the coinbase transaction[^1]. For
|
||||||
each input in the transaction, count the number of `CHECKSIG` and `CHECKMULTISIG` in the input
|
each input in the transaction, count the number of `CHECKSIG` and `CHECKMULTISIG` in the input
|
||||||
scriptSig and previous output's scriptPubKey, including the P2SH redeemScript. The accounting is the
|
scriptSig and previous output's scriptPubKey, including the P2SH redeemScript. If the total summed
|
||||||
same as for [bip-0016][BIP16 specs]: a `CHECKSIG`/`CHECKSIGVERIFY` operation accounts for 1 and a
|
over all transaction inputs is strictly higher than 2500, the transaction is invalid. The accounting is the
|
||||||
`CHECKMULTISIG`/`CHECKMULTISIGVERIFY` accounts for the number of public keys associated, or 20 if
|
same as for [bip-0016][BIP16 specs], evaluating the scriptSig, scriptPubKey, and P2SH redeemScript
|
||||||
the number of public keys is greater than 16. A `CHECKMULTISIG`/`CHECKMULTISIGVERIFY` not directly
|
separately:
|
||||||
preceded by a minimally-pushed number between 1 and 16 (included) accounts for 20. If the
|
|
||||||
total is strictly higher than 2500, the transaction is invalid.
|
1. `CHECKSIG` and `CHECKSIGVERIFY` count as 1 signature operation, whether or not they are evaluated.
|
||||||
|
2. `CHECKMULTISIG` and `CHECKMULTISIGVERIFY` immediately preceded by `OP_1` through `OP_16` are counted as 1 to 16 signature operations, whether or not they are evaluated.
|
||||||
|
3. All other `CHECKMULTISIG` and `CHECKMULTISIGVERIFY` are counted as 20 signature operations, whether or not they are evaluated.
|
||||||
|
|
||||||
Transactions whose witness-stripped serialized size is exactly 64 bytes are invalid.
|
Transactions whose witness-stripped serialized size is exactly 64 bytes are invalid.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user