Given BIP-11 (M-of-N Standard Transactions) it's not clear why BIP-147 (Dealing with dummy stack element malleability) is necessary.
BIP-11 states:
OP_CHECKMULTISIG transactions are redeemed using a standard scriptSig:
OP_0 ...signatures...
(OP_0 is required because of a bug in OP_CHECKMULTISIG; it pops one too many items off the execution stack, so a dummy value must be placed on the stack).
Yet BIP-147 claims:
A design flaw in OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY causes them to consume an extra stack element ("dummy element") after signature validation. The dummy element is not inspected in any manner, and could be replaced by any value without invalidating the script. ... [my emphasis]
This statement appears to contradict BIP-11, which clearly requires OP_0 as the first validation script element.
I can think of two reasons for BIP-147:
- BIP-11 doesn't explicitly require the stack to be checked but just that a multisignature validation script begins with OP_0;
- BIP-11 doesn't apply at all to OP_CHECKMULTISIGVERIFY.
Are these indeed motivations for BIP-147, and are there others?