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

polkadot-erasure-coding

Erasure coding used for Polkadot's availability system

18 major breaking releases

new 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

#511 in Magic Beans

Download history 708/week @ 2024-10-06 822/week @ 2024-10-13 1057/week @ 2024-10-20 907/week @ 2024-10-27 1064/week @ 2024-11-03 793/week @ 2024-11-10 1419/week @ 2024-11-17 1217/week @ 2024-11-24 1126/week @ 2024-12-01 1584/week @ 2024-12-08 1673/week @ 2024-12-15 874/week @ 2024-12-22 956/week @ 2024-12-29 1188/week @ 2025-01-05 1415/week @ 2025-01-12 1177/week @ 2025-01-19

4,861 downloads per month
Used in 37 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
~585K SLoC