bitcoin-dev

Clarification about SegWit transaction size and bech32

Clarification about SegWit transaction size and bech32

Original Postby Mark Friedenbach

Posted on: December 18, 2017 17:38 UTC

Bitcoin addresses are purely a user-interface issue and do not factor into the bitcoin protocol.

The bitcoin protocol has a generic programmable signature framework called script, and addresses are merely a UI convention for representing common script templates. Segregated Witness (SegWit) is a newer bech32 address format that achieves better security guarantees for pay-to-script or lower fees for pay-to-pubkey-hash. However, changing address formats is not a fork, soft or hard, in bitcoin-like consensus systems. There are many benefits to using SegWit, which includes smaller fees due to moving bytes to the blockweight part. A comparison of SegWit tx and legacy tx costs show that SegWit tx costs more, but it is still beneficial to adopt SegWit because it allows for larger transactions and thus double the capacity of the blockchain when filled entirely with this kind of tx. The concern raised by Alberto De Luigi via bitcoin-dev mailing list is about SegWit adoption by exchanges. Using SegWit decreases fees only for specific kinds of transactions, and it doesn't save space in the blockchain. In fact, the total weight of the blockchain increases, making it difficult to validate more transactions of this kind or get cheaper fees. Bech32 is a non-compatible address format that allows for saving about 22% of space, but it is currently not supported by most wallets. De Luigi suggests that a hard fork bech32 upgrade + 2x could help a lot in scalability while testing Lightning Network (LN). This may be the only way to effectively promote SegWit adoption as upgrading takes a lot of time, especially when services are so crowded, and many new people want to step in. A consensual upgrade plan for 2018 may be necessary for this purpose.