BIP54 implementation and test vectors

Oct 21 - Oct 21, 2025

  • Antoine Poinsot recently provided an update on the Consensus Cleanup work, now known as BIP54, highlighting significant progress in its development and testing phases.

A key milestone was the opening of an implementation against Bitcoin Inquisition version 29.1, which is thoroughly documented at the provided link. This implementation is noteworthy for its comprehensive testing of the four proposed mitigations outlined in BIP54, serving as a foundation for generating test vectors added to the BIP54 documentation through a PR in the BIPs repository, accessible here.

The test vectors introduced are extensive, covering the transaction-level sigops limit through various usage combinations and scenarios that might trigger the limit. These vectors not only include historical violations but also pathological transactions that reveal the nuances of the sigop accounting logic, originally derived from BIP16. This aspect underscores the continuity and compatibility efforts within Bitcoin's evolving protocol, given that BIP16's logic is integral to all current Bitcoin implementations.

Furthermore, the new witness-stripped transaction size restriction is meticulously tested, demonstrating the check's effectiveness across different transaction conditions, including those with and without a witness. The inclusion of historical violations enriches the test vectors, thanks to contributions from Chris Stewart, ensuring a robust evaluation of the new mechanisms introduced in BIP54.

The test vectors extend to the new timestamp restrictions, uniquely designed around the mainnet difficulty adjustment parameters. They encompass a series of mainnet header chains from genesis, evaluating each against BIP54's criteria. These chains were produced using a custom miner, detailed in a link, and incorporated into the implementation as a JSON data file. Similarly, the coinbase restriction tests incorporate a chain of mainnet blocks to examine the context-dependent timelock check, generated through a similar mining process available at the same link.

Poinsot is actively seeking feedback on these test vectors, especially from developers of alternative Bitcoin clients. The emphasis on compatibility with Bitcoin implementations beyond Bitcoin Core highlights a strategic goal of fostering a cohesive and unified approach to Bitcoin protocol enhancements. This initiative underlines the collaborative effort required to refine and advance the Bitcoin ecosystem, ensuring that improvements like BIP54 are comprehensively vetted and accessible for integration across diverse platforms.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

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

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiDecoding BitcoinWarnet
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

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

Give Feedback