Research/Education/Near/NEAR Nightshade Sharding Explained: Chunks, Cross-Shard Routing, and Congestion

NEAR Nightshade Sharding Explained: Chunks, Cross-Shard Routing, and Congestion

BloFin Academy11/12/2026

A blockchain that processes every transaction on every node eventually hits a speed limit. Sharding splits the work into parallel pieces called shards. Some networks run each shard as its own chain, while others keep one main chain and add a slice of every shard's transactions to each block. Keeping every shard on one chain means the shards can never disagree about which blocks are real.

On NEAR Protocol, Nightshade sharding uses that single-chain design. Instead of running separate shard chains that can reorganize independently, NEAR maintains a single canonical chain of blocks in which each block collects one transaction batch, called a chunk, from every active shard (source: NEAR Docs, NEAR Data Flow).

Because the work is split, NEAR produces a block about every 600 milliseconds and makes transactions final in about 1.2 seconds (source: NEAR Docs, Blocks and Finality). Messages between shards are delivered in later blocks, and a busy shard is kept from slowing down the others.

What is Nightshade sharding on NEAR?

Nightshade sharding is NEAR Protocol's horizontal scaling architecture that splits both on-chain ledger state and transaction execution across parallel shards. Rather than maintaining separate shard chains, the protocol records all shard state updates inside a single unified blockchain of main blocks (source: NEAR Docs, NEAR Data Flow).

NEAR separates the layer that agrees on blocks (the blockchain layer) from the layer that runs accounts and smart contracts (the runtime layer), as covered in how NEAR works. Within that architecture, every NEAR account belongs to one specific shard. All five components of that account's state (its liquid balance, locked staking balance, deployed WebAssembly contract code, contract key-value storage, and access keys) reside on that same shard (source: NEAR Docs, Architecture).

When a contract runs, it only touches data on its own shard, so validators never have to freeze the whole network to process a contract call. Instead, the blockchain layer splits the cryptographic storage lookup tree (trie) across shards. It syncs each partition across nodes and routes cross-shard messages between chunks (source: NEAR Docs, Architecture).

For anyone holding or trading NEAR, sharding is why transfers on the network settle in about a second at a predictable fee. On BloFin, you can buy NEAR on NEAR/USDT Spot (minimum order 0.1 NEAR) and withdraw it to use on the network. To trade the price with leverage, use the NEARUSDT Perpetual (10 NEAR per contract, up to 75x leverage). If you need tokens for self-custody or validator delegation, see how to buy NEAR.

Before executing a spot or perpetual order, you can review the maker and taker fee schedule across volume tiers on the BloFin fee schedule.

How a shard's chunk gets into a main block

In Nightshade, parallel shards do not broadcast independent blocks to the network. Every shard produces a chunk for every block, roughly every 600 milliseconds, even when nothing is happening on that shard (source: NEAR Docs, Blocks and Finality).

Each main block includes the latest chunk from every shard and points back to the block before it, as covered in how NEAR works. Under NEAR thresholded proof-of-stake and Doomslug consensus, main blocks arrive about every 600 milliseconds. Transactions become final, meaning they cannot be reversed, in about 1.2 seconds (source: NEAR Docs, Blocks and Finality).

If a validator misses its turn, that block number is simply skipped. For example, if block 101 is skipped, block 102 points straight back to block 100. And if a shard has nothing new, the block repeats that shard's last chunk, so a chunk counts as new only if it was added in that same block (source: NEAR Docs, Blocks and Finality).

Structural elementProduction scopeHow often it is produced
Shard chunkProduced per individual shard by assigned chunk producersOne chunk per shard per block, about every 600 milliseconds
Main blockCollects chunk headers from all active shardsProduced about every 600 milliseconds; each one points to the block before it
Doomslug finalityFinalizes main block and included chunk headersReached in about 1.2 seconds
Network epochFixed validator and shard assignment windowLasts 43,200 blocks (about 7.2 hours at 0.6 seconds per block) (source: NEAR Docs, Epoch)

