Update Scheduler to have a configurable block provider #7434 (#7441)
Follow up from https://github.com/paritytech/polkadot-sdk/pull/6362#issuecomment-2629744365 The goal of this PR is to have the scheduler pallet work on a parachain which does not produce blocks on a regular schedule, thus can use the relay chain as a block provider. Because blocks are not produced regularly, we cannot make the assumption that block number increases monotonically, and thus have new logic to handle multiple spend periods passing between blocks. Requirement: instead of using the hard coded system block number. We add an associated type BlockNumberProvider --------- Signed-off-by:Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Showing
- cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs 1 addition, 0 deletions...hains/runtimes/collectives/collectives-westend/src/lib.rs
- polkadot/runtime/rococo/src/lib.rs 1 addition, 0 deletionspolkadot/runtime/rococo/src/lib.rs
- polkadot/runtime/westend/src/lib.rs 1 addition, 0 deletionspolkadot/runtime/westend/src/lib.rs
- prdoc/pr_7441.prdoc 25 additions, 0 deletionsprdoc/pr_7441.prdoc
- substrate/bin/node/runtime/src/lib.rs 1 addition, 0 deletionssubstrate/bin/node/runtime/src/lib.rs
- substrate/frame/democracy/src/tests.rs 1 addition, 0 deletionssubstrate/frame/democracy/src/tests.rs
- substrate/frame/referenda/src/mock.rs 1 addition, 0 deletionssubstrate/frame/referenda/src/mock.rs
- substrate/frame/scheduler/src/benchmarking.rs 1 addition, 4 deletionssubstrate/frame/scheduler/src/benchmarking.rs
- substrate/frame/scheduler/src/lib.rs 41 additions, 12 deletionssubstrate/frame/scheduler/src/lib.rs
- substrate/frame/scheduler/src/migration.rs 0 additions, 1 deletionsubstrate/frame/scheduler/src/migration.rs
- substrate/frame/scheduler/src/mock.rs 2 additions, 1 deletionsubstrate/frame/scheduler/src/mock.rs
- substrate/frame/scheduler/src/tests.rs 20 additions, 16 deletionssubstrate/frame/scheduler/src/tests.rs
Please register or sign in to comment