Making OP_CODESEPARATOR and FindAndDelete in non-segwit scripts non-standard

Posted by Johnson Lau

Nov 15, 2017/18:02 UTC

The proposal being made on https://github.com/bitcoin/bitcoin/pull/11423 is to make OP_CODESEPARATOR and FindAndDelete in non-segwit scripts non-standard. The author thinks that the FindAndDelete() function is one of the most useless and complicated functions in the script language. Although it is omitted from segwit (BIP143), it still needs to be supported in non-segwit scripts. However, it would only be triggered in some weird edge cases like using out-of-range SIGHASH_SINGLE. Non-segwit scripts also use a FindAndDelete()-like function to remove OP_CODESEPARATOR from scriptCode. OP_CODESEPARATOR in segwit scripts are useful for Tumblebit so it is not disabled in this proposal. By disabling both functions, it guarantees that scriptCode serialized inside SignatureHash() must be constant.If a softfork is used to remove FindAndDelete() and OP_CODESEPARATOR from non-segwit scripts, it could completely remove FindAndDelete() from the consensus code later by whitelisting all blocks before the softfork block. The first step is to make them non-standard in the next release.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback