Scheduler Module (#1162)
* scheduler module skeleton * update scheduler skeleton to match latest version of guide * better session change notification * add mock randomness and fix test compilation * shuffle validators into groups * finish implementing session change logic for scheduler * tweak core assignment type to track retries of parathread * reframe queued parathread core as offset * implement initialzation and finalization routines * implement parathread claim queuing * implement core_para * implement the group_validators routine and fix errors * add a reason for freeing cores * implement `schedule` function * add some docs to the scheduled function * implement `occupied` helper * implement availability predicate * fix some warnings * integrate scheduler into initializer * integrate scheduler into mock module * avoid conflict with Substrate's scheduler storage * add parathreads index to paras module * implement parathreads map in paras module * add is_parathread to paras * test adding parathread claim * test that you cannot add claims when no parathread cores exist * check session change parathread queue pruning * test validator shuffling * add allow_unused to scheduler items * add test for scheduling * add some more tests for scheduling logic * test core rotation * check parathread claim pruning after retries * add bound notes * Apply suggestions from code review Co-authored-by:Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io> * more suggestions from review * test availability predicate, add box to please compiler * add changes to guide Co-authored-by:
Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com> Co-authored-by:
Bernhard Schuster <bernhard@ahoi.io>
Showing
- polkadot/Cargo.lock 2 additions, 0 deletionspolkadot/Cargo.lock
- polkadot/roadmap/implementors-guide/src/runtime/inclusioninherent.md 2 additions, 3 deletions...admap/implementors-guide/src/runtime/inclusioninherent.md
- polkadot/roadmap/implementors-guide/src/runtime/paras.md 4 additions, 0 deletionspolkadot/roadmap/implementors-guide/src/runtime/paras.md
- polkadot/roadmap/implementors-guide/src/runtime/scheduler.md 23 additions, 10 deletionspolkadot/roadmap/implementors-guide/src/runtime/scheduler.md
- polkadot/runtime/parachains/Cargo.toml 3 additions, 0 deletionspolkadot/runtime/parachains/Cargo.toml
- polkadot/runtime/parachains/src/configuration.rs 2 additions, 2 deletionspolkadot/runtime/parachains/src/configuration.rs
- polkadot/runtime/parachains/src/initializer.rs 51 additions, 5 deletionspolkadot/runtime/parachains/src/initializer.rs
- polkadot/runtime/parachains/src/mock.rs 17 additions, 2 deletionspolkadot/runtime/parachains/src/mock.rs
- polkadot/runtime/parachains/src/paras.rs 24 additions, 7 deletionspolkadot/runtime/parachains/src/paras.rs
- polkadot/runtime/parachains/src/scheduler.rs 1509 additions, 0 deletionspolkadot/runtime/parachains/src/scheduler.rs
Please register or sign in to comment