fix: GoAhead signal only set when runtime upgrade is enacted from parachain side#1176
Merged
fix: GoAhead signal only set when runtime upgrade is enacted from parachain side#1176
Conversation
BradleyOlson64
approved these changes
Sep 6, 2023
Contributor
BradleyOlson64
left a comment
There was a problem hiding this comment.
Looks good to me. Nice work Daan!
bkchr
reviewed
Sep 7, 2023
Member
bkchr
left a comment
There was a problem hiding this comment.
Looking mainly good, just some nitpicks.
| UmpAcceptanceCheckErr::IsOffboarding => | ||
| write!(fmt, "upward message rejected because the para is off-boarding",), | ||
| UmpAcceptanceCheckErr::IsOffboarding => { | ||
| write!(fmt, "upward message rejected because the para is off-boarding",) |
Member
There was a problem hiding this comment.
Suggested change
| write!(fmt, "upward message rejected because the para is off-boarding",) | |
| write!(fmt, "upward message rejected because the para is off-boarding") |
| /// See https://github.com/paritytech/polkadot/issues/4601 for detailed explanation. | ||
| included_at: BlockNumber, | ||
| /// Whether or not the given para should be sent the `GoAhead` signal. | ||
| set_go_ahead: bool, |
Member
There was a problem hiding this comment.
Could we make this an enum:
/// Should the `GoAhead` signal be set after a successful check of the new wasm binary?
enum SetGoAhead {
Yes,
No,
}
| // Schedule the upgrade with a delay just like if a parachain triggered the upgrade. | ||
| let upgrade_block = current_block.saturating_add(config.validation_upgrade_delay); | ||
| Self::schedule_code_upgrade(id, new_code, upgrade_block, &config); | ||
| Self::schedule_code_upgrade(id, new_code, upgrade_block, &config, false); |
Member
There was a problem hiding this comment.
IMO we should "bubble up" the set_go_ahead parameter to the callers of this function.
813666a to
21570c6
Compare
Contributor
Author
|
Apologies for the mess and the lost history. I didn't see another way than to force push, it won't happen again 😣 |
bkchr
approved these changes
Oct 15, 2023
bkchr
reviewed
Oct 15, 2023
ordian
added a commit
that referenced
this pull request
Oct 16, 2023
* master: (54 commits) Publish `xcm-emulator` crate (#1881) Adding migrations to clean Rococo Gov 1 storage & reserved funds (#1849) Arkworks Elliptic Curve utils overhaul (#1870) Fix typos (#1878) fix: GoAhead signal only set when runtime upgrade is enacted from parachain side (#1176) Refactor staking ledger (#1484) Paired-key Crypto Scheme (#1705) Include polkadot version in artifact path (#1828) add link to rfc-0001 in broker README (#1862) Discard `Executor` (#1855) Macros to use path instead of ident (#1474) Remove clippy clone-double-ref lint noise (#1860) Refactor alliance benchmarks to v2 (#1868) Check executor params coherence (#1774) frame: use derive-impl for beefy and mmr pallets (#1867) sc-consensus-beefy: improve gossip logic (#1852) Adds instance support for composite enums (#1857) Fix links to implementers' guide (#1865) Disabled validators runtime API (#1257) Adding `try_state` hook for `Treasury` pallet (#1820) ...
ordian
added a commit
that referenced
this pull request
Oct 16, 2023
…ribution * tsv-disabling-backing: (54 commits) Publish `xcm-emulator` crate (#1881) Adding migrations to clean Rococo Gov 1 storage & reserved funds (#1849) Arkworks Elliptic Curve utils overhaul (#1870) Fix typos (#1878) fix: GoAhead signal only set when runtime upgrade is enacted from parachain side (#1176) Refactor staking ledger (#1484) Paired-key Crypto Scheme (#1705) Include polkadot version in artifact path (#1828) add link to rfc-0001 in broker README (#1862) Discard `Executor` (#1855) Macros to use path instead of ident (#1474) Remove clippy clone-double-ref lint noise (#1860) Refactor alliance benchmarks to v2 (#1868) Check executor params coherence (#1774) frame: use derive-impl for beefy and mmr pallets (#1867) sc-consensus-beefy: improve gossip logic (#1852) Adds instance support for composite enums (#1857) Fix links to implementers' guide (#1865) Disabled validators runtime API (#1257) Adding `try_state` hook for `Treasury` pallet (#1820) ...
|
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-release-analysis-v1-3-0/4614/1 |
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.
The runtime code of a parachain can be replaced on the relay-chain via:
[cumulus]: enact_authorized_upgrade; this is used for a runtime upgrade when a parachain is not bricked.
[polkadot] (these are used when a parachain is bricked):
Polkadot signals a parachain to be ready for a runtime upgrade through the GoAhead signal.
When in cumulus
enact_authorized_upgradeis executed, the same underlying helper function offorce_schedule_code_upgrade&schedule_code_upgrade: schedule_code_upgrade, is called on the relay-chain, which sets theGoAheadsignal (if the pvf is accepted).If Cumulus receives the
GoAheadsignal from polkadot without having thePendingValidationCodeready, it will panic (ref). Forenact_authorized_upgradewe know for sure thePendingValidationCodeis set. On the contrary, forforce_schedule_code_upgrade&schedule_code_upgradethis is not the case.This PR includes a flag such that the
GoAheadsignal will only be set when a runtime upgrade is enacted by the parachain (enact_authorized_upgrade).additional info: paritytech/polkadot#7412
Closes #641