New BIP: Dealing with OP_IF and OP_NOTIF malleability in P2WSH



Summary:

Peter Todd, a bitcoin developer, outlined a new Bitcoin Improvement Proposal (BIP) to deal with OP_IF and OP_NOTIF malleability in pay-to-witness-script-hash (P2WSH). However, another developer, Luke Dashjr, argued that SegWit transactions are already non-malleable due to skipping the witness data in calculating the transaction ID. Todd responded by saying that although SegWit txids aren't malleable, SegWit transactions as a whole still are. The proposed BIP aims to prevent tampering of the witness section which is used as an argument to OP_IF with a much larger push. This can make the transaction larger and more expensive, potentially preventing it from being mined. Todd also raised concerns about legal issues if someone replaces a push with data where possession is illegal. However, Dashjr argued that miners and good nodes ought to mine/relay the version with the lower cost (smaller?) witness data, and that worries about "illegal data" appearing in the blockchain are not worth writing a soft-fork over.


Updated on: 2023-06-11T19:44:55.387955+00:00