Implementations to allow easier unbricking of parachains#5429
Draft
pandres95 wants to merge 2 commits intoparitytech:masterfrom
Draft
Implementations to allow easier unbricking of parachains#5429pandres95 wants to merge 2 commits intoparitytech:masterfrom
pandres95 wants to merge 2 commits intoparitytech:masterfrom
Conversation
… to change the validation code or note a head for a para. This is part of the implementation of [Unbrick Collective](https://forum.polkadot.network/t/unbrick-collective/6931)
9217ce2 to
e25eac3
Compare
e25eac3 to
2a5ffd4
Compare
|
The CI pipeline was cancelled due to failure one of the required jobs. |
bkontur
reviewed
May 22, 2025
| pub fn unbrick( | ||
| origin: OriginFor<T>, | ||
| para: ParaId, | ||
| maybe_new_code: Option<ValidationCode>, |
Contributor
There was a problem hiding this comment.
This won't work if called from Collectives (para) to the relay chain — but there is an alternative implemented here:
#7592
The fn unbrick function isn't really necessary and could be replaced with two batched calls:
batch(
Paras::authorize_force_set_current_code_hash(new_validation_code),
Paras::force_set_current_head(...)
)
We might just need to add some custom origin validation to force_set_current_head instead of using ensure_root, but that's a very minor change.
More context: polkadot-fellows/RFCs#117 (comment)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to RFC-117 (WIP).
This Pull Request aims to implement the pallet components of the Unbrick Collective.
unbrickmethodThe
Paras::unbrickmethod allows a given origin to change the validation code or note a head for a para.This allows paras to opt-in for a delegated origin (i.e.
UnbrickCollective) that can handle operations to unbrick a para.This allows using a single instance of
Whitelistthat executes calls to different origins depending on the caller origin, based on a mapping.Related issues
polkadot-fellows/runtimes#376