This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Scheduler Module #1162
Merged
Merged
Scheduler Module #1162
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
af77a9a
scheduler module skeleton
rphmeier d2eb247
update scheduler skeleton to match latest version of guide
rphmeier 631a6ba
better session change notification
rphmeier cdf114b
add mock randomness and fix test compilation
rphmeier b2a8c42
shuffle validators into groups
rphmeier d6d751d
finish implementing session change logic for scheduler
rphmeier ba8dc9f
tweak core assignment type to track retries of parathread
rphmeier be800dd
reframe queued parathread core as offset
rphmeier cad53e6
implement initialzation and finalization routines
rphmeier eb64044
implement parathread claim queuing
rphmeier 8b4cfd4
implement core_para
rphmeier ff2e4d7
implement the group_validators routine and fix errors
rphmeier 35a3692
add a reason for freeing cores
rphmeier adbaa1d
implement `schedule` function
rphmeier e5c1651
Merge branch 'master' into rh-para-scheduler
rphmeier 6a11337
add some docs to the scheduled function
rphmeier c63a94b
implement `occupied` helper
rphmeier 1c6d4ab
implement availability predicate
rphmeier 83ba678
fix some warnings
rphmeier d9df378
integrate scheduler into initializer
rphmeier 3e7ac7b
integrate scheduler into mock module
rphmeier 1bee255
avoid conflict with Substrate's scheduler storage
rphmeier 9096c14
add parathreads index to paras module
rphmeier 242b129
implement parathreads map in paras module
rphmeier 94cb169
add is_parathread to paras
rphmeier 55ad79d
test adding parathread claim
rphmeier 2703687
test that you cannot add claims when no parathread cores exist
rphmeier f707371
check session change parathread queue pruning
rphmeier 40d39eb
test validator shuffling
rphmeier 19f6d53
add allow_unused to scheduler items
rphmeier f5ef2fa
add test for scheduling
rphmeier 2d52e05
add some more tests for scheduling logic
rphmeier 56e8669
test core rotation
rphmeier a909ad8
check parathread claim pruning after retries
rphmeier 89ad0f8
add bound notes
rphmeier f85ff4e
Apply suggestions from code review
rphmeier 50965e8
more suggestions from review
rphmeier 3918713
test availability predicate, add box to please compiler
rphmeier 3392398
Merge branch 'master' into rh-para-scheduler
rphmeier 63dfb9c
add changes to guide
rphmeier 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.
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.
Do we care that
buf
always has32-len
trailing0
s?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.
Nope! In practice hash is always 32 bytes, and 0-padding it is pretty much the best option if the hash is smaller in some case. It doesn't lose us any security in any case.
In the case that the hash type is larger (again, unlikely), 32 random bytes are more than enough for our purposes.