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 means forward error correction. Solana transmits coding shreds beside data shreds, allowing a receiver to rebuild missing content without requesting retransmission. Raw UDP itself still supplies neither retransmission nor order.
Method
Users can paste decoder header exports, upload a bounded capture, or enter a compact set description. The component groups compatible symbols using slot, recovery-set index, variant family, and coding metadata. Matching only the slot is insufficient.
For a group with k original data symbols and m coding symbols:
text
missing_data = k - received_dataavailable_coding = received_codingtotal_independent = received_data + received_coding recoverable when:missing_data <= available_codingand total_independent >= kThe 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_dataA 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 original data symbols plus 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 = 3available_coding = 7total_independent = 29 + 7 = 36margin = 7 - 3 = 4The 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.
Exports carry the group key, k, m, received identities, duplicates, missing data, coding count, recovery margin, first arrival, the recoverable instant, completion time, 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.
Recoverability of one FEC set cannot establish full slot completion. Transactions may depend on entry data beyond the selected boundary, so 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 turning this 32-by-32 data/coding illustration into a network constant. These worked numbers explain only the method.
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 FEC recoverability establish full slot completion?
- No. Recoverability describes one FEC group. Other slot groups can remain missing, while transaction or entry boundaries may require additional ordered data. Separate flags and sequence checks establish slot completion. 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.