-
Notifications
You must be signed in to change notification settings - Fork 700
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
Remove deprecated calls in cumulus-parachain-system #5439
Merged
ggwpez
merged 9 commits into
paritytech:master
from
gui1117:gui-parachain-system-remove-calls
Aug 27, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1559238
remove calls
gui1117 d7af522
prdoc
gui1117 af08642
fix test
gui1117 7ffea62
prdoc
gui1117 b05de7a
Merge branch 'master' into gui-parachain-system-remove-calls
gui1117 fbb3dd1
Merge branch 'master' into gui-parachain-system-remove-calls
gui1117 88962a1
fix prdoc
gui1117 9938e52
trigger ci
gui1117 27fd075
Revert "trigger ci"
gui1117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
title: "Deprecated calls removed in cumulus parachain system pallet" | ||
|
||
doc: | ||
- audience: [Runtime Dev, Runtime User] | ||
description: | | ||
Call `authorize_upgrade` in parachain system pallet `cumulus-pallet-parachain-system` has | ||
been removed, use `authorize_upgrade` or `authorize_upgrade_without_checks` calls in system | ||
pallet `frame-system` instead. | ||
Call `enact_authorized_upgrade` in parachain system pallet `cumulus-pallet-parachain-system` | ||
has been removed, use `apply_authorized_upgrade` call in system pallet `frame-system` instead. | ||
|
||
crates: | ||
- name: cumulus-pallet-parachain-system | ||
bump: major | ||
- name: cumulus-pallet-xcmp-queue | ||
bump: none |
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.
We need 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.
set_validation_data
is an inherent, inherent should not be validated byvalidate_unsigned
, they only go throughpre_dispatch
.The default implementation (by construct_runtime) is to consider all calls invalid in
validate_unsigned
and all calls valid inpre_dispatch
. So the default implementation is what we want here.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.
Indeed the behavior in construct runtime is allow calls in
pre_dispatch
and automatically reject any calls that don't haveValidateUnsigned::validate_unsigned
impl.On a different note, inherents are never "validated" as transactions and never enter the transaction pool, they are just included in the block and applied along with other regular transactions. Specifically when inherents are applied, the
Applyable
impl ofUncheckedExtrinsic
calls onValidateUnsigned::pre_dispatch
.ValidateUnsigned::validate_unsigned
is called only when validating a checked extrinsic inframe_executive
, which is called when a transaction tries to enter the transaction pool, which should never happen for inherents.set_validation_data
must be called exactly once per block, as an inherent, at the beginning of the block. This means it was never correct to have aValidateUnsigned
validation for it. It should never be allowed as an unsigned transaction, only as an inherent.Also, for peace of mind, all of the tests, including zombienet tests, are passing with the changes in this PR. The chain doesn't work without calls to
set_validation_data
every block, so the fact that the tests pass reinforces the reasoning.