Multi Layer and other Blockchain scaling solutions. 

Scale

This is chapter 6 in The Blockchain Economy serialised book. For the index please go here.

Last week’s chapter looked at alternatives to Blockchain using Directed Acyclic Graph (DAG) technology that are designed to scale better. This chapter focusses on Blockchain approaches to scaling using technologies such as Segwit, Lightning Network, Sidechains, MimbleWimble and Schnorr Signatures.

The scaling challenge defined

The scaling challenge is easy to define in comparison with Visa.

VISA handles on average around 2,000 TPS (Transactions Per Second) and has a peak capacity of around 56,000 TPS. Bitcoin handles an average less than 2 TPS and has a peak capacity around 7 TPS.

A blockchain based alternative should be 10x or 100x or more than what Visa can do today. We need massive scalability. That will enable totally new types of transaction such as Micro/Nano Payments and mobile money for the Unbanked. Linear scaling is not enough. It must be the kind of non-linear scaling that powered the Internet.

Of course all these transaction also have to be done reliably. Nobody will thank you if you handle 200,000 TPS but leave a lot of those transactions open to fraud.

It also has to be done fast. Consumers expect digital transactions to be “human real time” (the time it takes for somebody to say/text “did you get that?” and the other person to respond y/n i.e few seconds).

And cheap. It must be cheaper than credit cards and cheap even for very small transactions as a cash alternative.

Massively scalable, totally reliable, fast and cheap. Nobody said that this would be easy!

Smart non-tech guide – decrypted tech jargon

It is traditional to label these explainers “Dummies” or 101. We need a new label. The Daily Fintech community is super smart (no dummies in our 21,000 subscribers), but they may not come from a technical background. We are in the translation business – from Tech to Biz and from Biz to Tech. Only when both Tech and Biz are working well together do good things happen.

So for lack of a better term I call this the smart non-tech guide. Maybe decrypted is the right term.

  • Bitcoin Block Size. 

This was the issue that created the Bitcoin Civil War. Should it stay at 1MB or grow to enable it to scale better? Tuning into a debate on this is like listening to Red State/Blue State political shouting matches  – no civility, no listening, very little rationality.

  • Transaction Malleability. 

Why: Fraud. If a transaction is malleable, it means that somebody can change a transaction, which equates to stealing money

When: Fixed by Segwit (see below)

Who: Bitcoin Core developers

  • MultiSig

Short for: Multiple Signature

Why: like an escrow service with notaries, essential for Smart Contracts where multiple entities need payment based on If This Then That type business logic and multiple signatures are needed before assets can be transferred.

When: possible now.

Who: Bitcoin Core and Ethereum developers.

  • Segwit

Short for: Segregated Witness

Why: Rather than increase the size of each Bitcoin block, Segwit keeps signatures outside the Bitcoin block in order to save Block space. Think of this like keeping signatures on a check outside the core transactional system (which only records that a signature was received and then points to the system where evidence of that signature is stored). This becomes more important now that MultiSig means more signatures.

When: Technically done, live, not implemented by all players in the ecosystem yet but adoption is happening.

Who: Bitcoin Core developers

Note 1: Segwit2x was created by a group that opposes Bitcoin Core and wants a hostile takeover of the Bitcoin brand. They support SegWit but want a 2mb Block size. This attempt ended in November and restarted again at end December (see this post for details). The market will decide and that will depend largely on the success of Lightning Network in enabling multi-layer scalability.

Note 2: SegWit has value on its own but is more important as a stepping stone towards other scalability innovation such as Lightning Network (see below).

  • Lightning Network

Pay attention – Lightning Network could define the future of Bitcoin, Blockchain and Cybercurrencies.

Why: to enable Offchain Processing via Payment Channels (see below for definition). This should enable massive scalability while leveraging Bitcoin’s security – but see below.

When: still in development/testing. SegWit was an essential prerequisite. January 2017 was the public alpha release and December 2017 saw the Release Candidate (RC1) and some test transactions were done. This is mission critical infrastructure stuff so the mantra is “test, test, test and then test again” and the response to any “when will it be ready?” question is “when it is ready”.

What: Lightning is a decentralised P2P network using a smart contract scripting language for Bitcoin/blockchain transactions. Two key concepts:

  • Bidirectional Payment Channels. Two participants create a ledger entry on the blockchain which requires both participants to sign off on any spending of funds. Both parties create transactions which refund the ledger entry to their individual allocation, but do not broadcast them to the blockchain. They can update their individual allocations for the ledger entry by creating many transactions spending from the current ledger entry output. Only the most recent version is valid, which is enforced by blockchain-parsable smart-contract scripting. This entry can be closed out at any time by either party without any trust or custodianship by broadcasting the most recent version to the blockchain. By creating a network of these two-party ledger entries, it is possible to find a path across the network similar to routing packets on the internet. The nodes along the path are not trusted, as the payment is enforced using a script which enforces the atomicity (either the entire payment succeeds or fails) via decrementing time-locks.
  • Blockchain as Arbiter. As a result, it is possible to conduct transactions off-blockchain without limitations. Transactions can be made off-chain with confidence of on-blockchain enforceability. This is similar to how one makes many legal contracts with others, but one does not go to court every time a contract is made. By making the transactions and scripts parsable, the smart-contract can be enforced on-blockchain. Only in the event of non-cooperation is the court involved – but with the blockchain, the result is deterministic.

