#erasure-coding #polkadot #availability #system #root #data #merkle

polkadot-erasure-coding

Erasure coding used for Polkadot's availability system

17 major breaking releases

18.0.0 Jan 22, 2025
17.0.0 Jan 13, 2025
16.0.0 Sep 26, 2024
15.0.0 Jul 18, 2024
0.0.0 Nov 21, 2022

#8 in #erasure-coding

Download history 1004/week @ 2024-10-29 945/week @ 2024-11-05 918/week @ 2024-11-12 1455/week @ 2024-11-19 1192/week @ 2024-11-26 1251/week @ 2024-12-03 1634/week @ 2024-12-10 1443/week @ 2024-12-17 935/week @ 2024-12-24 933/week @ 2024-12-31 1342/week @ 2025-01-07 1292/week @ 2025-01-14 1294/week @ 2025-01-21 1145/week @ 2025-01-28 1260/week @ 2025-02-04 1262/week @ 2025-02-11

5,156 downloads per month
Used in 43 crates (9 directly)

GPL-3.0-only

20KB
299 lines

Release

Polkadot SDK Stable 2412


lib.rs:

As part of Polkadot's availability system, certain pieces of data for each block are required to be kept available.

The way we accomplish this is by erasure coding the data into n pieces and constructing a merkle root of the data.

Each of n validators stores their piece of data. We assume n = 3f + k, 0 < k ≤ 3. f is the maximum number of faulty validators in the system. The data is coded so any f+1 chunks can be used to reconstruct the full data.

Dependencies

~24–35MB
~578K SLoC