Will Ethereum 2.0 solve scalability problem?

Quoc Le
LecleVietnam
Published in
6 min readDec 28, 2018
What will Vitalik’s team do to solve Ethereum scalability problem?

Nowadays, we’re all talking about blockchains with the 3 key factors of: Scalability, Security, Decentralization. While all blockchains seem to do quite great job at Security and Decentralization, the problem of scalability always has been part of current blockchain. There’s always the question: How to reach to the middle of the triangle to make blockchains meet requirement of real applications about number of transaction per second and the delay in transactions

Triangle: Security, Decentralization and Scalability

In this article

1. What is Ethereum problem?

2. How does ethereum 2.0 solve Scalability problem?

3. The Beacon Chain

4. Conclusion

What is Ethereum problem?

ETH Scalability

ETH co-founders was build Ethereum as a blockchain platform where developers can build blockchain applications without rebuild from scratch, But it’s never seen as efficient as other faster blockchains. Many complain at the number/speed/cost of transactions of ETH. Let’s look around about TPS(transaction per second) in current crytopcurency as below:

With the speed of just 20 TPS at this moment, Ethereum has such a long way to go.

And we can see that there are no current blockchains can be faster than VISA.

So the question for Ethereum is “How we can build a blockchain application in ethereum platform as VISA or Stock Exchanges if it only have 20 TPS as well as how to expand it’s capabilities to meet requirement with most applications?” Let’s look in detail the indicators that Dapp developers pay attention to in ETH network?

The constants of ETH

TPS (Transaction per second): This is the most important to decide the performance of blockchain. A faster TPS means that the system will be able to efficiently handle more transactions without any lags or delays.

Block time: At present, each transaction take about 15 seconds to complete and the confirmation times are an average: 12 block ~ 3 minutes. Even if receiver accept 1 confirmation, it will take average of 15 seconds. For a real example: I want to build a online store Dapp, my customers need to wait 3 minutes to make sure their money go to my wallet. Then I will confirm their order. Will anyone wait for my service?

Cost of transaction: This depend on network condition and demand, it’s around 0.1 USD. In my point of view, this cost look really cheap for payment application. For normal applications, it is impossible to pay for each action using Dapp. For instance, a customer want to vote for a product which he/she is interested. This could be the limitation for Dapps.

What factors determine Scalability of ETH blockchain?

Consensus

At present, Ethereum use Proof of Work and every transaction needs to be processed by every node (computer) in the network. In the network with more than twenty thousand of nodes verifying transactions, it needs time to broadcast/sync all data between them. This is the main problem that make the network very complicated to expand and speed up transactions.

With this consensus we can have an conclusion “capacity of a blockchain is limited by capacity of one node”. Of course with more nodes we will have more powers, more CPUs but actually the performance be decreased because they are doing the “same” job and they need more time to talk together.

Storage/CPU/Network:

Basically, Storage use to store block data, CPU to perform signature verifications and Network to broadcast/sync transactions to all nodes.

The one thing to increase number of transaction is block size. A bigger block size means the increasing in capacity to process transactions. To increase block size we need some pre-conditions: bigger Storage, stronger CPU, faster Network to perform it. That mean only a few parties would be able to do block validation if block size too big. This also make the network more centralized.

Example: If the network was to process 2000 transactions per second, with each transaction about 0.1 kb, it would be 0.2Mb per second (~6.3TB per year). Let’s imagine after 10 years, we need 63TB hard storage to run full node this network. That mean only large businesses would run full nodes their network.

How does Ethereum 2.0 solve scalability problem?

With current problem and limitations , the question is:

How to create a network that has sufficient number of nodes — while keep the resource(CPU/NET/STORAGE) of each node small enough that all people can be apart of them?

The Ethereum foundation proposes a solution to make nodes can work parallel, it calls “Sharding chain”. It will has multiple shard chains in a system.

What is sharding chain?

Traditionally, there has been a requirement for each node to carry all data on the blockchain. With Sharding they slip blockchain state into number of group , that mean each node only has to carry a small amount of data in order to complete a transaction and each Sharding chain is a separate blockchain that contains separated accounts, state, transactions.

Shard chain

Example: At present, ETH1.0 have about ~ 25,000 nodes (computers) and the data size about 120GB. if we split it into 100 groups then each group will has 250 nodes and each node only carry 12 GB. This group is calling Sharding Chain

How does Sharding chain works?

In current system (ETH 1.0), it’s only have one chain and this chain will records all transactions and state.

In new design (ETH2.0), it has two systems, the main chain has responsibility to watch the shards and the sharding chains will record transactions and state as well as will be processed by a group of nodes.

Some proofs of the shard chains: transaction root, state root will be written into main chain block.

Constants of Sharding Chain:

SHARD_COUNT: 2^9 = 1024

SHARD_BLOCK_SIZE: 2^14 = 16384 bytes

So the maximum TPS that network can archive will be depended on number of shard chains. It could be: 1024 * 15 TPS ~ 15,000 TPS

Now another question is coming up: “How Shard Chains can communication together and How chains can be linked up to main chain?”

The Beacon Chain

At the core of Ethereum 2.0 is a system chain called the “beacon chain”. The main role of beacon to listen to the Shard Chains for new blocks and signal which blocks from the Shards should be added onto the main chain. Then the main chain will be validated & finalized using Proof Of Stake.

Overview Eth 2.0 system

The beacon chain is proof-of-stake blockchain. It stores and manages the registry of validators. You can become one by depositing at least 32 ETH.

Basically, validators will work as miner in POW, The active validator will be selected by random numbers and responsible proposing blocks on the Beacon Chain and the shard chains. This is the way “proofs of the shard chains” will be added into main chain.

Other Chains can communication together via the crosslinks. The current state of every shard is recorded as a crosslink on a Beacon Chain block. When the block is completed, the shard block is automatically considered finalized as well.

So the Beacon chain works as heart of network system to get proof of transactions/state/accounts from sharding chains then push it to main chain.

Conclusion

As Buterin told:

So if you get a 100x from Sharding and a 100x from Plasma, those two basically give you a 10,000x scalability gain, which basically means blockchains will be powerful enough to handle most applications most people are trying to do with them.

The Beacon Chain and Shard chains is currently under development, there are something will be changed. Even they apply the shard chains to new system and the maximum TPS can 100X, this also cannot met the requirement of most applications. There is another technical call “plasma” may be applied to scale up system to get “the dream number” million of TPS. With this number, it can perform in almost all real applications.

If you’re interested to know “Plasma”, Please wait my next topic.

Refer:

Ethereum 2.0 Specification

Sharding Chain

By Quoc Le@ Lecle VietNam Blog

--

--