-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Scheduler to Support Relay Chain Block Number Provider #6362
Open
gupnik
wants to merge
35
commits into
master
Choose a base branch
from
gupnik/scheduler-bnp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+347
−64
Open
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
f8e5c63
Adds BlockNumberProvider
gupnik 455d765
Adds a Queue to handle non-sequential block numbers
gupnik 762c816
Removes constraint
gupnik 86701cf
Updates benchmarks
gupnik 27d1fa1
Adds migration
gupnik c79900c
FMT
gupnik 622805d
Adds PrDoc
gupnik abbd346
Updates PrDoc
gupnik 844662e
Merge branch 'master' into gupnik/scheduler-bnp
gupnik 813e596
Fixes
gupnik 8c40f24
Adds MaxStaleTaskAge
gupnik b905628
Fixes
gupnik 2ea271a
Minor fix
gupnik 9a73c23
Minor fix
gupnik ece2027
Removes unused import
gupnik da116a7
Minor
gupnik b1b414a
Minor
gupnik 584f98f
Merge branch 'master' of github.com:paritytech/polkadot-sdk into gupn…
gupnik fe918e5
Merge branch 'master' into gupnik/scheduler-bnp
gupnik 158e86d
Merge branch 'master' into gupnik/scheduler-bnp
seemantaggarwal 346203d
fixing build errors after merging from master
seemantaggarwal 392921a
addressing comments
seemantaggarwal eb285f6
changing queue to be a btree instead of a bounded vec initial effort
seemantaggarwal 437b117
converting to BoundedBtreeSet
seemantaggarwal a1667dd
Merge branch 'master' into gupnik/scheduler-bnp
seemantaggarwal d065a91
cargo + nightly fmt
seemantaggarwal 3ddfdf0
removing unused imports
seemantaggarwal 28fa84b
removing further unused imports
seemantaggarwal aed2d40
further improvement
seemantaggarwal f971aa6
Merge branch 'master' into gupnik/scheduler-bnp
seemantaggarwal a7c1723
fmt changes
seemantaggarwal ec2cba0
error resolution
seemantaggarwal 59845b7
Merge branch 'master' into gupnik/scheduler-bnp
seemantaggarwal 4922711
fixing failing tests, checking for first valid element instead of fir…
seemantaggarwal e6a8947
changing function name
seemantaggarwal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
title: Update Scheduler to Support Relay Chain Block Number Provider | ||
|
||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
This PR adds the ability for the Scheduler pallet to specify its source of the block number. | ||
This is needed for the scheduler pallet to 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 the block number increases | ||
monotonically, and thus have a new logic via a `Queue` to handle multiple blocks with valid | ||
agenda passed between them. | ||
|
||
This change only needs a migration for the `Queue`: | ||
1. If the `BlockNumberProvider` continues to use the system pallet's block number | ||
2. When a pallet deployed on the relay chain is moved to a parachain, but still uses the | ||
relay chain's block number | ||
|
||
However, we would need migrations if the deployed pallets are upgraded on an existing parachain, | ||
and the `BlockNumberProvider` uses the relay chain block number. | ||
|
||
crates: | ||
- name: pallet-scheduler | ||
bump: major |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming it
max_scheduled_blocks
sounds more appropriate