How Nightshade routes cross-shard messages

Because accounts and smart contracts sit across multiple shards, a transaction signed on Shard A that targets an account on Shard B cannot run inside one chunk. Your wallet builds the transaction (who sends it, who receives it, what it does) and signs it with your private key, then sends it to a NEAR server, which passes it to the shard that holds your account. The validator takes waiting transactions in order until the chunk is full and deducts the prepaid gas fee and the NEAR you send from your balance. Nightshade then turns the transaction into an internal message, called an action receipt, that reaches the other shard in a later block, while data receipts come later to return results to callbacks (source: NEAR Docs, Transaction Lifecycle).

Because an internal message must run on the recipient's shard no earlier than the next block, the network routes that receipt to the target contract's shard for the next chunk, and any unused prepaid gas returns in a final refund message (source: NEAR Docs, Token Transfer Flow). For the full transaction lifecycle, see how NEAR works, and to follow each cross-shard hop in a block explorer, see how to track NEAR transactions. Gas keys (NEP-611) let one account sign up to 1,024 transactions in parallel, as explained in NEAR named accounts and access keys (source: GitHub, nearcore 2.13.0).

Shard congestion control and execution queues

Asynchronous cross-shard execution introduces a core challenge. Once a shard accepts a new transaction, the protocol is committed to running all downstream cross-shard messages it creates, even though the accepting shard cannot know in advance how many multi-hop calls will be generated or which shards they will target (source: Nearcore Docs, Congestion Control).

Think of each shard as a checkout lane: new transactions join the line, and the shard can process a fixed amount of work per chunk. Each shard can process up to 1,000 Tgas per chunk, so total capacity grows with every shard added. Gas is explained in NEAR gas and storage staking. Suppose a transaction starts on Shard 1 with 300 Tgas attached: it burns 100 Tgas locally on Shard 1 and sends a cross-shard call carrying 200 Tgas to Shard 2. Shard 2 then burns that 200 Tgas in the next block, with fees split as covered in NEAR fee burn and contract rebate (source: Nearcore Docs, Congestion Control).

Now consider a single-shard hotspot where users on all shards simultaneously call a popular smart contract living on Shard 3. Even with 10 shards, Shard 3 can only execute 1,000 Tgas per chunk. A fixed global limit would have to be split across all shards, so each shard could only accept a small share. That fixed cap would reduce the entire sharded blockchain's throughput to that of a single shard (source: Nearcore Docs, Congestion Control).

NEAR's congestion control (NEP-539) keeps quiet shards running at full speed while stopping a busy one from running out of memory. It works in four ways (source: GitHub, NEP-539).

  1. Per-shard memory limits (1,000 MB): Each shard tracks the memory used by its queued incoming and delayed messages against a limit of 1,000 MB in NEP-539 and on mainnet (while the nearcore guide uses 500 MB as a teaching number).
  2. Receiver-filtered transaction rejection: When a destination shard (such as Shard 3) becomes congested, all shards stop accepting new single-hop transactions whose recipient is on Shard 3. At the same time, they continue accepting transactions targeting uncongested shards at full speed.
  3. Reduced new-transaction gas allocation on the congested shard: On the congested shard itself, the chunk producer sharply reduces the gas budget set aside for new incoming transactions, which starts at 500 Tgas and slides down to 20 Tgas under congestion. That reduction lets the shard dedicate almost all of its 1,000 Tgas chunk capacity to draining its backlog of waiting messages (source: GitHub, NEP-539).
  4. Deadlock-free backpressure: When multi-hop calls still route traffic toward a full shard, sending shards hold outgoing messages in a forwarding buffer. Sending shards only hold messages back once the busy shard already has a long enough queue of work (the nearcore guide uses 10,000 Tgas waiting as an illustration), so no shard ends up waiting on another forever. That keeps the busy shard fully occupied (source: Nearcore Docs, Congestion Control).

