Scaleum: The Blockchain Scalability Saga <Part - 1>
Introduction
Gm Gm frens !👋🏻
Since the inception of Bitcoin, blockchain scalability has remained a persistent challenge within the realm of decentralized systems. Compounded by the blockchain trilemma—a conundrum that balances decentralization, security, and scalability—addressing scalability issues has become paramount for the evolution of blockchain technology. Ethereum, a frontrunner in the blockchain space renowned for its smart contract capabilities, faces its own set of scalability challenges, including network congestion and exorbitant transaction fees.
In this blog series, we embark on a journey through the intricacies of blockchain scalability, focusing on Ethereum's pivotal role and the innovative solutions emerging to tackle this pressing issue. From Ethereum's transition from Proof of Work (PoW) to Proof of Stake (PoS) to an exploration of scalability solutions such as sharding, Layer 2 protocols, zk rollups, and validiums, we delve deep into the mechanisms reshaping the blockchain landscape.
Understanding Ethereum and its scalability challenges
Ethereum is a pioneering blockchain network that revolutionized the landscape by introducing smart contracts, enabling the execution of programmable business logic directly on the blockchain. Smart contracts are the backbone of decentralized applications (DApps), akin to the backend code in traditional web development. At the same time, the Ethereum blockchain acts as an immutable ledger, ensuring transparency and security.
Ethereum's Core Functionality:
Ethereum Virtual Machine (EVM): Executes smart contracts.
Smart Contracts: Written in high-level languages like Solidity or Vyper, compiled into ABI, and bytecode understood by the EVM.
Application Binary Interface (ABI): Specifies how to interact with the contract ( analogous to APIs in Web 2.0 backend )
Participants interact with the blockchain through various roles:
Network Nodes: Validate transactions and maintain network integrity.
Miners ( Now Validators ): Perform Proof-of-Work (PoW) consensus ( now Proof-of-Stake i.e. PoS consensus ) to add new blocks to the blockchain and receive rewards.
Developers: Deploy smart contracts onto the blockchain, and interact with them using RPC calls.
Users: Interact with decentralized applications (DApps) deployed on the Ethereum network.
However, Ethereum faces significant scalability challenges, hindering its potential for mainstream adoption.
Scalability Challenges:
Proof of Work (PoW): Inefficient in handling growing transaction volume, leading to high energy consumption and slower transaction processing times.
Network Congestion: Surge in transaction volume and limited throughput capacity, leading to high gas fees and slower transaction processing.
Impractical for Everyday Transactions: High gas fees during periods of high demand, making Ethereum less suitable for everyday transactions and high-frequency dApps.
Transition from PoW to PoS:
What is Proof-of-Stake?
Proof-of-Stake (PoS) is a consensus mechanism where validators are chosen to create new blocks based on the amount of cryptocurrency they have staked as collateral. This mechanism is seen as more energy-efficient and secure compared to Proof of Work (PoW), which requires solving complex mathematical problems to validate transactions.
How is Proof-of-Stake ( PoS ) different from Proof-of-Work ( PoW )?
Proof of Stake (PoS) and Proof of Work (PoW) are two different consensus mechanisms used by blockchain networks to secure transactions and create new blocks. Here's a brief comparison:
Participation:
PoS: Anyone with a small amount of cryptocurrency can participate by staking their tokens. This makes it more accessible and reduces barriers to entry.
PoW: Requires significant computational power and energy, making it less accessible to the average user.
Security and Validation:
PoS: Validators are chosen based on the amount of cryptocurrency they have staked, and they validate transactions and create new blocks. This mechanism incentivizes honesty and reduces the risk of fraud.
PoW: Miners compete to solve complex mathematical puzzles to validate transactions and create new blocks. This process is energy-intensive and does not inherently incentivize honesty.
Rewards and Fees:
PoS: Validators earn rewards for validating transactions and creating new blocks. There is also the option to delegate staking to others and share in their rewards.
PoW: Miners are rewarded with newly minted coins for validating transactions and creating new blocks. This system can lead to high transaction fees and centralization.
Environmental Impact:
PoS: More energy-efficient due to lower computational requirements compared to PoW, making it a more sustainable option.
PoW: Highly energy-intensive, contributing to environmental concerns.
Deep-dive into PoS
There are 4 key elements of proof of stake:
Validators: These are crypto enthusiasts who stake capital in the form of $ETH on the Ethereum main chain, and approve for authentic transactions. They would lose all the staked ETH if they behaved maliciously.
A network of nodes that automatically update newly verified transactions.
Validating/Creating new blocks ( done by the Validators )
An automatic system that selects validators to find new blocks in proportion to their stake.
Block Production
Under proof of stake, the validators are responsible for the block production. There is no such thing as mining in the case of PoS, no computational problem is required to be solved, rather, the transactions need to be validated.
To become a validator, a user must simply deposit 32 ETH into the deposit contract on the Ethereum mainnet, and run the required node software - an execution client, a consensus client, and a validator client. A validator also has to make sure their node is always online and they only vouch for authentic transactions, or they could lose some of their stakes. This is referred to as "slashing."
The Execution Client listens and executes transactions and maintains the latest state and database of all Ethereum data, while the Consensus Client provides consensus ( using the PoS algorithm ) from validated data from the Execution Client. These two clients work together to sync the Ethereum state. The validator client is responsible for voting on blocks and producing new blocks when necessary.
The validators receive new blocks from their peers and re-execute the transactions to confirm validity. They then send a positive attestation to the network. If enough attestations are received, the block is added to the chain. The validators are incentivized to validate the transactions.
Every 12 seconds, a validator is randomly selected as a block proposer, responsible for creating and distributing a new block for network voting.
I think we should take a pause here, and continue in the next blog, where we discuss the various scalability solutions proposed to solve Ethereum's scalability issues. Till then, WAGMI 🚀!
...next blog coming soon