01

How can you know all the data is there without downloading it?

As blockchains handle more data, it becomes impractical for every participant to download and check all of it. Data availability sampling (DAS) checks a few small, randomly chosen pieces instead and, from that, concludes with high probability whether the full data was really published.

This guide explains how sampling works and how confident a node can be after a given number of samples, using a hypothetical calculation. It also covers the assumptions the method relies on and what recovery and withdrawal routes exist if data does go missing.

02

The data availability question

As Ethereum.org's page on data availability explains, if a block producer withheld transaction data, other participants could not verify that block's results. For rollups, that data is what lets others reconstruct the state and help users withdraw if the operator stops. Whether data was actually published is therefore central to security.

Availability is a different question from correctness. Fraud proofs or validity proofs check that the data's contents are right; data availability checks only that anyone can obtain the data. A rollup needs both.

03

Separating publication from execution

In modular designs, the layer that publishes data can be separate from the layer that executes transactions. A data availability layer only receives, publishes, and stores data; it does not interpret what the data means. Celestia's documentation describes such a dedicated layer and its use of sampling.

Separating roles lets the execution layer publish data cheaply, but someone still has to verify that the data layer is really publishing it. Sampling is what allows light nodes, not just large servers, to do that verification.

04

How sampling works

Data is first extended with erasure coding to roughly twice its original size and split into pieces, so that any half of the pieces is enough to rebuild the whole. Anyone trying to hide data must therefore withhold more than half of the pieces to prevent reconstruction.

A light node requests a few pieces at random. If more than half are withheld, each request fails with at least 50% probability. If every request succeeds, the chance that data was hidden falls sharply with each additional sample.

05

A hypothetical check

The table shows, for a single light node, the maximum probability of missing withheld data after a given number of random samples, assuming enough pieces are withheld to block reconstruction.

Chance of missing withheld data by number of samples (hypothetical, one node)
Random samples checkedMaximum chance all succeed by luckInterpretation
150%Almost meaningless
10≈ 0.098%About 1 in 1,000
20≈ 0.0001%About 1 in a million
30≈ 0.0000001%About 1 in a billion

Probability of missing it ≤ 0.5 raised to the number of samples. With many nodes sampling, the chance the whole network misses it falls further, provided the assumptions below hold.

06

Participant and network assumptions

Sampling is only as strong as its assumptions. There must be enough light nodes sampling that, together, the pieces they hold are sufficient to reconstruct the data. The party hiding data must not be able to know in advance which node will request which piece, or to target specific nodes for deception.

Nodes must also be well connected, so that one that detects missing data can alert others. If any of these assumptions weakens, the probabilities in the table no longer apply as stated. When evaluating a sampling-based network, ask how many nodes actually sample today.

Ethereum.org's layer 2 overview stresses that rollups depend on the data they post being available. Sampling makes that check cheap enough for ordinary participants, but the guarantee is statistical and rests on the network behaving as assumed.

07

Checking recovery and withdrawal routes

Before using a rollup that relies on a data availability layer, work through these checks.

  1. Find out from official documentation whether the rollup posts data to Ethereum or to an external data availability layer.
  2. For an external layer, check whether it uses sampling and roughly how many sampling nodes and validators it has.
  3. Find how long data is kept, and who must store it afterward for the state to be reconstructable.
  4. See whether users can withdraw on their own using published data if the operator stops.
  5. Look in the documentation for how the rollup responds if the data layer itself fails or is attacked.
08

Limits of sampling assumptions

Sampling checks probabilistically that data was published; it does not guarantee long-term storage. Data past its availability window can disappear unless someone keeps a copy. Ethereum is introducing sampling in stages as well, so details depend on timing.

The probability calculation is a simplified hypothetical. When evaluating a real network, check Ethereum.org and the project's current documentation with their revision dates in mind, and look at whether the assumptions behind the numbers actually hold before trusting the numbers.