Eagerly Awaited Launch of Segregated Witness Testnet Announced

A significant milestone in the development of the bitcoin blockchain is one step closer as the launch of the Segregated Witness Testnet is announced. The development follows research by Dr. Pieter Wuille, a Bitcoin Core developer, which was undertaken in an effort to address transaction malleability.

Additional properties of the solution were discovered that allow for increasing the block size whilst also offering possible other benefits. Bitcoin Core committer Gregory Maxwell proposed that work on a softfork ‘segwit’ be started immediately, following the Scaling Bitcoin conference in Hong Kong in December last year. Other major bitcoin contributors that have been involved with the effort include: Eric Lombrozo, Johnson Lau, Alex Morcos, Nicolas Dorier, Bryan Bishop, Peter Todd, Cory Fields, Suhas Daftuar, and Luke-Jr.

Developers are being encouraged to help begin testing and integration immediately in an effort to bring these new proposals to a deployable state. Many people are eagerly awaiting the introduction of the Segregated Witness as it is expected to result in a huge efficiency boost in the use of blockchain by freeing up a huge amount of the space on blocks.

The basic idea behind the move is to move transaction signature data from the blockchain to a specially delegated “Segregated Witness” data structure, which is outside of the transaction block. This could potentially reduce the amount of data on the blockchain by up to 60% – increasing the efficiency and additionally generating opportunities for the bitcoin ecosystem. So far, smart contract applications and significantly faster transactions have been suggested as being areas that will benefit, with more possibilities opening up further into development.

Already, wallets and supporting libraries are backing the release. Ledger, Trezor, Electrum and Bitgo are all behind the move and work on other libraries such as bitcoinj, bitcoinjs, pycoin and bitcore has already begun.

There are 4 new BIPs behind this development: BIP 141, 142, 143 and 144.

BIP 141 defines a new structure called a “witness” that is committed to blocks separately from the transaction merkle tree. This structure contains data that is required to check transaction validity, but which is not required to determine transaction effects. Most notably, scripts and signatures are moved here. The witness is committed in a tree that is nested into the block’s existing merkle root via the coinbase transaction for the purpose of making this BIP soft fork compatible.

There are a number of benefits that stem from this proposal. Firstly, nonintentional malleability becomes impossible as signature data is no longer part of the transaction hash. Therefore, changes to how the transaction was signed are no longer relevant to transaction identification.

In addition, transmission of signature data becomes optional, unless a peer is trying to validate a transaction instead of simply checking its existence. This reduces the size of SPV proofs and potentially improves the privacy of SPV clients as they can download more transactions using the same bandwidth.

Furthermore, some constraints could be bypassed with a soft fork by moving part of the transaction data to a structure unknown to current protocol. Potential benefits include:

  • The size of witness being ignored / discounted when calculating the block size, effectively increasing the block size to some extent.
  • Hard coded constants, such as maximum data push size (520 bytes) or sigops limit being reevaluated or removed.
  • New script systems being introduced without any limitation from the existing script semantic.

BIP 142 is required to describe new types of bitcoin address to support native segregated witness transactions with 20-byte and 32-byte program, hopefully promoting early adoption of the more efficient transaction method.

The 143rd BIP is a proposal which defines a new transaction digest algorithm for signature verification in version 0 witness program, in order to minimize redundant data hashing in verification, and to cover the input value by the signature.

Finally, BIP 144 defines new messages and serialization formats for propagation of transactions and blocks committing to segregated witness structures, allowing peers to advertise support for segregated witness and to relay the witness structures and request them from other peers without breaking compatibility with older nodes.

Links that are available for people wishing to be involved with this testing include a faucet for “segnet” coins, early previews of third party wallet support with mSIGNA (wallet source-code), Green Address (web wallet) and the segwit-dev IRC channel. There is also a migration guide for wallet providers and wallet users can track their wallet implementation.