Sharding

Определение

Sharding is a horizontal scaling technique borrowed from database architecture that partitions a blockchain network into smaller, parallel processing units called “shards.” Instead of every node validating every transaction (the traditional approach that creates throughput bottlenecks), each shard processes only a subset of transactions simultaneously – with different nodes responsible for different shards. This enables throughput to scale linearly: doubling the number of shards roughly doubles the transaction capacity. Applied to blockchain, sharding addresses the “scalability trilemma” by increasing throughput without sacrificing security or decentralization. Ethereum’s long-planned sharding upgrade (now evolved into “danksharding” focusing on data availability) and NEAR Protocol’s Nightshade represent major blockchain sharding implementations.

Происхождение и история

ВремяСобытия
1990sSharding concept developed for database management systems (Oracle, MySQL)
2014Виталик Бутерин discusses blockchain sharding in early Ethereum research
2018Ethereum sharding roadmap formalized; PoS prerequisite identified
2019NEAR Protocol designs Nightshade sharding as core architecture
2020NEAR mainnet launches with sharding built-in from genesis
2020Ethereum Beacon Chain launches; Phase 0 of Ethereum 2.0 roadmap begins
2022Ethereum Merge completes; original shard chains plan (formerly Phase 1) evolves into danksharding roadmap
2024EIP-4844 (Proto-Danksharding) introduces “blobs” as step toward full danksharding
2024Near Protocol achieves 4-shard operation with Nightshade 2.0; scales dynamically
2024–?Full danksharding planned for Ethereum; provides data availability scaling
“Sharding is how blockchains go from 15 TPS to 15,000 TPS without sacrificing the decentralization that makes them valuable in the first place.”
исследователь Эфириума

Как это работает

БлокчейнSharding TypeОсколкиTPS (теоретический)
ЭфириумDanksharding (data availability)~64 data shards100,000+ (with rollups)
РЯДОМNightshade (dynamic)В настоящее время 4100,000+
Кондо ХармониEffective PoS + sharding4 осколков10,000+
МультиверсXАдаптивное состояние Sharding3 осколков15,000+

Простыми словами

  1. Split the work: Instead of every node doing all the work, sharding assigns different nodes different pieces. Like splitting a highway into multiple lanes, more total traffic flows simultaneously.
  2. Linear throughput scaling: Each additional shard adds proportional throughput. 10 shards = roughly 10x the transaction capacity of an un-sharded network.
  3. The cross-shard challenge: When a user in Shard 1 needs to send to a user in Shard 3, a coordination mechanism is required. This adds latency and complexity to cross-shard transactions.
  4. Ethereum’s evolved approach: Ethereum’s sharding roadmap evolved from “execution sharding” (processing transactions in parallel) to “data availability sharding” (storing rollup data cheaply in parallel). This complements L2 rollups rather than replacing them.
  5. Security per shard consideration: If shards have too few validators, they’re easier to attack. Solutions include random validator assignment (prevents targeting), cross-shard fraud proofs, and BFT-style intra-shard consensus.

Примеры из реального мира

СценарийРеализацияРезультат
NEAR NightshadeNEAR automatically increases shards as usage grows100,000+ TPS theoretical; cost remains ~$0.001/tx regardless of scale
Ethereum Proto-DankshardingEIP-4844 blobs reduce L2 data costs 10-100xарбитум fees drop from $0.10 to $0.01 after EIP-4844 upgrade
Harmony ONE sharding4 shards live; cross-shard transactions ~2 secondsDemonstrated production sharding; bridge later hacked for $100M
MultiversX adaptive shardingStarts with 1 shard; adds shards as validators joinDemonstrated dynamic scaling; 3 shards = 15,000 TPS at launch

Преимущества

ПреимуществаОписание
Линейная масштабируемостьAdding shards proportionally increases throughput
Maintained decentralizationEach shard can have many validators; no centralization required
Reduced node requirementsNodes only store/process their shard’s data; lower hardware requirements
Масштабируемость уровня 1Native scaling without L2 trust assumptions

Недостатки и риски

НедостатокОписание
Межсегментная сложностьCross-shard transactions add latency and programming complexity
Security per shardFewer validators per shard reduces attack cost vs. monolithic chain
Сложности реализацииSharding is among the most technically complex blockchain scaling approaches
State fragmentationData and state split across shards increases developer complexity
Накладные расходы на координациюBeacon chain/coordination layer adds infrastructure complexity

Советы по управлению рисками:

  • Understand which shard your assets are on when using sharded blockchains; some explorers are shard-specific
  • Cross-shard transactions may have higher latency; factor this into timing-sensitive DeFi operations
  • Monitor shard validator distribution; very small shard validator sets present concentrated attack risk

FAQ

Why did Ethereum change its sharding plan?

Original Ethereum sharding (execution sharding) planned to run transactions in 64 parallel shards. However, L2 rollups became the dominant scaling approach, and Ethereum shifted to “danksharding” – providing cheap data availability for rollups – rather than competing with L2s. The result is more efficient: rollups handle execution sharding, Ethereum provides data availability sharding.

Is sharding the same as Layer 2?

No. Sharding is a Layer 1 scaling solution – it splits the blockchain’s own processing into parallel shards. Layer 2 scales by processing transactions off-chain and periodically settling to L1. Ethereum’s approach combines both: L1 data sharding (danksharding) + L2 execution scaling (rollups).

Что такое Данкшардинг?

Danksharding is Ethereum’s planned sharding implementation (named after researcher Dankrad Feist) that focuses on providing 64 parallel “blob” data lanes for storing rollup data cheaply. It doesn’t shard execution (Ethereum L1 still processes all blocks); it shards data availability storage.

Что такое прото-данкшардинг (EIP-4844)?

EIP-4844 introduced “blobs” – large temporary data chunks attached to blocks – as a stepping stone to full danksharding. Blobs dramatically reduce L2 data costs without full danksharding complexity. Deployed March 2024 on Ethereum.

Does sharding compromise security?

Properly designed sharding maintains security through: random validator assignment to shards (prevents targeting), cross-shard fraud proofs or validity proofs, and ensuring each shard has sufficient validators. Poorly designed sharding (too few validators per shard) can reduce security.

Медиа