Erasure encoding availability (#345)
* Erasure encoding availability initial commit * Modifications to availability store to keep chunks as well as reconstructed blocks and extrinsics. * Gossip messages containig signed erasure chunks. * Requesting eraure chunks with polkadot-specific messages. * Validation of erasure chunk messages. * Apply suggestions from code review Co-Authored-By:Luke Schoen <ltfschoen@users.noreply.github.com> * Fix build after a merge * Gossip erasure chunk messages under their own topic * erasure_chunks should use the appropriate topic * Updates Cargo.lock * Fixes after merge * Removes a couple of leftover pieces of code * Fixes simple stuff from review * Updates erasure and storage for more flexible logic * Changes validation and candidate receipt production. * Adds add_erasure_chunks method * Fixes most of the nits * Better validate_collation and validate_receipt functions * Fixes the tests * Apply suggestions from code review Co-Authored-By:
Robert Habermeier <rphmeier@gmail.com> * Removes unwrap() calls * Removes ErasureChunks primitive * Removes redundant fields from ErasureChunk struct * AvailabilityStore should store CandidateReceipt * Changes the way chunk messages are imported and validated. * Availability store now stores a validator_index and n_validators for each relay_parent. * Availability store now also stores candidate receipts. * Removes importing chunks in the table and moves it into network gossip validation. * Validation of erasure messages id done against receipts that are stored in the availability store. * Correctly compute topics for erasure messages * Removes an unused parameter * Refactors availability db querying into a helper * Adds the apis described in the writeup * Adds a runtime api to extract erasure roots form raw extrinsics. * Adds a barebone BlockImport impl for avalability store * Adds the implementation of the availability worker * Fix build after the merge with master. * Make availability store API async * Bring back the default wasmtime feature * Lines width * Bump runtime version * Formatting and dead code elimination * some style nits (#1) * More nits and api cleanup * Disable wasm CI for availability-store * Another nit * Formatting
Showing
- polkadot/.gitlab-ci.yml 0 additions, 1 deletionpolkadot/.gitlab-ci.yml
- polkadot/Cargo.lock 33 additions, 0 deletionspolkadot/Cargo.lock
- polkadot/availability-store/Cargo.toml 15 additions, 0 deletionspolkadot/availability-store/Cargo.toml
- polkadot/availability-store/src/lib.rs 294 additions, 190 deletionspolkadot/availability-store/src/lib.rs
- polkadot/availability-store/src/store.rs 689 additions, 0 deletionspolkadot/availability-store/src/store.rs
- polkadot/availability-store/src/worker.rs 998 additions, 0 deletionspolkadot/availability-store/src/worker.rs
- polkadot/cli/Cargo.toml 2 additions, 1 deletionpolkadot/cli/Cargo.toml
- polkadot/collator/src/lib.rs 7 additions, 8 deletionspolkadot/collator/src/lib.rs
- polkadot/erasure-coding/Cargo.toml 1 addition, 0 deletionspolkadot/erasure-coding/Cargo.toml
- polkadot/erasure-coding/src/lib.rs 25 additions, 21 deletionspolkadot/erasure-coding/src/lib.rs
- polkadot/network/Cargo.toml 1 addition, 0 deletionspolkadot/network/Cargo.toml
- polkadot/network/src/collator_pool.rs 7 additions, 5 deletionspolkadot/network/src/collator_pool.rs
- polkadot/network/src/gossip.rs 90 additions, 4 deletionspolkadot/network/src/gossip.rs
- polkadot/network/src/lib.rs 90 additions, 45 deletionspolkadot/network/src/lib.rs
- polkadot/network/src/router.rs 35 additions, 9 deletionspolkadot/network/src/router.rs
- polkadot/network/src/tests/mod.rs 2 additions, 51 deletionspolkadot/network/src/tests/mod.rs
- polkadot/network/src/tests/validation.rs 34 additions, 3 deletionspolkadot/network/src/tests/validation.rs
- polkadot/network/src/validation.rs 2 additions, 2 deletionspolkadot/network/src/validation.rs
- polkadot/primitives/Cargo.toml 2 additions, 0 deletionspolkadot/primitives/Cargo.toml
- polkadot/primitives/src/parachain.rs 110 additions, 2 deletionspolkadot/primitives/src/parachain.rs
Please register or sign in to comment