Ethereum Sharding: Overview and Finality

Blockchain Scalability Issues

  1. Growth of transactions. We love unicorns and kittens.
  2. Limitation of scalability with current block creation process. Block gas limit restricts the computational capacity of the block. Increasing block gas limit or decreasing block time too much would lead to high stale rate and weaken the ability of the network against attacks.
  3. Lack of parallelizability. First, current EVM operates transactions in sequence. Second, every full node executes each transaction and store the whole (or pruned) state trie for security and decentralization.

To solve scalability problems, sharding is a solution that introduces to on-chain state partition and gains higher throughput.

source: https://pixabay.com/photo-2695569/ (CC0 Creative Commons)

Terminology

Table 1. Terminology.
Figure 1. A glimpse of basic collation data structure.

Basic Quadratic Sharding

The Consensus of Shard Chain Depends on Main Chain

Validator Manager Contract (VMC)

  1. Proof-of-stake system. The validators’ stake may be slashed if they misbehaved.
  2. Pseudorandomness sampling. By applying recent block hash as the seed to sample the eligible collator. Basically, the validators deposit their stake in VMC, and then their validation code address would be recorded in a global validators pool list inside VMC. One shard chain validator would be sampled from validators pool list, and become the collator of the specific shards in specific “period” (as it will be explained below). The idea is making validators unable to forecast when they would be the collator and in which shard many days ago.
  3. Collation header validation. VMC contains an addHeader(bytes collationHeader) function to verify the collation header and writing a record of valid collation header hash. This function provides on-chain verification immediately.
  4. Cross-shard communication. By utilizing UTXO model, the user can deposit ether on a specific shard via transaction call and create a receipt (with a receipt ID) on main chain. The shard chain user can create a receipt-consuming transaction with the given receipt ID to spend this receipt.
  5. On-chain governance. With VMC as the parliament, it enables validators to vote on-chain.

How to Propose a Collation in Shard?

Figure 2 (a). Quadratic sharding. The proofs of shard states would be recorded on main chain VMC.
Figure 2 (b). For one shard, only one collation per period; one block can include multiple addHeader transactions of different shards.

Fork Choice Rule of Shard Chain

Figure 3 (a).
Figure 3(b).
Figure 3 (c).
An ingenious design for guaranteeing blocks atomicity before they are finalized.

Trade-off between Scalability and Security

  • The chance of being selected as collator should only be relevant and proportional to the validator’s deposit.
  • If the validators can predict or choose which shard they will participate in arbitrarily, the dishonest validators can collude with each other and start an adaptive attack.
Figure 4. Traditional majority attack (51 % Attack)
Figure 5. Sharding 1% attack

Blockchain Explicit Finality for Sharding

Implicit Finality v.s. Explicit Finality

Dependency on Main Chain Finality

Explicit Finality Helps for Stateless Client

Figure 6. Stateless client model. (Icons made by DinosoftLabs from www.flaticon.com is licensed by CC 3.0 BY)

Conclusion

Reference

  1. Jon Choi. Casper 101: https://medium.com/@jonchoi/ethereum-casper-101-7a851a4f1eb0
  2. Vitalik Buterin. Sharding Document: https://github.com/ethereum/sharding/blob/develop/docs/doc.md
  3. Vitalik Buterin and the contributors. Sharding FAQ: https://github.com/ethereum/wiki/wiki/Sharding-FAQ
  4. Vitalik Buterin. Sharding Mindmap: https://www.mindomo.com/mindmap/sharding-d7cf8b6dee714d01a77388cb5d9d2a01
  5. Vitalik Buterin. On Settlement Finality: https://blog.ethereum.org/2016/05/09/on-settlement-finality/
  6. Ethresear.ch thread — The Stateless Client Concept: https://ethresear.ch/t/the-stateless-client-concept/172
  7. Ethresear.ch thread — Casper contract and full POS: https://ethresear.ch/t/casper-contract-and-full-pos/136/2

--

--

--

"Ice Bear has committed no crime….today."

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

10 Reasons to Invest in Cryptocurrencies!

Earn APR up to 28% through Creator Staking

Nonagon A Crypto Noir Story

Newsflash: Monolith responds to the UK Government’s consultation on stablecoins

Kenneth Griffin admitted his skepticism around cryptocurrencies was wrong

★HUPAYX FAQ ★

Perpetual Protocol and TrueFi Launch First Lending Portfolio, Facilitating Deeper Liquidity

Master Ventures Analysis — Polkadot, Metaverse & Panther Protocol

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hsiao-Wei Wang

Hsiao-Wei Wang

"Ice Bear has committed no crime….today."

More from Medium

The Blockchain Trilemma: Layer 1 and Layer 2 Scaling Solutions

Simulating Reorgs in Ethereum

The difference between ZK-Rollups VS Optimistic Rollups

“Our end goal is becoming a global sim racing hub”