A Brief Primer on 3 Techniques for Ethereum Scalability

in ethereum •  6 years ago 

scaling.png

Blockchain has long faced accusations of a “scaling problem”.

Ethereum scalability in particular has been questioned. After all, the root chain can only process a measly 15–20 transactions per second.

We recently wrote a blog about “Layer 2” blockchain technology. Layer 2 tech is built on top of existing blockchains to add some much needed functionality. Perhaps the most significant addition is the ability to significantly increase Ethereum scalability far past its native limitations.

Instead of 15–20 transactions per second, imagine thousands, if not millions.

Now imagine the range of applications you could build with that degree of speed. Imagine how many businesses require that degree of speed and scale to operate.

There already exists a spectrum of Layer 2 techniques that solve for Ethereum scalability. Today, we’re going to briefly discuss the most popular of those: Plasma, State Channels, and Sharding.

Ethereum Scalability Technique 1: Plasma

Plasma serves as the infrastructure to achieve the transaction volume needed for larger applications. As a Layer 2 solution, plasma sidechains sit atop a root blockchain like Ethereum. With the Plasma infrastructure, you can deploy these child chains without sacrificing security because the security is assured by the consensus mechanism of child chains.

blocky.png

Validators report transactions that happen on the child chain to the base layer. The validator does this by sending bits of code (technically a blockheader hash) that denotes the latest block change from the child chain. That code allows us to identify a block. For more on hashes and blockheaders, check out our piece on Merkle Trees.

However, the signature feature of Plasma is the ability to settle disputes and “mass-exit” the child chain if that chain is compromised or faulty. Plasma is certainly a scaling solution for Ethereum.

But it’s also a security solution.

Like a court system, users that believe a validator is being dishonest about the activities taking place on the Plasma sidechain can submit evidence to the main chain. If and when that does happen, Plasma enables a mass-exit functionality to effectively “kill” the compromised chain.

If you want to learn more about building plasma-enforced sidechains, we discuss them at length in our yellow paper.

Ethereum Scalability Technique 2: State Channels

Like plasma-enforced sidechains, state channels also involve processing transactions and other state updates off-chain. It does this through two-way channels that allow two users to communicate and confirm their transactions to each other.

Stephen Tual, former Ethereum CCO, describes state channels as a “two-way discussion channel between users, or between a user and a service (a machine).” Here’s how it works:

  1. Each user in the channel signs the transactions with a private key. The channels are private and off-chain, allowing for instant and anonymous transactions only known to the participants.

  2. To close the channel, users submit the last updated state of transactions to the blockchain. If there’s no dispute among other users about the recent state change, then the channel closes.

  3. If there is a dispute, the most recent state can be uploaded to the root blockchain where the smart contract judges whether the signature of the transaction is valid.

Transactions are signed and time-stamped which can help identify the honest party. This kind of structure can potentially scale to tens of thousands of transactions per second with instant transaction confirmation at lower fees.

We still get the benefits of transaction finality under this court system. Since the root chain layer serves as a judge, if there are disputes, we can still refer back to the root chain to settle with cryptographic proof.

Ethereum Scalability Technique 3: Sharding

To be completely honest, sharding is not just a Layer 2 scaling solution. Technically speaking, you can shard a root chain like Ethereum, or a sidechain built on top of Ethereum. Either way, sharding is built to do one thing: exponentially increase the number of transactions a blockchain can process simultaneously.

On its own, Ethereum transactions must be processed by all the nodes. Because each node must independently verify every transaction, processing time is lengthy.

shard.png

Sharding avoids this by relying on multiple networked machines that distribute the computational burden. The state of the network is divided into smaller sections or partitions called shards, with each running a smaller scale consensus protocol.

Rather than having all transactions computed on the base layer, we now have a network of shards processing their transactions simultaneously and communicating with the root chain (base layer). There’s a contract on the main chain to coordinate validation for the separate shards. Parallel processing here can really help increase transaction capacity per second per shard. As more nodes join the network, we can process even faster.

In short, sharding simply follows the same philosophy that any good team does. The more people you have working on a project simultaneously, the faster that project will get done.

Moving forward, blockchain will continue to gain steam as a technology for applications — not just cryptocurrency. However, in order for it to be fully accepted as a suitable technology to build upon, we need to be aware of the advancements that make it suitable.

For more content from Lucidity, do these things:

Join us on Telegram → https://t.me/luciditytech
Check out our whitepaper → https://lucidity.tech/whitepaper/
Follow us on Twitter → https://twitter.com/lucidity_tech
Join our community on Facebook → https://www.facebook.com/luciditytech/
Or follow us on LinkedIn → https://www.linkedin.com/company/luciditytech/
Originally published at lucidity.tech on July 26, 2018.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!