Ethereum is one of the most well-known blockchains, and it is about to receive a significant upgrade. The crypto community is now keeping an eye out for ETH 2.0, and for a good reason. The 2.0 upgrade will bring a host of changes to the network that will make Ethereum faster and more secure than ever before. The changes that this upgrade is going to bring in a host of changes like - proof-of-stake, Sharding, eWASM, Plasma, and the Raiden Network.
Ethereum 2.0 has been an open secret for quite some time now. When Ethereum was initially released, it was done so in five stages. This was done to give each step the proper development time it required:
The most significant change that will happen during this upgrade is the transition from POW to POS. Now, we will be covering ETH 2.0 staking in a future article. This time around, let’s give you a little overview.
In a POW system, specialized nodes called “miners” who use specialized equipment like ASICs to solve cryptographically hard puzzles. If they are successful, then they get to add a block to the blockchain and earn rewards.
POW, while secure, has the following problems:
This is the reason why Ethereum is opting for a POS strategy.
Ethereum will be adopting solutions like Beacon and Casper to transition over to POS successfully. As mentioned before, we will be going into the bare bones of this topic in a future article.
Most of the technical advances that Ethereum will make in its Casper upgrade are scalability-related. Sharding is a layer-one scalability technique that will scale Ethereum up to thousands of transactions per second. So, how exactly does this work, and why is it beneficial?
For this, let’s understand the difference between sequential and parallelized tasks. If you need to move from position A to position B, you have to do three tasks T1, T2, T3. Now, if you have to do the tasks one after another, then its called sequential. However, if you can somehow manage to do these three tasks at once, then it’s a parallelized task. As you can imagine, the latter is a considerably faster method.
Cryptocurrency transactions are sequential:
As you can see, the processes here can’t be parallelized, and for a good reason. Every single thing here needs to be processed before it can go on to the next one. However, what if we parallelize the state itself? Ethereum is hoping to achieve that with Sharding.
What is Sharding?
Sharding is a very popular concept in database systems. Databases sometimes need to deal with a large amount of big data, which makes traversal and data location extremely difficult and inefficient. What Sharding does, is that it horizontally partitions your database and becomes much easier to handle sub-databases. Let’s look at a simple example of what we are talking about:
Here, we have a table that declares two variables - A and B. Along with that, we have multiplication and a division function. Now, if we implement Sharding, it horizontally partitions the table into these:
Basically, smaller sub-tables of the same table.
It's crucial to note that Sharding is a horizontal partition. The reason being, when you do a vertical separation, this is what it looks like:
Upon vertical partitioning, the subtables are entirely different tables from the original ones.
The smaller subtables that you get following horizontal partitioning are called “shards.”
How does ETH 2.0 use Sharding?
As we have mentioned before, Ethereum’s architecture makes it inherently non-scalable. As more nodes enter the system, the more time the whole verification and consensus process takes. What Sharding does is that it breaks down the entire state of the blockchain into more manageable shards. Every single Ethereum account will belong in a shard.
To understand how this works, imagine a hypothetical network with three nodes - Alice, Bob, and Charlie. This network has to verify data D. Now, instead of these three checking the data at once, the data gets broken down into three shards - D1, D2, and D3. Alice, Bob, and Charlie get a shard and work on it at the same time. When you scale this model up, you can see why this can save an exponential amount of time and resources.
In blockchain terminology, layer-2 is a framework that lies on top of the existing blockchain. This framework will enable users to conduct interactions, which would typically occur on the blockchain, off the blockchain. In the process, it will help reduce clogging in the main blockchain and increase overall speed and scalability. ETH 2.0 uses two techniques to capitalize on layer-2 scalability - Raiden and Plasma.
The Ethereum community has long debated and talked about the scalability issues prevalent in the underlying protocol. One of the factors that make Ethereum’s transaction slow is its verification process. The miners must verify the validity of each transaction before inserting them into their blocks. While this sounds good on paper, the reality is quite different. The process creates a bottleneck and increases the waiting time for the rest of the transactions in the mempool.
Raiden uses state-channels and hashed timelock contracts (HTLC) to allow users to rapidly and directly transact with each other. A state-channel is an off-chain, cryptographically-secured communication channel between participants.
Raiden is especially helpful in the case of microtransactions. Usually, it makes no sense to send $1 to someone through ETH, since you will have to pay a transaction fee and wait for verification. Raiden allows Ethereum to organically handle a large volume of microtransactions.
Image Credit: Raiden.Network
So, how does it work? Let’s do a brief overview:
The advantages of using Raiden are as follows:
Plasma is like layer-2 on steroids. The whole idea is to break down the blockchain into an entire network of child blockchains or plasma chains built on top of the main blockchain. OmiseGo is an Ethereum-based open-source payment platform. They are presently working on plasma implementation.
Image Credit: Plasma Whitepaper
Let’s break down the functionalities:
If properly implemented, the Plasma protocol will allow Ethereum to speedily and efficiently execute vast amounts of data, without clogging up the main blockchain.
The next significant update to consider here is eWASM. Before we get into it, let’s understand what the Ethereum Virtual Machine (EVM) is. You can think of EVM as the core computational component of Ethereum or its CPU, so to speak. The EVM takes care of all of Ethereum’s internal state and computations. The EVM makes sure that the following components of the are correct:
The EVM is also responsible for executing smart contracts by converting it from solidity/Vyper to machine-readable EVM bytecode. The EVM executes bytecode in every single node on the network. Since it is responsible for so many functions, the speed and efficiency with which the EVM operates are directly proportional to the speed and efficiency of the entire network.
The eWASM solution
The solution that eth 2.0 will use to contour this issue is WASM or WebAssembly - an open standard instruction-set developed by a W3C community group. The W3C group is an open standard instruction-set currently being worked on by Google, Mozilla, Microsoft, and Apple.
Features of WASM are as follows:
So, at this point, you must be wondering, what’s the difference between WASM and eWASM. To understand the difference, just keep in mind the following formula:
eWASM = WASM — nondeterminism (floating point) + metering + EEI (methods that are used to interact with Ethereum).
The team that's creating eWASM has listed down the following as their goals:
With the eWASM implementation, Ethereum will join projects like Polkadot, Cardano, EOS, Tron, Spacemesh, and NEAR protocol, who have either adopted or are in the process of choosing WASM.
Ethereum has already implemented a bunch of system-wide upgrades that are part of its current Metropolis version implementation. Ethereum may also incorporate privacy in the form of zk-SNARKS or “Zero-Knowledge Succinct Non-Interactive Argument of Knowledge.” A privacy protocol made famous by Zcash and refers to a construction that allows a prover to prove to a verifier that they own a particular piece of knowledge without directly telling them what that knowledge is.
As you can imagine, ETH 2.0 needs to be implemented in various forks or phases to ensure each piece of the update is integrated correctly. These phases are as follows:
The Phase 0 of ETH 2.0’s implementation begins in 2020. It will launch the beacon chain, which will signal the beginning of the proof-of-stake implementation. The beacon chain manages the registration of validators, who will attest the blocks and integrate them on ETH 2.0.
For the beacon chain to launch its first block, aka genesis block, the following conditions must be met:
NOTE: Ethereum will not distribute the rewards until it reaches these numbers. This is why the network will depend on its early participants' charitable nature in phase 0.
Another thing to keep in mind is that the original Ethereum POW chain will continue to exist along with the beacon chain in the early phases. In fact the beacon chain is not going to be particularly useful in the early stages since it will be able to do the three most important things that an Ethereum chain should be able to do - process transactions, execute smart contracts, or host dApps.
However, Ethereum has purposefully done this. It ensures that the operations in the main chain are not disrupted during the transition. The original blockchain will continue to run during Phase 0 and Phase 1. In Phase 1.5, the two chains will eventually become one.
Phase 1 should take place in 2021 and it’s all about Sharding implementation. For ETH 2.0, the Sharding will result in the blockchain partitioning into 64 shard chains that will run parallelly and should be able to communicate with each other easily. This will enable Ethereum to theoretically process multiple transactions, in 64 blocks simultaneously. With these chains communicating with each other, the burden is spread across blocks, reducing bloat in the main chain.
Phase 1.5 is all about the merging between the original POW chains and the beacon chain to create the new POS chain. The POW chains will exist as one of the 64 shard chains along with the beacon chain.
Adopting this approach makes sure that:
Unlike Phase 0, 1, and 1.5, the details of what will happen in Phase 2 is still not very clear. Post POS and Sharding implementation, ether accounts, transactions, transfers and withdrawals, and smart contract execution will be implemented in this phase.
ETH 2.0 is going to be one of the most seismic events in cryptocurrency space. With the implementation of POS and Sharding, it will be exciting to see how Ethereum’s throughput improves. Beyond Phase 2, there should be more opportunities to increase the overall reach and functionality of the Ethereum network.
Meanwhile, why don’t you check out some of the blockchain courses already available on Ivan on Tech Academy? We have several high-value accredited classes on blockchain technology and cryptocurrency that have been created by our in-house trainers and industry experts. If you want to know more about Ethereum, why don’t you check out our course on smart contract programming? We hope to see you enrolled soon!
Get to work in a fast growing industry. Start learning blockchain together with our 20,000+ students today.
Use coupon code BLOG20 for 20% off.