Shard count, Nightshade 2.0, and dynamic resharding

Adding shards adds capacity, but early designs made validators' hardware more expensive. If every validator had to store the data of every shard, each new shard would make running a validator more expensive (source: NEAR Blog, Nightshade 2.0 Mainnet).

NEAR switched stateless validation on at protocol version 69 on August 15, 2024 (source: GitHub, nearcore 2.0.0) and announced it as Nightshade 2.0 on August 22, 2024, introducing an idea Vitalik Buterin first proposed in 2017. It is explained in NEAR stateless validation. Under Nightshade 2.0, chunk validators no longer store shard state locally on disk. Instead, when a chunk producer builds a chunk, it compiles a compact proof called a state witness containing only the exact trie nodes read or modified by that chunk's transactions. Chunk validators download the state witness, check the result in memory, and then sign their approval (source: NEAR Blog, Nightshade 2.0 Mainnet).

Separating validation from local disk storage changed how NEAR scales its shard count, as described in NEAR history and upgrades.

  • Expansion from 6 shards to 10 shards: Nightshade 2.0 launched with 6 shards in August 2024. At the time, NEAR had more than 20 million monthly active users and over 110 million accounts (source: NEAR Blog, Nightshade 2.0 Mainnet). The network ran 9 shards during 2025, turned on dynamic resharding in June 2026 (source: Nansen, NEAR Q2 2026 Report), and runs 10 shards on mainnet today (source: GitHub, nearcore 2.13.0).
  • Stateless validator participation: Because stateless chunk validators need no shard state on disk, smaller operators can join with lower hardware costs (source: NEAR Docs, Validators). Validator tiers and concentration are covered in NEAR thresholded proof-of-stake and how decentralized is NEAR.
  • Dynamic state-based resharding: Since nearcore 2.13.0, dynamic resharding splits a shard based on the size of its state, checked at epoch boundaries (source: GitHub, nearcore 2.13.0).

Data availability and finality across shards

In a sharded network where one transaction can trigger cross-shard calls across three or four consecutive blocks, block finality and transaction execution finality are two distinct milestones. Knowing how they differ matters when evaluating is NEAR safe and confirming large transfers.

When you send a transfer, as described in how to send and receive NEAR, the block containing your initial transaction reaches Doomslug finality in about 1.2 seconds. However, that first block can become final before its cross-shard messages finish running on the recipient's shard (source: NEAR Docs, Blocks and Finality).

Apps and exchanges can choose how long to wait before treating a transaction as done. NEAR offers six confirmation levels, from 'Sent' to 'Fully final' (source: NEAR Docs, Blocks and Finality).

Confirmation levelWhat has happened at this pointSettlement use case
SentReturns immediately upon submission before chunk inclusionHigh-frequency broadcasts
IncludedTransaction is included in a shard chunk inside a main block (not yet final)Fast wallet pending display
Executed (not yet final)Default mode: all non-refund execution steps have run, though blocks may not be final yetInteractive app frontends and wallet swaps
Included and finalThe block containing the initial transaction is finalized by Doomslug (~1.2 seconds)Confirming sender fee deduction
Executed and finalInitial block is finalized and all non-refund downstream calls have executedMulti-contract app workflows
Fully finalTransaction and all downstream outcomes, including system gas refunds, are finalizedExchange deposits, withdrawals, and bridge settlement

A transaction marked final can still contain a failed cross-contract call. If a later call fails, only that call is undone while the earlier calls remain committed (source: NEAR Docs, Transaction Lifecycle).

Nightshade sharding vs Ethereum proto-danksharding

NEAR and Ethereum scale in different ways. While Ethereum keeps layer-1 execution on a single shared state with 12 seconds per slot (source: Ethereum.org, Proof-of-Stake), EIP-4844 proto-danksharding attaches temporary data blobs to layer-1 blocks so external layer-2 rollups can post transaction batches cheaply.

