Most of us heard about Ethereum was moving to Proof-of-Stake direction for quite some time already. Though it is true, Proof-of-Stake is only one part of future blockchain’s progress. Here we’ll see how the whole process should look like according to the plan.
Proof of Stake
Proof of Stake represents a class of consensus algorithms in which validators vote on the next block, and the weight of the vote depends upon the size of its stake. It is considered better than Proof of Work (PoW) because of less consumption of electricity, reduced centralization risks, security against different types of 51% attacks and more.
PoS can be classified into two major types:
- Chain-Based: Rely on the synchronicity of the network. In this case the algorithm pseudo-randomly selects a validator during each time slot, and assigns that validator the right to create a single block, and this block must point to some previous block, and so over time most blocks converge into a single constantly growing chain.
- BFT-Based: Favour consistency of nodes over availability. Here validators are randomly assigned the right to propose blocks, but agreeing on which block is canonical is done through a multi-round process where every validator sends a “vote” for some specific block during each round, and at the end of the process all validators permanently agree on whether or not any given block is part of the chain.
The benefits of Proof of Stake as opposed to Proof of Work
- No need to consume large quantities of electricity in order to secure a blockchain (e.g. it’s estimated that both Bitcoin and Ethereum burn over $1 million worth of electricity and hardware costs per day as part of their consensus mechanism).
- Because of the lack of high electricity consumption, there is not as much need to issue as many new coins in order to motivate participants to keep participating in the network. It may theoretically even be possible to have negative net issuance, where a portion of transaction fees is “burned” and so the supply goes down over time.
- Proof of stake opens the door to a wider array of techniques that use game-theoretic mechanism design in order to better discourage centralized cartels from forming and, if they do form, from acting in ways that are harmful to the network (e.g. like selfish mining in proof of work).
- Reduced centralization risks, as economies of scale are much less of an issue. $10 million of coins will get you exactly 10 times higher returns than $1 million of coins, without any additional disproportionate gains because at the higher level you can afford better mass-production equipment, which is an advantage for Proof-of-Work.
- Ability to use economic penalties to make various forms of 51% attacks vastly more expensive to carry out than proof of work – to paraphrase Vlad Zamfir, “it’s as though your ASIC farm burned down if you participated in a 51% attack”.
Ethereum Serenity Upgrade
Serenity upgrade will bring Sharding, Proof of Stake, a new virtual machine (eWASM) and more. It’s important to understand that this upgrade will not take place at a single point in time – instead, it will be rolled out in phases.
These are five design goals for Ethereum 2.0:
- Decentralization: to allow for a typical consumer laptop to process or validate shards (including any system level validation such as the beacon chain).
- Resilience: to remain live through major network partitions and when very large portions of nodes go offline.
- Security: to utilize crypto and design techniques that allow for a large participation of validators in total and per unit time.
- Simplicity: to minimize complexity, even at the cost of some losses in efficiency.
- Longevity: to select all components such that they are either quantum secure or can be easily swapped out for quantum secure counterparts when available.
Phases of Serenity upgrade include:
- Phase 0 – Beacon chain
Phase 0 is the name given to the launch of the Beacon Chain. The Beacon Chain will manage the Casper Proof of Stake protocol for itself and all of the shard chains.
The primary source of load on the Beacon CHain will be “attestations”. Attestations are availability votes for a shard block and, simultaneously, proof of stake votes for a beacon block. A sufficient number of attestations for the same shard block will create a “crosslink” which confirms the shard segment up to that shard block into the Beacon Chain.
- Phase 1 – Shard chains
Shard chains are the key to future scalability as they allow parallel transaction throughput.
Phase 1 is primarily concerned with the construction, validity, and consensus on the data of these shard chains. Phase 1 does not specify shard chain state execution or account balances. It’ll be like a trial run for the sharding structure rather than an attempt to use shards to scale. The Beacon Chain will treat shard chain blocks as simple collections of bits with no structure or meaning.
- Phase 2 – State execution
Phase 2 is where the functionality will start to come together. Shard chains transition from simple data containers to a structured chain state and Smart Contracts will be reintroduced. Each shard will manage a virtual machine. It’ll support accounts, contracts, state, and other abstractions that we’re familiar with from solidity.
State Rent is also a very likely inclusion for Phase 2 and it poses challenges to developers. Rather than being able to store code and data indefinitely, state rent would require contract developers and users to pay for storage over time. This ensures that unused information falls out of the state over time.