Since Segregated Witness was announced last December, it has been one of the most anticipated software releases across the bitcoin community. If it succeeds, the software patch could be the first step to growing the block size and scaling bitcoin.
Yet,Â due to the scope of the project and the long-term implications it could have for the $7bn network, the development team is moving carefully. Despite recent assurances that segwit would launch in April, the team continues to review the software well into May.
In an interview, Eric Lombrozo, CEO of Ciphrex and a spokesperson for Bitcoin Core, cautioned that there could be any number of unanticipated bugs that the team found, leaving the timeframe for when it launches up in the air. On top ofÂ the regular Core developers, Lombrozo said that independent developers have been tasked with trying to break the code as an extra precaution.
While Bitcoin Core is cautious not to launch prematurely, the team is pushing hard to complete the projectÂ asÂ it provides an immediate block size increase. Lombrozo suggested that “with typical commonly used transaction types”, users can expect an 1.8x capacity increase to Layer 1, the base layer of the bitcoin network.
However, segwitÂ is much more than just a step towards scalability. LombrozoÂ explained that the update will also make it easier to implementÂ future changes.
Lombrozo told CoinDesk:
“Being able to deploy improvements to the protocol smoothly has been a difficult challenge in the past. With segwit we will also be able to do things like improve or replace the scripting language and build more sophisticated smart contracts.”
While it is true that scaling is highly anticipated, the capacity by which new rollouts can be implemented could have even greater implications for bitcoin down the line.
Testing the framework
But, segwit didnâ€™t originate as a method by which to scale the bitcoin network. Instead, the ultimate goal was to try and solve transaction malleability, a quality of the network that has been controversial since its use as a scapegoat for Mt Gox’s early exchange issues.
With the transaction malleabiltiy goal in mind, Wuille started working on segwit with Elements Alpha, a sidechain software developed by Blockstream for this sort of prototype development.
It wasnâ€™t until after the Scaling Bitcoin Montreal conference held in September that the idea of using segwit as a scaling mechanism via a soft fork was discussed.
Lombrozo explained that bitcoin developer Luke-Jr first discovered the mechanism by which segwit could be used to scale bitcoin without needing to initiate a hard fork. Instead, a backwards-compatible soft forkÂ would allow nodes to upgrade to the more current software without kicking older nodes entirely off the network.
“Only miners need to upgrade,” explained Lombrozo. “Everyone else can upgrade at their leisure without risk of getting thrown off the network because the change is backwards compatible. Old wallets will continue to be able to send and receive bitcoins without any problem.”
Once Wuille presented segwit to the community, it became necessary to actually build it out and test it. In many instances, testing software can take just as long, if not longer, than the process of building it.
But when dealing with software that powers billions of dollars, it’s necessary, Bitcoin Core argues.
Lombrozo explained that Core has already deployed four separate testnets for them to test segwit and are currently working on what they call Segnet4. A testnet in the generic sense is akin to a test server whereby developer can run their test cases against, trying to find any breaks in the software.
This is different from the bitcoin testnet, which is akin to a staging environment for the actual bitcoin software.
“The key things weâ€™re looking for are how edge cases are handled and how the network behaves as we approach or surpass its limits,” Lombrozo said.
For example, itâ€™s important to test whether the network can actually handle a block with 2MB of space. In one transaction, which had 13,982 inputs and 9 outputs for a total of 5 transactions, the size of the block was 2MB exactly. In some instances, the team of testers pushed the block up to 3.6MB to test whether the network could handle it.
Lombrozo explained that, while possible, itâ€™s not likely that any block would be that large because miners would wind up losing money.
To ensure deploying segwit doesn’t break the network the team conducts regression testing on their local machines.
“These tests are part of a test suite thatâ€™s incorporated into our continuous integration process. If any build breaks something, we hope to be able to detect it right away,” Lombrozo said.
Once all is said and done, the team will have to deploy the software to the bitcoin testnet and merge it.Â A timeframe for this is still uncertain, but Lombrozo confirmed that the team hopes to deploy in May.
There are advantages to taking the soft fork approach. Specifically, users that are attached to the network are not suddenly kicked off because of laziness, technical deficiency or inaction.
However, because adoption is optional, the maximum benefit can only be achieved if everyone upgrades.
Lombrozo feels that the benefits of upgrading to segwit are worth enough to encourage application developers to put the work in.
“Not only will they be able to use the higher capacity afforded by segwit and pay lower fees, they will also be able to support other features later on that are enabled by segwit with only minor upgrades,” he said.
According to a FAQ published on the Bitcoin Core website, the transaction fees are going to be significantly smaller because the effective size of the transaction is also smaller.
The site reads:
Each byte of the witness part of a segregated witness (segwit) transaction will only count as 0.25 bytes towards the size of the transaction. Since transaction fees are based on the size of a transaction, this is effectively a 75% discount on fees for that part of a transactionâ€”but only for people who use segwit.
But the other reason that developers are likely to adopt segwit is because it is a huge necessary precursor, along with the recently released CheckSequenceVerify to the Lightning Network. If estimates are true, nodes that are on high-speed internet can expect to process thousands of transactions a second, up from the seven-per-second rate that the network currently allows.
Further, this is just the first stage of segwit.
Once itâ€™s rolled out, the team intends on combining signatures, which would compact transactions even further. Lombrozo explained that while theyâ€™re not introducing this currently, it will now be possible with segwit.
As with many technologies, the first use case evolves into many others.
While many continue to argue about the merits of hard forks versus small forks, the first significant increase in block size in quite some time is nearly ready to launch. With further testing to come, the developers continue driving toward the goal of expanding the network for everyone.
Rocket motor image via Shutterstock