Human meaningful witness versioning

Posted by Ethan Heilman

Jul 21, 2025/01:44 UTC

Understanding Bitcoin Improvement Proposal (BIP) 0173 involves grappling with various methods to encode addresses, particularly focusing on the treatment of the Witness version. One approach suggests treating the Witness version not as a special part of the address but merely encoding the ScriptPubkey directly. This contrasts with the Bech32 method, which allocates the first 5-bits specifically for the Witness version, allowing versions 0 to 31 before overflow into the next character. This method is advantageous as it compresses the 8-bit opcode into 5-bits, effectively saving space.

A further refinement of the Bech32 approach proposes saving an additional 8-bits by excluding the OP_PUSH32 and inferring it from the address length. While this could simplify certain aspects, it might complicate others, especially when dealing with more complex ScriptPubkeys. However, handling these complexities with different Witness versions, akin to Bech32 and bech32m, could offer a solution.

Another suggestion posits allocating the first 4-bits to the Witness version, limiting the range to 0 to 15 before causing spillage into subsequent characters. Alternatively, positioning the checksum as the initial element post-'bc1' could deter perceptions of the Witness version as part of the human-readable component of the address. The latter three options, unlike the Bech32 refinement, obscure the Witness version but potentially avoid confusion in address interpretation.

The discussion also touches on the rationale behind compressing the Witness version into 5-bits while questioning the necessity of including OP_PUSH32. Initially believed to enhance human readability, the compression now appears more focused on reducing character count. Dropping OP_PUSH32, as suggested, might streamline address formats further while leaving room for future versioning through additional payload words. Encoding the Witness version beyond 16 presents its own set of challenges, with potential solutions involving specific opcode sequences.

This conversation reflects a deep dive into the nuances of Bitcoin address encoding, exploring avenues for efficiency and clarity while considering implications for future scalability and adaptability.

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