-
Notifications
You must be signed in to change notification settings - Fork 768
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
collator protocol changes for elastic scaling (validator side) #3302
Merged
Merged
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
504b919
add new collation advertisement
ordian efceb5e
remove v3 in favor of enum variant
ordian 94ba49b
get rid of with_elastic_scaling
ordian 211edb7
no maybes
ordian 739e63c
Merge branch 'master' into ao-collator-parent-head-data
ordian 3320447
prdoc
ordian 10a3e9c
sanity check the provided parent head data hash
ordian b7466c2
address review: use enum for parent head-data
ordian 1ff7a54
test validator sanity check parent_head_data hash
ordian 8b70d0f
Merge remote-tracking branch 'origin/master' into ao-collator-parent-…
ordian f44d58e
Merge remote-tracking branch 'origin/master' into ao-collator-parent-…
ordian 8910798
Merge branch 'master' into ao-collator-parent-head-data
ordian 7322058
add a comment (review)
ordian 568e8ce
Merge branch 'master' into ao-collator-parent-head-data
ordian 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
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.
Can we please get rid of this
with_elastic_scaling
everywhere in this pr? This is just "dirty". The collation generation logic internally can just decide based on the fact if thehead
is passed or not if it wants to use the new message.From all the collator implementations we want to set the
head
toNone
for now and then later do this properly.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.
sure, pushed 94ba49b
could you elaborate on this? passing the head from where?
i mean we could also detect elastic scaling by checking all the assignments for the para_id in collation-generation (or somewhere else)
we could also set to Some unconditionally (which seems wasteful)
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.
https://github.com/paritytech/polkadot-sdk/pull/3302/files#diff-14f4394aa7a3666c1a78fb28ccf076505323c497acf8dae788d3fc28a9cc6a18R862 you are already doing here what I meant.
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.
And then give
maybe_parent_head
better docs to explain on when to set this.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.
currently, in this PR,
maybe_parent_head_data
is being set by collation-generation - it's hardcoded toNone
: https://github.com/paritytech/polkadot-sdk/pull/3302/files#diff-d7298fb050b10e14df59080885ebee73861d85b2c4722cc00089fc91a703d63eR543. I've tried to make it configurable withwith_elastic_scaling
param, but you seem to think it's a hack. So my question is, do you have a suggestion on how it should be configured properly?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.
I'll make
maybe_parent_head_data
part ofpolkadot-sdk/polkadot/node/primitives/src/lib.rs
Line 419 in 6185b00
CollatorFn
if that the right way.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.
Maybe we don't need this, because
CollatorFn
is sort of deprecated I would say. I mean the lookahead collator isn't using this anymore and any feature work will also not useCollatorFn
anymore.SubmitCollationParams
is the struct that should be updated to takemaybe_parent_head_data
.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.
Ok, I think I misunderstood you a bit and after chatting with @skunert, settled on approach where collators don't configure anything and elastic scaling is detected automatically (not done in this PR).
Updated the PR and description. PTAL 🙏