Module solana_ledger::erasure[][src]

Erasure Coding and Recovery

Shreds are logically grouped into erasure sets or blocks. Each set contains 16 sequential data shreds and 4 sequential coding shreds.

Coding shreds in each set starting from start_idx: For each erasure set: generate NUM_CODING coding_shreds. index the coding shreds from start_idx to start_idx + NUM_CODING - 1.

model of an erasure set, with top row being data shreds and second being coding |<======================= NUM_DATA ==============================>| |<==== NUM_CODING ===>| +—+ +—+ +—+ +—+ +—+ +—+ +—+ +—+ +—+ +—+ | D | | D | | D | | D | | D | | D | | D | | D | | D | | D | +—+ +—+ +—+ +—+ +—+ . . . +—+ +—+ +—+ +—+ +—+ | C | | C | | C | | C | | | | | | | | | | | | | +—+ +—+ +—+ +—+ +—+ +—+ +—+ +—+ +—+ +—+

shred structure for coding shreds

Structs

ErasureConfig
Session

Represents an erasure “session” with a particular configuration and number of data and coding shreds

Constants

NUM_CODING

Number of coding shreds; also the maximum number that can go missing.

NUM_DATA

Number of data shreds