In Ethereum Casper 101, Jon Choi provides a clear overview of Casper and explains why explicit finality enhances scalability. This article explores Ethereum sharding designs and how explicit finality supports blockchain sharding.
For a technical deep dive, refer to Vitalik Buterin’s sharding documentation.
The Blockchain Scalability Challenge
- Rising transaction volumes.
- Block generation limits scalability. Gas limits constrain computational capacity. Increasing gas limits or reducing block times raises stale rates and weakens attack resistance.
- Insufficient parallelism. The EVM processes transactions sequentially, and full nodes execute every transaction, storing the entire state tree.
👉 Explore parallel transaction execution with EIP 648
Key Terminology
- Mainchain: The primary Ethereum chain (e.g., Mainnet).
- Shard chains: Parallel chains partitioning state and workload.
- Collations: Shard-chain equivalents of blocks, grouped into "collations" proposed by collators (validators).
Basic Quadratic Sharding
Shard Consensus Anchored to Mainchain
- Independent validation: Validators monitor assigned shards.
- PoS dependency: Shards rely on the mainchain for higher-level consensus via the Validator Manager Contract (VMC).
Validator Manager Contract (VMC)
Core functions:
- PoS enforcement: Slashes misbehaving validators.
- Pseudorandom sampling: Selects collators unpredictably.
- Collation header validation: On-chain verification via
addHeader(bytes collationHeader). - Cross-shard communication: Uses UTXO-like receipts for inter-shard transfers.
Collation Nomination in Shards
- Phase 1: VMC manages 100 shards (
SHARD_COUNT = 100). - Periods: Defined as
PERIOD_LENGTH = 5blocks; one valid collation per shard per period. - Collators must submit headers within their assigned period via
addHeader.
Fork Choice Rule
The head collation is the longest valid shard chain within the longest valid mainchain. Example:
- If
block B3is the mainchain head,collation C3is the shard head. - If a longer mainchain fork emerges, the shard head updates accordingly.
Scalability vs. Security Tradeoffs
Blockchain Trilemma: Decentralization, scalability, and security—pick two.
- 1% attacks: Attackers targeting one shard need only 1% of total hash power/stake.
- Random sampling: Critical to prevent collusion.
👉 Learn about sharding’s security tradeoffs
Explicit Finality in Sharded Blockchains
Implicit vs. Explicit Finality
- POW chains: Probabilistic finality (implicit).
- POS + Casper FFG: Protocol-enforced finality (explicit) after ~125 blocks (~2.5 epochs).
Benefits for Sharding
- Mainchain dependency: Validators sync faster with explicit finality thresholds.
- Stateless clients: Sync to the latest collation with Merkle proofs, reducing storage overhead.
FAQs
Q: How does sharding improve Ethereum’s TPS?
A: By parallelizing transaction processing across 100 shards, reducing mainchain congestion.
Q: What prevents validators from manipulating shard assignments?
A: Pseudorandom sampling ensures unpredictability.
Q: How does explicit finality enhance security?
A: It provides unambiguous checkpoints, reducing sync uncertainty.
Conclusion
Ethereum sharding leverages explicit finality (via Casper FFG) to balance scalability and security. For further research, visit ETHResear.ch.
Special thanks to Vitalik Buterin, Jon Choi, and contributors for their foundational work.
References: