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

polkadot-erasure-coding

Erasure coding used for Polkadot's availability system (polkadot v1.15.0)

15 major breaking releases

new 15.0.0 Jul 18, 2024
14.0.0 Jun 21, 2024
13.0.0 May 23, 2024
12.0.0 Apr 30, 2024
0.0.0 Nov 21, 2022

#1603 in Magic Beans

Download history 986/week @ 2024-03-27 667/week @ 2024-04-03 673/week @ 2024-04-10 586/week @ 2024-04-17 593/week @ 2024-04-24 679/week @ 2024-05-01 480/week @ 2024-05-08 853/week @ 2024-05-15 853/week @ 2024-05-22 857/week @ 2024-05-29 1033/week @ 2024-06-05 773/week @ 2024-06-12 753/week @ 2024-06-19 924/week @ 2024-06-26 318/week @ 2024-07-03 448/week @ 2024-07-10

2,668 downloads per month
Used in 32 crates (9 directly)

GPL-3.0-only

20KB
299 lines

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

~22–33MB
~553K SLoC