move paras inherent filtering to runtime (#4028)
* move things around, add filter methods * validator keys, modify availability bitfields according to disputes * simplify, keep the filter -> sanitize generic for both usecases * minor * assure tests still work, reduce changeset * integration * start entropy passing * fixins * compile, 1 failing test * filter with coverage * fixins * Update runtime/parachains/src/paras_inherent.rs Co-authored-by:Robert Habermeier <rphmeier@gmail.com> * slip of the pen * improve test cases * misc * fix * fixins * test avoid extra into() calls in assert_noop! * chores * ff * test fixup superfluous into call * chore: pfmt * improve apply_block_weight_limit to try to maximize the number of sufficiently backed blocks and add extra bitfields in a round-robin fashion * new code treats the lack of backed candidates as ok * Use vrf based entropy * fixup vrf random * add warn * slip of the pen * fixup * assure ordering * rethink apply_weights * mock * use a closure as predicate check * extract and use DisputedBitfield * chore: simplify * remove stray dbg * chore: fmt * address feedback * fix test, halfway there * stage1 * dbg stuff * make group selection align * fix session index * fix wrongly returned candidates * cleanup * chore fmt * fix ensure check * make good case test work * more tests for bitfields * create sanitize_backed_candidates * fixup tests * update guide * add check referenced in the guide * improve weights code * fmt * fixins * Update roadmap/implementers-guide/src/runtime/inclusion.md Co-authored-by:
Zeke Mostov <32168567+emostov@users.noreply.github.com> * compiling + address review * add comments * fix weight calc * address review comments and test failure * fix * fix: condition * Fix random_sel function * Fix overlength block check * Zeke + Ladi commit for disputes filtering + integration test builder + runtime benchmarks + integration tests * Add benchmarks for code upgrades * Code upgrade bench; Feature gate TestWeightInfo * Try and make CI happier * Feature gate enter test to not(benchmarks) * Make sure no unused imports/fn * refactor, re-use, the beginning * Fix issue with frame benchmarking dep compilation * More precise feature gating for some derives * integrate piece-wise * foo * fixins * chore fmt * fixins * rename const generic * Update runtime/parachains/src/paras_inherent.rs Co-authored-by:
Zeke Mostov <z.mostov@gmail.com> * Fix compilation * limit to test * remove unused spam slots * spellcheck * remove a tick, fix a typo * Add Code upgrade weights * comment improvements + >= Co-authored-by:
Zeke Mostov <z.mostov@gmail.com> * remove another tick * Update runtime/parachains/src/paras_inherent/benchmarking.rs Co-authored-by:
Zeke Mostov <z.mostov@gmail.com> * saturating fixins + some spaces * fix * benchmarking - preliminary results * Add training wheels * Refactor some early exit logic for enter * Gracefully handle filtering bitfields & candidates (#4280) This updates the logic for sanitize_bitfields and sanitize_backed_candidates to never error when there is an issue, but instead to simply skip the problematic items. * Refactor inherent data weight limiting logic (#4287) * Apply suggestions from code review * Update runtime/parachains/src/builder.rs Co-authored-by:
Zeke Mostov <z.mostov@gmail.com> * Update runtime/parachains/src/builder.rs * Update runtime/parachains/src/paras_inherent.rs * final pass * Run cargo +nightly-2021-10-29 fmt * Update implementors guide with `sanitize_*` & `enter` (#4294) * Make spell check happier * Make wasm runtimes compile with benchmarks enabled (#4303) * comment stuff out, use old toml * Seems to be working? * Remove feature gating from builder * Remove commented out stuff * Remove generic from digest * Update weight files for runtime Co-authored-by:
Robert Habermeier <rphmeier@gmail.com> Co-authored-by:
Zeke Mostov <32168567+emostov@users.noreply.github.com> Co-authored-by:
Lldenaurois <Ljdenaurois@gmail.com> Co-authored-by:
Zeke Mostov <z.mostov@gmail.com> Co-authored-by:
Bastian Köcher <info@kchr.de>
Showing
- polkadot/Cargo.lock 1 addition, 0 deletionspolkadot/Cargo.lock
- polkadot/parachain/Cargo.toml 1 addition, 0 deletionspolkadot/parachain/Cargo.toml
- polkadot/parachain/src/primitives.rs 12 additions, 2 deletionspolkadot/parachain/src/primitives.rs
- polkadot/primitives/Cargo.toml 1 addition, 1 deletionpolkadot/primitives/Cargo.toml
- polkadot/primitives/src/v0.rs 2 additions, 2 deletionspolkadot/primitives/src/v0.rs
- polkadot/primitives/src/v1/mod.rs 8 additions, 6 deletionspolkadot/primitives/src/v1/mod.rs
- polkadot/primitives/src/v1/signed.rs 38 additions, 0 deletionspolkadot/primitives/src/v1/signed.rs
- polkadot/roadmap/implementers-guide/src/runtime/inclusion.md 29 additions, 3 deletionspolkadot/roadmap/implementers-guide/src/runtime/inclusion.md
- polkadot/roadmap/implementers-guide/src/runtime/parainherent.md 41 additions, 3 deletions...ot/roadmap/implementers-guide/src/runtime/parainherent.md
- polkadot/roadmap/implementers-guide/src/types/runtime.md 3 additions, 1 deletionpolkadot/roadmap/implementers-guide/src/types/runtime.md
- polkadot/runtime/kusama/Cargo.toml 1 addition, 0 deletionspolkadot/runtime/kusama/Cargo.toml
- polkadot/runtime/kusama/src/lib.rs 5 additions, 1 deletionpolkadot/runtime/kusama/src/lib.rs
- polkadot/runtime/kusama/src/weights/mod.rs 1 addition, 0 deletionspolkadot/runtime/kusama/src/weights/mod.rs
- polkadot/runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs 178 additions, 0 deletions...e/kusama/src/weights/runtime_parachains_paras_inherent.rs
- polkadot/runtime/parachains/Cargo.toml 2 additions, 1 deletionpolkadot/runtime/parachains/Cargo.toml
- polkadot/runtime/parachains/src/builder.rs 590 additions, 0 deletionspolkadot/runtime/parachains/src/builder.rs
- polkadot/runtime/parachains/src/disputes.rs 26 additions, 0 deletionspolkadot/runtime/parachains/src/disputes.rs
- polkadot/runtime/parachains/src/inclusion.rs 289 additions, 193 deletionspolkadot/runtime/parachains/src/inclusion.rs
- polkadot/runtime/parachains/src/initializer.rs 1 addition, 1 deletionpolkadot/runtime/parachains/src/initializer.rs
- polkadot/runtime/parachains/src/lib.rs 2 additions, 0 deletionspolkadot/runtime/parachains/src/lib.rs
Please register or sign in to comment