Repository navigation
Fix BIP143 standardness rules for CHECKMULTISIG - #33759
roconnor-blockstream wants to merge 1 commit into
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33759. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
From https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#restrictions-on-public-key-type > As a default policy, only compressed public keys are accepted in P2WPKH and > P2WSH. Each public key passed to a sigop inside version 0 witness program must > be a compressed key: the first byte MUST be either 0x02 or 0x03, and the size > MUST be 33 bytes. Transactions that break this rule will not be relayed or mined > by default. PR bitcoin#8499 's implemenation is insufficent to meet BIP143's requirements as it only checks those pubkeys processed by CHECKMULTISIG, whereas BIP143 requires that every public key passed to the CHECKMULTISIG be validated. Note: these restrictions are policy only and not consensus rules.
e203010 to
5ea1ea8
Compare
|
Concept NACK. This doesn't seem like a productive use of anyone's time? "passed to a sigop" is at most ambiguous, and that ambiguity is already resolved by the implementation; if it's a problem, update the BIP text to match the implementation. Changing the implementation risks "soft" confiscating funds (ie, transactions that were relayable become non-standard and can only be mined directly), which doesn't seem at all worth doing. |
|
I don't think the wording "passed to a sigop" is ambiguous at all, but I'm fine with the BIP text being clarified if someone wants to do that instead. I don't have a strong opinion on how to resolve the disagreement. I do think that updating the implementation is slightly better, but only slightly. |
|
Concept NACK 5ea1ea8 This would further increase the complexity of The unit tests explicitly assert that unused uncompressed keys are policy-valid. Even if our current implementation does not match BIP-143, this change would break an existing expectation. We should update BIP-143 instead and align it with the implementation. |
|
There's not been much activity here the past few months. @roconnor-blockstream given the lack of interest in favor of this change, maybe an amendment to the BIP would be a better use of time? |
|
I think it would fine to close this and continue discussing approaches in #33882? |
|
Ok, closing for now. Let's continue discussion in the other thread. |
In OP_CHECKMULTISIG, Bitcoin Core only checks the public keys the opcode reaches, and its script tests have vectors where an uncompressed key that is not reached passes with WITNESS_PUBKEYTYPE. Reviewers of bitcoin/bitcoin#33759 preferred changing the BIP to match, see also item 4 of bitcoin/bitcoin#33882.
From https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#restrictions-on-public-key-type
PR #8499 's implemenation is insufficent to meet BIP143's requirements as it only checks those pubkeys processed by CHECKMULTISIG, whereas BIP143 requires that every public key passed to the CHECKMULTISIG be validated.
Note: these restrictions are policy only and not consensus rules.