On a sharded blockchain, the network is split into parallel pieces called shards. If every validator had to store the data of every shard, each new shard would make running a validator more expensive. Stateless validation fixes this. Validators receive a small package with just the data they need, check the transactions in memory, and store nothing on disk.
On NEAR Protocol, 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, as specified in NEP-509 (source: NEAR Blog, Nightshade 2.0). Under this design, chunk producers assemble a self-contained proof called a state witness that bundles the storage data and incoming messages needed to run a shard chunk. Randomly sampled chunk validators then check that update without storing the shard's database locally on disk.
A chunk is only added to a block after validators holding more than two-thirds of that shard's stake approve it. Errors are caught before they reach the chain, so Nightshade 2.0 replaced the fraud-proof plan, which was never built on mainnet (source: GitHub, NEP-509). That shift lowered the hardware barrier for validator participation while letting the network scale its shard count, as covered in NEAR Nightshade sharding.
What is stateless validation on NEAR Protocol?
Stateless validation is a way for validators to check a shard's transactions using a small proof sent over the network, instead of a full copy of the shard's data. That approach removes the need to store the shard's full account and smart-contract database on local storage drives (source: NEAR Blog, Nightshade 2.0).
The theoretical foundation of stateless validation was first proposed by Ethereum co-founder Vitalik Buterin in 2017. NEAR Protocol became one of the only networks to deploy the design across a live sharded network when it activated the upgrade on August 15, 2024 and announced Nightshade 2.0 on August 22, 2024 (source: NEAR Blog, Nightshade 2.0). NEAR splits accounts and smart contracts across parallel shards, as explained in how NEAR works and NEAR Nightshade sharding. Every account resides on one specific shard with its balance, access keys, deployed WebAssembly (Wasm) bytecode, and contract storage (source: NEAR Docs, Architecture).
Before Nightshade 2.0, Phase 1 of Nightshade sharding had no separate step to check each chunk before it was added. Instead, the top validators had to store the full data of every shard on fast local drives (source: GitHub, NEP-509). By July 2024, the network had grown past 20 million monthly active users and 110 million total accounts across 6 shards. Forcing block producers to store and update every shard's database created a direct ceiling on how many shards the protocol could add (source: NEAR Blog, Nightshade 2.0).
NEP-509, written by Robin Cheng, Anton Puhach, Alex Logunov and Yoon Hong, fixed this by separating the task of building chunks from the task of checking them (source: GitHub, NEP-509). Several chunk producers are assigned to each shard (about 10 per shard today), and only a shard's assigned chunk producers keep that shard's data in memory to build a batch of transactions, called a chunk, for every block. A main block collects those chunks about every 600 milliseconds, and transactions become final in about 1.2 seconds (source: NEAR Docs, Blocks).
As it builds the chunk, the chunk producer saves every piece of data the transactions read or changed. That package is the state witness, and it goes to a random group of chunk validators. Each validator re-runs the chunk using the witness, checks it gets the same result, and sends a signed approval to the block producer (source: GitHub, NEP-509).
On BloFin, you can trade NEAR on both the spot market and the perpetual futures market. You can buy NEAR on NEAR/USDT Spot (minimum order 0.1 NEAR) or trade its price with leverage on the NEARUSDT Perpetual (10 NEAR per contract, up to 75x). Before placing an order, you can compare maker and taker rates on the BloFin fee schedule.
Why Nightshade 2.0 replaced fraud proofs with state witnesses
NEAR's original plan added chunks first and checked them later. Watchers called fishermen would look for bad chunks and raise a challenge, and the network would then undo the affected changes (source: GitHub, NEP-509).
That plan only worked if at least one honest watcher was following each shard and raised a challenge in time. Building a live sharded protocol around post-inclusion challenges ran into two major obstacles (source: GitHub, NEP-509).
First, undoing an invalid chunk on one shard would force coordinated rollbacks across other shards. NEAR turns contract calls and transfers between shards into internal messages, called receipts, that run on the other shard in a later block (source: NEAR Docs, Data Flow). Second, designing challenges, multi-shard rollbacks, and slashing rules made the fraud-proof designs extremely complicated, with problems the team did not know how to solve (source: GitHub, NEP-509).
NEP-509 replaced the optimistic challenge model with pre-inclusion stateless validation. Block producers no longer allow an unverified chunk into a main block while waiting for a fisherman to challenge it later. Under Nightshade 2.0, a block producer only adds a chunk once validators holding more than two-thirds of that shard's stake have signed off on it, and those endorsements are carried in the block's body (source: GitHub, NEP-509).
If a chunk fails to gather approvals from more than two-thirds of the shard's assigned stake before the block producer's timeout expires, the block producer leaves that new chunk out of the main block and repeats the shard's previous chunk header. If a block producer broadcasts a block containing a new chunk without valid approvals from at least two-thirds of that shard's stake, validators reject the entire block as invalid (source: GitHub, NEP-509).
Because every chunk included in a valid main block is re-executed and approved by a supermajority of randomly sampled shard validators before block inclusion, the protocol never needs fishermen or fraud-proof challenges. As a result, NEAR never has to undo changes that are already on the chain. Earlier upgrades are covered in NEAR history and upgrades.
What a state witness contains
To check a new chunk without storing the shard's data, a validator re-runs the previous chunk's transactions. That confirms the starting point of the new chunk and checks the balances and keys of the new transactions, including permissions covered in NEAR named accounts and access keys (source: GitHub, NEP-509).
As the chunk producer runs the chunk, NEAR records every piece of stored data the transactions read and packs that data into the state witness, which has nine fields in the NEP-509 specification. The witness holds the chunk's transactions, the data they read before running, the expected result, and proof of any messages arriving from other shards, along with any skipped chunks and the balances and access keys needed to check new transactions (source: GitHub, NEP-509). Those internal messages follow the execution pipeline detailed in the official transaction lifecycle documentation (source: NEAR Docs, Lifecycle).
When a validator receives the witness, it first runs some quick checks. It then re-runs the chunk in memory, which is the heavy part of the work (source: GitHub, NEP-509).
How state witnesses reach validators
The witness has to reach validators within each 600-millisecond block. To keep shards moving smoothly, NEP-509 pairs Reed-Solomon erasure coding with soft and hard size limits that kept the launch worst-case witness within about 16 MiB (source: GitHub, NEP-509). Later nearcore updates raised that overall witness budget to about 21 MiB (source: GitHub, nearcore Size Limits).
Suppose a shard has 16 validators and the witness is at its launch maximum size of 16 MiB. Sending a full 16 MiB witness to 16 validators at once would need about 2 Gbps of bandwidth. Instead, the producer splits the witness into one piece per validator at a 0.6 erasure-coding ratio, and each validator passes its piece on to the others. Any 60% of the pieces rebuild the witness even if 40% of the validators are offline, cutting bandwidth to about 214 Mbps before the validator checks the witness and sends its approval to the next five block producers (source: GitHub, NEP-509).
NEP-509 keeps each witness under about 16 MiB at launch through per-part size limits. Gas limits (1,000 Tgas per chunk, 0.0001 NEAR per Tgas floor) (source: NEAR Docs, Gas) are covered in NEAR gas and storage staking. The table below shows how that limit is divided.
| Limit | Type of limit and rule | Ceiling |
|---|---|---|
| Largest transaction | Hard limit: lowered from 4 MiB, a size only 0.002% of past blocks needed; larger transactions are rejected (source: GitHub, NEP-509). | 1.5 MiB |
| Largest message between shards | Hard limit: caps any single cross-shard execution message at 4 MiB (previously uncapped). | 4 MiB |
| All transactions in one witness | Hard limit: the total size of old and new transactions in one witness. | 4 MiB |
| Data needed to check new transactions | Soft limit: caps recorded Merkle proof for new transactions; stops adding new transactions once reached. | 500 KiB |
| Data one incoming message may read | Hard limit: the most stored data one incoming message can read before it fails. | 4 MB |
| Data read by the whole chunk | Soft limit: after the soft limit, remaining messages wait for a later chunk. | 3 MB at launch; 4 MB now (up to 7 MB hard cap) (source: GitHub, nearcore Size Limits) |
| Messages sent to other shards | Cross-shard cap: 100 KiB per shard per block at launch with 4.5 MiB for one shard at a time, now managed by nearcore's bandwidth scheduler at 4.5 MB per shard. | 100 KiB normally, 4.5 MiB for one shard at a time at launch; 4.5 MB per shard now |
Validator roles, mandates, and hardware requirements after NEP-509
Stateless validation changed which validators do which work. NEAR's staking system is explained in NEAR thresholded proof-of-stake. High-stake chunk producers maintain in-memory shard databases to build chunks. Meanwhile, the broader validator set verifies state witnesses statelessly without holding shard state on disk (source: GitHub, NEP-509).
Before NEP-509, producing blocks was the heaviest role. Now producing chunks takes the most resources, then producing blocks, then checking chunks across each 43,200-block (~7.2-hour) epoch (source: NEAR Docs, Epoch). Active validators are divided into two operational tiers (source: GitHub, NEP-509).
- Top 100 validators: These produce blocks, produce chunks (with 10 shards on mainnet today and about 10 chunk producers per shard), and also check chunks. Because syncing a shard's database across epochs takes heavy bandwidth, NEP-509 keeps a chunk producer assigned to the same shard across consecutive epochs whenever possible, so top-100 nodes hold a maximum of 2 shards concurrently in memory and on disk (source: GitHub, NEP-509).
- Non-top-100 validators (stateless chunk validators): Validators ranked below the top 100 only check chunks. Mainnet offers up to 500 validator seats, raised from 300 in nearcore 2.8.0 (source: GitHub, nearcore 2.8.0), with a seat price of 1/62,500 of all staked NEAR, about 9,600 NEAR today (source: NearBlocks, Validators). They store 0 shards on disk, checking and approving chunks via state witnesses (source: NEAR Docs, Validators).
To assign chunk validators across shards securely, NEP-509 divides each validator's stake into fixed-size slices of a validator's stake called mandates. Each epoch, NEAR sets the size of a mandate, and any stake left over forms one smaller mandate. Every block, NEAR randomly reassigns mandates to shards (source: GitHub, NEP-509).
At launch in NEP-509 Stage 0, the protocol set a target of 68 mandates per shard (408 total mandates across 6 shards), and nearcore 2.8.0 later raised that target to 105 mandates per shard (source: GitHub, nearcore 2.8.0). For that launch setup, NEP-509 calculated that if no more than one-third of all stake is dishonest, the math shows that 68 random mandates per shard keep each shard safe for about 40 years, with 90% confidence (source: GitHub, NEP-509).
Validator rewards and the live kickout rules (80% for blocks and chunks, and 70% for chunk endorsements) are covered in NEAR staking explained and how to choose a NEAR validator.
To see how concentrated NEAR's validator set is, read how decentralized is NEAR and is NEAR safe.
To compare with Ethereum, which does not use shards, see Ethereum validators.
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
Why does a chunk validator send its chunk endorsement to five block producers at once?
When a validator approves a chunk, the next block producer should include that approval. However, if that block producer is offline or misses its slot, that block number is skipped and a later producer must pick up the chunk. To avoid delays, each validator sends its approval to the next five block producers, because more than five missed blocks in a row almost never happens (source: GitHub, NEP-509).
What happens if a block producer receives a chunk endorsement before the chunk header arrives?
Witness pieces and chunk headers travel separately across the peer-to-peer network, so a fast validator can rebuild the state witness and send its approval before the block producer even receives the chunk itself. Rather than dropping those early signatures, the block producer holds early approvals in memory and checks them against the shard's assigned validators as soon as the chunk arrives (source: GitHub, NEP-509).
Why does Reed-Solomon witness reconstruction depend on validator count rather than stake weight?
A chunk needs approval from validators holding more than two-thirds of the shard's stake, but the witness is split into one equal piece per validator at a Reed-Solomon ratio of 0.6. Every validator owns one equal data part regardless of its stake weight, so decoding the witness requires 60% of the assigned chunk validators by count to be online. NEP-509 notes this count-based dependency for future stake-weighted refinement (source: GitHub, NEP-509).
Why did NEP-509 lower the maximum NEAR transaction size from 4 MiB to 1.5 MiB?
Large state witnesses slow down witness distribution across the network, which can cause a missing chunk if the block producer does not receive chunk approvals in time. NEP-509 lowered the largest allowed transaction from 4 MiB to 1.5 MiB after finding that only 679 transactions out of 31,536,000 blocks (0.002% of blocks) in the past year had been bigger (source: GitHub, NEP-509).
How could zero-knowledge proofs change NEAR stateless validation in future upgrades?
Under NEP-509 Stage 0, chunk producers distribute a raw chunk state witness containing Merkle trie nodes and transactions so chunk validators can re-execute the chunk in memory. NEP-509's future roadmap outlines compressing the raw chunk state witness into a succinct zero-knowledge (ZK) validity proof so any validator can verify that a new shard chunk header is valid without downloading partial trie state or re-running WebAssembly contracts (source: GitHub, NEP-509).
Researched and written by the BloFin Academy editorial team with AI-assisted drafting. Primary sources include the official NEAR Protocol blog announcement on Nightshade 2.0 stateless validation (August 22, 2024), the nearcore 2.0.0 and 2.8.0 release notes on GitHub, the NEP-509 Stateless Validation Stage 0 specification on GitHub, nearcore documentation on state witness size limits, NearBlocks validator statistics, the official NEAR documentation on Architecture, Blocks and Finality, Data Flow, Transaction Lifecycle, Gas, Epoch, and Validators, and BloFin spot and perpetual contract specifications. 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. Staking, running validator nodes, interacting with smart contracts, and trading on NEAR Protocol carries technical, smart-contract, 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.
