Bitcoinâs lightning network may be just starting to send transactions over the blockchain, but already its developers are looking to rearchitect the technology.
Thatâs because, while touted as a way to significantly boost bitcoinâs capacity, the network itself does require users to store a significant amount of data, which makes it difficult to download and run. As such, several lightning developers â Lightning Labs co-founder âLaoluâ Osuntokun and Blockstreamâs Christian Decker and Rusty Russell â have published a new proposal which imagines an alternative, âsimplifiedâ way of making off-chain transactions called eltoo.
But the new proposal isnât only about condensing the amount of data users need to store, itâs also about keeping usersâ cryptocurrency safe.
For instance, all this data poses another problem in that if users accidentally broadcast older data, they might lose money. As such, this data has been coined âtoxic information.â
Eltoo, on the other hand, only stores the most recent off-chain transaction data, solving the well-known âinformation asymmetryâ problem â that is if something happens to the device youâre running your lightning app on â say your smartphone â you might lose access to the whole history of data.
âWith eltoo, we reduce the risk of funds being swept away. We remove this toxic information,â said Decker, who noted that the proposalâs name is a joke of sorts â the phonetic spelling of âL2,â which stands for layer-two, what many people call technology like lightning that pushes transactions off-chain.
And this is something Decker is very interested in since heâs experienced the problem personally.
âThis actually happened to me,â he said, adding:
âI had an old lightning node on my laptop. I restored it. I didnât know I didnât have the newest state. The guy closed the connection because they knew it was an old state! Because he could steal it. Which he did, by the way.â
Developers have long been trying to come up with a way for users to make a bunch of transactions using bitcoin, without bloating the blockchain with unnecessary data.
Thatâs really what most of the scaling debates are all about.
But the first attempt to do this was way at the beginning of bitcoinâs history when off-chain transaction capabilities were experimented with using so-called âsequence numbersâ to keep track of which off-chain transaction is the most recent.
The idea was simple â if Alice has $10 and sends a $1 transaction to Bob, obviously her balance dwindles to $9.00. This then gets a sequence number â1.â If later, she sends Bob $4, her balance is now $5, and this most recent transaction gets a sequence number â2.â
But according to Decker, the mechanism âdidnât work out,â because miners didnât have any reason to enforce the rules and replace old transactions with the more recent ones.
Miners could just broadcast the one transaction where Aliceâs balance drops to $9 (even though she had made another transaction that dropped her balance to $5). While itâs unclear why a miner might want or decide to not revoke a transaction for another one, they could decide to do so since there was no enforceability.
In this way, revoking old transactions in crucial otherwise Bob might not get the second transaction and Alice could run away with the money.
This âlack of enforceabilityâ is a problem that wasnât solved until 2015.
And the lightning network is the best-known solution to this problem so far. Today, revoking old state is accomplished with the âL2-penaltyâ model â whereby a lightning wallet or node stores all of these intermediary states, then, if someone tries to broadcast an earlier, now-invalid state, this is detected and the cheating user is punished by losing money.
But, three years on, the researchers are, in fact, going back to the idea of using sequence numbers to revoke old transactions.
Unlike bitcoinâs old code, which didnât have an enforcement mechanism for these sequences, eltoo adds a procedure that makes every state update prescribed. Every state update â Alice sending Bob money, for instance â is composed of two transactions, each of which both parties store and which totally replace the prior update transaction.
âOnly the last settlement transaction can ever be confirmed on the blockchain,â the introductory blog post explains.
The tangential advantage of this system is that it increases lightningâs scalability. With eltoo, each lightning node doesnât need to store all the intermediary states, rather, it stores only the most recent version and some information about the transaction itself, such as itâs corresponding settlement transaction and potentially the HTLCs that spend from that settlement, the post notes.
Whatâs perhaps the most beneficial part of the proposal, though, is that it isnât built on a âwinner takes allâ model.
Instead, eltoo and older L2 penalty schemes can be used side-by-side.
âEltoo has quite different tradeoffs. Iâm not implying itâs better in all senses,â Decker told CoinDesk, pointing to some arguments on the bitcoin developer mailing list about the technology increasing waiting times for transactions to be settled.
Still, overall, heâs pretty excited about eltoo and the simplicity it brings, adding:
âWe donât know which one is nicer, but I would like eltoo as the better option. I think eltoo is easier to explain and to extend later on.â
Not only are developers still discussing the proposalâs merits, but thereâs another thing standing in the technologyâs way â âsighash_noinput.â
This long-anticipated code option needs to be added to the bitcoin codebase for the cryptocurrency to be able to support eltoo (at least in an efficient form).
To understand why, itâs important to know what the basic sighash function does. It works as a flag of sorts that specifies what part of the transaction data needs to be signed when itâs transferred over to someone else. Users can choose from a range of options â for instance, the default flag, sighash_all, indicates that all parts of the transaction need to be signed, meaning that none of these parts can be changed throughout the process.
The proposed âsighash_noinputâ function could flag that the âinputâ data going into a transaction doesnât need to be signed. And in turn, that the input data can change over time, from when the transaction was created to when itâs written to the blockchain.
And this is exactly what eltoo needs, since the concept is that all the state in between the beginning and final transaction will be deleted, meaning the input will be different from the start and the end.
When asked whether he thinks the sighash_noinput proposal will get merged into the bitcoin codebase, Decker laughed and said, âEver since SegWit, I stopped making these predictions.â
Heâs pointing to the fact that Segregated Witness (SegWit) had broad support from the bulk of bitcoinâs most active developers, but ended up stirring up a years-long battle within the community. The code change was only added to bitcoin last August, even though it was proposed more than two years prior.
Still, even though itâs early, the sighash_noinput function is a relatively easy change to make to bitcoinâs codebase, Decker said.
Plus, itâs been theorized for some time that the change would have many positive implications for developers, he continued. Because of these potential benefits, a handful of Twitter users have begun adding the code change to their profiles to express their support, much like Twitter users did during the scaling debate (with #No2X becoming popular among those who were opposed to the Segwit2x initiative).
Remaining hopeful, Decker concluded:
âEvery day new use cases join the sighash_noinput front.â
Electricity warning box image via Shutterstock