Scalability is the primary bottleneck for legacy blockchains. If every node must process every transaction, the network can only move as fast as its slowest computer. Near Protocol addresses this with a proprietary sharding design called Nightshade.
Unlike traditional sharding (which splits the network into completely separate chains), Nightshade models the system as a single blockchain where each block allows for parallel "Chunks."
The Concept of "Chunks"
In Nightshade, a block is not a single list of transactions. Instead, imagine a block as a container that holds multiple "Chunks."
- Shards: The network is divided into partitions called shards.
- Chunks: Each shard produces a "Chunk" of data.
- Aggregation: All Chunks are stitched together to form the main block.
This means that Shard #1 does not need to know what is happening on Shard #2 to process its own transactions. They run in parallel.
Why This Improves Latency
Because the workload is split, the network can theoretically scale infinitely.
- Dynamic Resharding: If network usage spikes, the protocol can dynamically split one busy shard into two smaller shards.
- Lower Hardware Load: As discussed in our Node documentation, validators only need to download the state for the shard they are assigned to, not the entire petabyte-scale history of the chain.
The Security Model
Critics of sharding often point to security risks (if one shard is small, it is easier to attack). Near solves this by randomly assigning validators to different shards every "Epoch" (approx. 12 hours). A malicious actor cannot predict which shard they will control, making coordinated attacks statistically impossible.