bitcoin-dev
Making OP_CODESEPARATOR and FindAndDelete in non-segwit scripts non-standard
Posted on: November 27, 2017 21:06 UTC
The Bitcoin community has been discussing the removal of OP_CODESEPARATOR and FindAndDelete() from non-segwit scripts.
These functions are considered to be useless, complicated, and fall outside of best practices. However, some members of the community have raised concerns about completely removing these features as it may destroy value and potentially leave pre-signed transactions vulnerable. Therefore, making them non-standard is seen as a good first step in discouraging their use and better informing discussions about the possibility of anyone still using them. Matt Corallo suggests that soft-forking behavior into OP_NOPs or nSequence could be useful for making the code more secure, but he strongly disagrees with the idea of only soft-forking out transactions that are "fundamentally insecure" as it would be too restrictive. Instead, we should be willing to soft-fork out things which clearly fall outside of best-practices. Mark Friedenbach also raises concerns about removing these features and suggests that it may not be necessary unless they are fundamentally insecure and vulnerable. Johnson Lau proposes that disabling both functions guarantees that scriptCode serialized inside SignatureHash() must be constant. If a softfork is used to remove FindAndDelete() and OP_CODESEPARATOR from non-segwit scripts, all blocks before the softfork block can be whitelisted to completely remove FindAndDelete() from the consensus code later.