Who: as per Wikipedia – Joseph Poon and Thaddeus Dryja wrote the Lightning white paper. The specification was announced after the paper, and is being developed by multiple parties, including Elements Project (c-lightning, depending on Bitcoin Core/bitcoind), Lightning Labs (lnd, depending on btcsuite/btcd), and ACINQ (eclair). The specification is available on Github, and its largest contributor is Rusty Russell of Blockstream. The CEO of Lightning Network is Elizabeth Stark. On a sidenote, it is good to see a woman running what is one of the most technically advanced projects in this space (despite the rampant sexism in the tech biz).

Note 1: Ethereum is also working on similar technology called Raiden.

Note 2: This is what enables a Multi Layer solution. Today’s Blockchain Proof Of Work is Layer 1 aka Onchain processing. Layer 2 will be commercial entities that use the open source Lightning Network code. One example is ACINQ, a French Company. We can expect a lot of new commercial services after Lightning Network goes live.

  • Sidechains 

AKA: Pegged Sidechains

Why/what: functional scalability (as opposed to transaction scalability). The Bitcoin protocol is minimalist – unlike Ethereum where you can code whatever you like. Sidechains allow a transaction to go Offchain, be processed in some way, and then returned to the main Bitcoin Blockchain. For a much better explanation, please read this from the always excellent Richard Gendal Brown.

When: still under development, code submitted for review.

Who: created by Blockstream, a VC funded venture. Drivechain is one project bring Sidechains to market.

Critique: It could create new vulnerabilities/reduce security. It has been a long time under development.

Note: Lightning Network can be viewed as a form of Sidechain and therefore a competitive solution. It is unclear what role Blockstream plays in Lightning Network.

  • MimbleWimble

Name: a spell from Harry Potter.

AKA: code version is called grin.

Why/what: Privacy. Public transactions allow anyone to trace the flow of bitcoins over the blockchain and verifying a growing number of transactions adds to the cost of running a node. MimbleWimble builds on a Bitcoin Core feature called Confidential Transactions that lets senders encrypt the bitcoin amounts in transactions with random strings of numbers called “blinding factors.” This is decrypted by the receiver. Mimblewimble does the opposite as the the receiver generates the blinding factor.

Mimblewimble is similar in objective to CoinJoin, which scrambles all inputs and outputs, but goes a step further. Instead of transactions, MimbleWimble blocks mainly consist of three lists: a list of new inputs (referring to old outputs), a list of new outputs and a list of cryptographic signatures created with the aforementioned dummy output. Although primarily designed for privacy, MimbleWimble also enhances Scalability. Mimblewimble gets rid of the need to track transaction history per coin. One estimate is that if Confidential Transactions and CoinJoin had been used in Bitcoin from the start, nodes would currently require more than a terabyte of data. With MimbleWimble, they would need closer to 120 gigabytes. In short, if Bitcoin is to compete with more anonymous coins like Monero, something like MimbleWimble will be essential.

When: Under Development. It requires a change to Bitcoin Core – so “don’t hold your breath”.  It could attach to Bitcoin via Sidechains or could launch in competition to Bitcoin (and to other piracy-focussed coins like Monero).

Who: a pseudonymous author called “Tom Elvis Jedusor” (Voldemort’s real name in the French edition of the Harry Potter novels) wrote the white paper.

  • Schnorr Signatures

AKA: Signature Aggregation

Why/what: When you want to send transactions from multiple addresses to one address, each of these transactions require their own signature, taking up more precious Block space. if it is just one person sending that transaction from multiple sources, Schnorr Signatures enables that to be done with just one signature. This is an incremental improvement, but a significant one. Some estimate that Schnorr signatures would reduce the use of storage and bandwidth by 25%. However a more important benefit might be increased privacy. Some users intentionally use multiple signatures to increase security using MultiSig. Schnorr signatures can hide that these signatures come from one person, increasing privacy. Schnorr Signatures also reduces spam attack risk – and the need is for scalability + security, so this is critical. As Bitcoin grows it comes under more attack.

When: Under Development.

Who: Bitcoin Core developers.

Bleeding edge alert; many of these are still under development/in testing.

The Internet may not work in theory, but works great in practice.

The Internet looks like one of those systems that should not work in theory but works well in practice – meaning that the theory is wrong. Decentralized, loosely coupled systems are hard to understand but seem to work well. The Bitcoin Blockchain maybe the same. Which is why the future may lie with technology such as Lightning Network that enables a layered stack to develop.

P2P Purists Need To Chill

Back in the dinosaur era, global banks processed cross border payments via central banks through a mechanism called Real Time Gross Settlement (RTGS). RTGS is how Central Banks settle among themselves – it is real time, but only Central Banks get access. It is fast, permissioned, big ticket. Think of that as Onchain processing. Then a payment gets into national payment systems and ledgers within banks get changed and Josephine Q. Public gets credited/debited after Banks process messages via the SWIFT network. This national settlement is slow, semi-permissioned (any SWIFT Member can do it) and can be small ticket. Think of that as Offchain processing.

That is how cross border payments work today.

The Bitcoin world we are moving to today will look similar but better. Big transactions will be done Onchain, small transactions will be done Offchain (and settled Onchain in case of a dispute). Those who bemoan the centralisation that comes with Offchain processing need to chill. It’s like email. We all can/could run our own email servers, but most of us choose not to do that. You can run your own mining rig and be the modern equivalent of a Central Bank – but most of us will choose not to do so.

Image Source

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s