Update on the Great Consensus Cleanup Revival

Posted by Antoine Riard

Feb 15, 2025/21:13 UTC

In an exploration of the Bitcoin Core's VerifyScript functionality, specifically referencing commit 43e71f74, a notable point of discussion emerges around the implementation of a script check aligned with BIP62 rule 2. The code snippet in question evaluates whether the scriptSig adheres to being push-only as mandated by the SCRIPT_VERIFY_SIGPUSHONLY flag. However, this flag is not set within either the MANDATORY_SCRIPT_VERIFY_FLAGS or the STANDARD_SCRIPT_VERIFY_FLAGS, suggesting that its application is non-standard within the broader context of block validation processes.

The presence of this particular check raises questions about its current relevance, especially considering that BIP62 was never activated within the Bitcoin network. This situation implies that the check for SCRIPT_VERIFY_SIGPUSHONLY within scriptSig executions, particularly for P2SH (Pay to Script Hash) transactions, might represent a residual element of the codebase rather than a functional requirement under the existing protocol specifications.

Despite the apparent dormancy of this flag in practical terms, it continues to play a role in the unit testing framework, notably within script_tests.cpp, where it is actively engaged to assert the correctness of the underlying logic. This scenario underscores a nuanced understanding of the codebase, where elements may persist and serve purposes outside the immediate scope of network operations, such as in testing and verification procedures.

Further investigation into the origins and discussions surrounding this piece of code can be found in the original GitHub pull request (#5065), providing additional context and potentially clarifying the rationale behind its inclusion and sustained presence within the code.

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