Files
pezkuwi-subxt/prdoc/pr_3341.prdoc
T
Bastian Köcher 12eb285dbe Fix parachain upgrade scheduling when done by the owner/root (#3341)
When using `schedule_code_upgrade` to change the code of a parachain in
the relay chain runtime, we had already fixed to not set the `GoAhead`
signal. This was done to not brick any parachain after the upgrade,
because they were seeing the signal without having any upgrade prepared.
The remaining problem is that the parachain code is only upgraded after
a parachain header was enacted, aka the parachain made some progress.
However, this is quite complicated if the parachain is bricked (which is
the most common scenario why to manually schedule a code upgrade). Thus,
this pull request replaces `SetGoAhead` with `UpgradeStrategy` to signal
to the logic kind of strategy want to use. The strategies are either
`SetGoAheadSignal` or `ApplyAtExpectedBlock`. `SetGoAheadSignal` sets
the go ahead signal as before and awaits a parachain block.
`ApplyAtExpectedBlock` schedules the upgrade and applies it directly at
the `expected_block` without waiting for the parachain to make any kind
of progress.
2024-04-02 09:44:23 +00:00

19 lines
829 B
Plaintext

title: "Fix `schedule_code_upgrade` when called by the owner/root"
doc:
- audience: Runtime User
description: |
Fixes `schedule_code_upgrade` when being used by the owner/root. The call is used for
manually upgrading the validation code of a parachain on the relay chain. It was failing
before because the relay chain waited for the parachain to make progress. However, this
call is mostly used for when a parachain are bricked which means that they are not able
anymore to build any blocks. The fix is to schedule the validation code upgrade and then
to enact it at the scheduled block. The enacting happens now without requiring the parachain
to make any progress.
crates:
- name: polkadot-runtime-common
bump: minor
- name: polkadot-runtime-parachains
bump: major