NEAR instead splits accounts and transactions across 10 shards on its main layer-1 chain (source: GitHub, nearcore 2.13.0). At the same time, it keeps all accounts inside one readable .near address space (source: NEAR Docs, Account Model), while each 600-millisecond block carries a new chunk from every shard (source: NEAR Docs, Blocks and Finality). You can explore how these trade-offs affect fees and liquidity in NEAR versus Ethereum and compare broader patterns in sharded versus monolithic blockchains.

Looking to trade NEAR tokens on BloFin? To get started, you'll need to first create a BloFin account, fund your account with cryptocurrency, and navigate to the NEAR/USDT Spot trading page or the NEARUSDT Perpetual page.

Frequently asked questions

How do indexers detect skipped block heights or repeated chunks in a NEAR block?

If a validator misses its turn on NEAR, that block number is skipped and the next block points back to the last real block. When a shard has nothing new, the block repeats that shard's last chunk, so a chunk only counts as new if it was added in that block (source: NEAR Docs, Blocks and Finality).

How does a shard chunk producer order transactions from its local transaction pool?

Every validating node on NEAR keeps an independent transaction pool for the shards it tracks. When building a new chunk, the validator pulls waiting transactions one by one in increasing nonce order per signing key. Rather than enforcing a single chain-wide queue across separate user accounts, the validator continues pulling until the pool empties or the chunk reaches its new-transaction gas allowance. That allowance starts at 500 Tgas and slides down to 20 Tgas under congestion, out of the 1,000 Tgas execution limit (source: GitHub, NEP-539).

How can I tell if a NEAR shard is congested?

Block explorers show when transactions on a shard are delayed. On the server side, NEAR nodes also report a number that shows how much work is waiting on that shard under NEP-539, allowing wallets and exchanges to check shard pressure in real time (source: NEAR Docs, Congestion Level RPC).

How long does a signed NEAR transaction remain valid before its block hash expires?

Every signed NEAR transaction must reference a recent block hash so old transactions cannot be broadcast weeks later. NEAR sets that limit as a number of blocks rather than a number of seconds. At 86,400 blocks on a 600-millisecond block cadence, a signed transaction remains valid for roughly 14.4 hours before expiring on-chain (source: NEAR Docs, Transaction Lifecycle).

Why does NEP-539 measure incoming shard queue backpressure in gas rather than bytes?

NEP-539 sets a 1,000 MB memory limit to cap total queued message memory on a shard (source: GitHub, NEP-539), while sizing its incoming work queue in gas, as illustrated by the 10,000 Tgas queue in the nearcore guide. Because each chunk can burn up to 1,000 Tgas, keeping a 10,000 Tgas incoming queue ensures a full 1,000 Tgas of useful work per chunk even when multi-hop calls burn only 10% of their attached gas on that shard (source: Nearcore Docs, Congestion Control).


Researched and written by the BloFin Academy editorial team with AI-assisted drafting. Primary sources include the NEAR Protocol documentation on data flow, architecture, token transfer flow, blocks and finality, transaction lifecycle, validators, epochs, account model, and the congestion-level RPC endpoint, the Nearcore architecture specification on cross-shard congestion control and NEP-539 on GitHub, the nearcore 2.0.0 and 2.13.0 release notes, the Nansen NEAR Q2 2026 report, the NEAR blog post on Nightshade 2.0 stateless validation, and the ethereum.org proof-of-stake documentation. All facts independently verified against cited documentation current as of October 2026.

This article is for informational and educational purposes only. It is not financial, investment, trading, or legal advice. Cryptocurrency can lose value. Interacting with sharded smart contracts, cross-shard calls, and digital assets on NEAR Protocol carries technical, key-management, and market risks. Spot NEAR/USDT buys the token. A NEARUSDT Perpetual is a contract on the price. Do your own research. Consider your circumstances before using any protocol or trading any asset.