A long-proposed bitcoin feature called âsidechainsâ may soon take a big step forward thanks to a pair of proposals.
The idea behind sidechains, most associated with the startup Blockstream (whose team boasts its originators), is to make it easier to add new features to bitcoin, something thatâs proven difficult in the past due to bitcoinâs design.
In short, sidechains are supposed to make it possible for users to move bitcoins between different bitcoin-based blockchains with different rule sets. For example, in this way, new techniques for preserving the privacy of transactions or a smart contract system similar to ethereumâs could be added to a bitcoin blockchain, without changing the bitcoin blockchain.
Bitcoin security consultant Sergio Demian Lerner, who is spearheading one effort to add sidechain functionality to bitcoin, explained that sidechains would broadly remove the difficulty developers today face in expanding bitcoinâs capabilities.
He told CoinDesk:
âImproving bitcoin the network has been compared to repairing a plane during flight.â
But in addition to Lernerâs team, another group is working on proposals that could potentially put sidechains into the official bitcoin codebase.
In late September, Lerner revealed a proposal for code that could add this functionality to bitcoin, and Bloq economist Paul Sztorc told CoinDesk that he is working on code of his own.
Both are so-called âdrivechainâ proposals, a spin on sidechains first described by Sztorc last November. As such, each proposes a set of new features, called an opcode, that could potentially be added to bitcoin via a change known as a soft fork (an update that doesnât require all nodes to upgrade the software).
However, the two projects have different ideas about how to implement the opcode and donât plan to join forces on one proposal (at least not yet).
In a transfer between sidechains, bitcoins are sent from one blockchain to another, or thatâs what it looks like.
But in reality, bitcoins from one chain (say bitcoin) are locked on the main bitcoin blockchain, while theyâre simultaneously unlocked on the sidechain that theyâre being âtransferredâ to.
The key difference between drivechains and regular sidechains is who ultimately submits the necessary information to transfer the bitcoins back and forth: the users or the miners.
Lernerâs version of drivechain relies on miners to be âalgorithmic proxy custodians,â or programs that help make miners aware of other sidechains attached to the network.
âBitcoin miners observe the state of the sidechain and when they receive a command from the sidechain having proven consent (eg a hundred confirmations), they execute a coordination protocol to make sure they all agree on the authenticity of the command,â Lerner explained.
He added: âIf they agree, they will make a payment using locked funds.â
Lernerâs proposal introduces a new bitcoin script called OP_COUNT_ACKS, which implements the above drivechain functionality (bitcoin scripts are like smart contracts) in about 600 lines of code, in what he called a small change.
Lerner also noted that Segregated Witness, the newest major change to bitcoin, once triggered, could help with this. The code was officially added to bitcoin earlier this month, and the change could be activated by miners as early as this December.
While itâs widely seen as a scaling solution, it comes with other benefits.
âSegWit provides a new system for easy soft-forking: the witness script versioning system. Our BIP uses this system to add a new opcode without the limitations of the previous soft-forking system,â Lerner explained.
Sztorc is working on similar code that has yet to be publicized.
But while Sztorc and Lerner have discussed and collaborated, each seems to think that their own project is best and wants to continue pursuing them separately.
Sztorcâs main critique with Lernerâs implementation is that itâs using the sidechain from another one of his efforts, Rootstock, which features ethereum-style smart contracts, rather than a copy of bitcoin.
âDrivechain is a new idea. So itâs a risk as it is. I donât like the idea of compounding that by doing two new ideas at once,â Sztorc said.Â
Other differences are smaller details, Sztorc noted, using the invention of a hammer as an analogy. Say someone invents a hammer, a tool that never existed before, but they are debating whether the hammer should be built out of stone or wood.
If accepted, either could eventually make its way into bitcoin in the form of a soft fork.
But again, weâre talking about an update that developers compare to an in-flight airplane fix.
Sidechains may be a proposal thatâs supposed to help with this problem, but to first add this functionality to bitcoin, it needs to pass this hurdle as other optimizations and additions, such as SegWit, have.
Blockstream core tech engineer Russell OâConnor described some potential problems with Lernerâs proposed opcode that boil down to the opcode depending on data values that are specific to the block that a transaction is added to.
He explained that other opcodes that have been recently added to Bitcoin Core âwere carefully constructed to ensure this property.â
Also of note is that there might not have been full discussion of the proposal yet. Bitcoin Core contributor Peter Todd declined to discuss the new drivechain opcode because of Lernerâs past bitcoin-related patents, and said that he will reject the proposal âuntil this is rectified.â
Lerner responded that he has no plans to patent drivechain. Further, he said other bitcoin protocol developers, including Matt Corallo and Pieter Wiulle, are open to discussing the change.
When asked about his patent strategy, Sztorc said he has âabsolutely zero intentâ on a patent, even a defensive one.
Besides these specific criticisms, thereâs plenty of skepticism to go around to every sidechain project, with accompanying discussion about the security of each. Some long-standing criticisms boil down to whether or not sidechains are viable at all.
âThe main discussion relates to the effects of putting more power in the hands of the miners and what are the long-term consequences. More specifically, the question is what would happen if a bitcoin sidechain grows so popular that [miners mining both bitcoin and the popular sidechain] need to run higher-end computers, outcompeting solo miners,â Lerner explained.
But Sztorc seemed optimistic despite the criticism, some of which he plans to address in a âvery longâ blog post in the coming weeks.
âThe philosophy is mostly done and the code is mostly done. Weâre both really close,â he said.
Lerner concluded much the same, adding:
âWeâre are very enthusiastic this could happen as soon as 2017.â
Molecular model image via Shutterstock