Skip to content
All tools
Tool

Visualise a Solana FEC set

Map received data and coding shreds into one recovery set, show missing indexes, and calculate whether reconstruction is possible.

Click any shred you did not receive

datacodingnot received

Recoverable

64 of 32 needed

32 more than the threshold, so you could lose 32 further shreds from this set and still rebuild it.

Missing data shreds
0
Irrelevant on its own. Only the total count of received symbols matters.
Loss this set can absorb
32
Equal to the number of coding shreds, whichever symbols go missing.

Every symbol is worth the same. That is the part worth internalising. Losing thirty data shreds and two coding shreds is exactly as recoverable as losing thirty-two coding shreds, and the visual above will not reward you for losing the "less important" ones, because there are none. Recovery also works only within one set, so spreading the same number of losses across two sets can break both while concentrating them breaks neither.

1 grid makes recovery visible

The FEC set visualiser turns shred metadata into two aligned rows: data symbols and coding symbols. Received symbols are filled, missing symbols are empty, duplicates are counted separately, and reconstructed data is marked with its own state.

The view answers three questions. Which indexes are absent. Whether enough independent symbols exist for recovery. How long the receiver waited before the set became decodable.

FEC stands for forward error correction. Solana sends coding shreds alongside data shreds so a receiver can reconstruct some missing data without requesting retransmission. Raw UDP itself still provides no retransmission or ordering.

Method

The user can paste header exports from the shred decoder, upload a bounded capture, or enter a compact set description. The component first groups compatible symbols by slot, FEC set index, variant family, and coding metadata. A matching slot alone is not enough.

For a group with k original data symbols and m coding symbols:

text

missing_data = k - received_data
available_coding = received_coding
total_independent = received_data + received_coding

recoverable when:
missing_data <= available_coding
and total_independent >= k

The two conditions describe the same threshold from different directions when all symbols are valid and independent. The component displays both because they expose input mistakes. Duplicate packets do not increase independent-symbol count.

Reed-Solomon coding can recover missing original symbols from enough valid symbols in the same coding domain. The tool does not assume every coding shred is usable. It checks metadata compatibility and reports signature or integrity status when that data is supplied.

Recovery margin is:

text

margin = available_coding - missing_data

A positive margin shows how many additional data-symbol losses the received coding set could cover at that instant. Zero means recovery is possible with no spare symbol. A negative value is the number of additional independent symbols needed.

Worked example

Assume one FEC group declares 32 data symbols and 32 coding symbols. The receiver has 29 unique data shreds and 7 unique coding shreds. Three data symbols are missing.

text

missing_data = 32 - 29 = 3
available_coding = 7
total_independent = 29 + 7 = 36
margin = 7 - 3 = 4

The group is recoverable because 3 is no greater than 7 and 36 is at least 32. After recovery, the grid marks the three rebuilt data positions and preserves that they were not received directly. The margin of four refers to the symbols currently present, not a guarantee about future packet loss.

Now remove five of the coding shreds. Only two coding symbols remain. Total independent symbols fall to 31 and margin becomes negative one. The tool reports not recoverable yet, needs one additional compatible symbol.

If a duplicate of an existing coding shred arrives, packet count rises but independent count remains 31. The visual duplicate badge increments. Recoverability does not change.

Time changes the interpretation

A set can be unrecoverable at 2 milliseconds and recoverable at 4 milliseconds when more coding shreds arrive. The timeline view plots first data arrival, each unique symbol, the point where k independent symbols exist, recovery start, and entry-ready time.

For a latency system, the first recoverable instant matters more than eventual recovery. Waiting for every coding shred wastes time. Starting recovery before k independent symbols exist wastes CPU or returns an expected failure. The component labels both thresholds.

The timeline also distinguishes network reordering from permanent loss. A data shred that arrives after its coding replacement was used is late, not missing forever. Retain both facts for packet-path analysis.

Use it to tune deadlines

Load a capture from a representative busy window and inspect the distribution of time from first symbol to recoverable. Choose a recovery wait that covers the useful portion of that distribution without exceeding the strategy's latency deadline.

A trading system might accept a short tail and reject incomplete state. An indexer might wait longer or use another source. The visualiser does not choose the policy. It exposes the trade between early decode, recovery probability, and stale work.

Exported results include group key, k, m, received identities, duplicates, missing data, received coding, recovery margin, first-arrival time, recoverable time, recovery completion, and parser version.

Limitations

The arithmetic assumes symbols are valid, independent, equal under the selected coding construction, and from one compatible group. Corrupt bytes, wrong metadata, mixed variants, or conflicting shreds can make a count look sufficient while decode fails.

The threshold says mathematical recovery is possible. It does not estimate CPU time, memory pressure, queue delay, or whether the recovered entry remains useful to a strategy. Benchmark the deployed Reed-Solomon implementation on production hardware.

One FEC set does not prove a slot is complete. A transaction can depend on entry data across the boundary the user selected. Completion flags and entry reconstruction still matter.

The tool visualises supplied packets. A capture can itself drop traffic. Missing in the file does not identify whether loss occurred upstream, at the NIC, in the kernel, in the capture process, or during export.

Protocol parameters can change. The component reads declared metadata under supported versions rather than hard-coding 32 data and 32 coding symbols as a network constant. The worked numbers illustrate the method only.

How it works out the answer

For one compatible FEC group with k data symbols and m coding symbols, mark every received identity once. Let missing_data = k − received_data and available_coding = received_coding. Reconstruction is possible when missing_data is no greater than available_coding and at least k total independent symbols are present. Protocol metadata and symbol compatibility are validated before applying this Reed-Solomon threshold.

Questions

How many coding shreds are needed to recover missing data?
For one compatible Reed-Solomon group, the receiver needs at least as many valid independent coding symbols as missing data symbols, and at least k total independent symbols for k original data symbols. Duplicates do not count. Protocol metadata and variant compatibility must also agree.
Does a recoverable FEC set mean the slot is complete?
No. Recoverability applies to one FEC group. Other groups in the slot can remain missing, and transaction or entry boundaries may require additional ordered data. Slot completion uses its own flags and sequence checks. The visualiser reports the selected group's state without extending that conclusion.
Why keep direct and reconstructed data separate?
The distinction supports latency and loss analysis. Reconstructed content became readable later and consumed coding symbols plus CPU. Treating it as directly received hides path loss and recovery delay. Both can produce the same block bytes while representing different receiver performance.