bip54: clarify sigops counting, borrow bip16 language#2036
bip54: clarify sigops counting, borrow bip16 language#2036murchandamus merged 1 commit intobitcoin:masterfrom
Conversation
|
cc @darosior |
darosior
left a comment
There was a problem hiding this comment.
Thanks, i agree the language could be clearer and your change improves it.
bip-0054.md
Outdated
| same as for [bip-0016][BIP16 specs], evaluating the scriptSig, scriptPubKey, and P2SH redeemScript | ||
| separately: | ||
|
|
||
| 1. OP_CHECKSIG and OP_CHECKSIGVERIFY count as 1 signature operation, whether or not they are evaluated. |
There was a problem hiding this comment.
| 1. OP_CHECKSIG and OP_CHECKSIGVERIFY count as 1 signature operation, whether or not they are evaluated. | |
| 1. `CHECKSIG` and `CHECKSIGVERIFY` count as 1 signature operation, whether or not they are evaluated. |
(Here and below)
In the rest of the document opcodes are referred to without the "OP_" prefix and are preformatted.
There was a problem hiding this comment.
done, but left OP_1/OP_16 for clarity
bip-0054.md
Outdated
| separately: | ||
|
|
||
| 1. OP_CHECKSIG and OP_CHECKSIGVERIFY count as 1 signature operation, whether or not they are evaluated. | ||
| 2. OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY immediately preceded by OP_1 through OP_16 are counted as 1 to 16 signature operation, whether or not they are evaluated. |
There was a problem hiding this comment.
| 2. OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY immediately preceded by OP_1 through OP_16 are counted as 1 to 16 signature operation, whether or not they are evaluated. | |
| 2. OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY immediately preceded by OP_1 through OP_16 are counted as 1 to 16 signature operations, whether or not they are evaluated. |
Or maybe?
| 2. OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY immediately preceded by OP_1 through OP_16 are counted as 1 to 16 signature operation, whether or not they are evaluated. | |
| 2. OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY immediately preceded by OP_1 through OP_16 are counted as 1 to 16 signature operation(s), whether or not they are evaluated. |
There was a problem hiding this comment.
first suggestion taken
bip-0054.md
Outdated
| 2. OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY immediately preceded by OP_1 through OP_16 are counted as 1 to 16 signature operation, whether or not they are evaluated. | ||
| 3. All other OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY are counted as 20 signature operations, whether or not they are evaluated. | ||
|
|
||
| If the total summed over all transaction inputs is strictly higher than 2500, the transaction is invalid. |
There was a problem hiding this comment.
Could you put this sentence directly before the sentence "The accounting is the same as for ..." instead of in a new paragraph by itself?
It would read:
It applies to all transactions in the block except the coinbase transaction. For each input in the transaction, count the number of
CHECKSIGandCHECKMULTISIGin the input scriptSig and previous output's scriptPubKey, including the P2SH redeemScript. If the total summed over all transaction inputs is strictly higher than 2500, the transaction is invalid. The accounting is the same as for bip-0016, evaluating the scriptSig, scriptPubKey, and P2SH redeemScript separately:
- OP_CHECKSIG and OP_CHECKSIGVERIFY count as 1 signature operation, whether or not they are evaluated.
- OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY immediately preceded by OP_1 through OP_16 are counted as 1 to 16 signature operation, whether or not they are evaluated.
- All other OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY are counted as 20 signature operations, whether or not they are evaluated.
Which i find preferable.
bee85b7 to
3ce7c54
Compare
3ce7c54 to
459298a
Compare
The main issue is the text seemed ambiguous on whether the limit applied per input, or over the total transaction summing over all inputs.
I added some language directly ripped from bip16, and made it clearer, I hope, that each field is evaluated separately.