Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Do not allow upgrading to the same code #863

Open
pepyakin opened this issue Dec 16, 2021 · 4 comments
Open

Do not allow upgrading to the same code #863

pepyakin opened this issue Dec 16, 2021 · 4 comments

Comments

@pepyakin
Copy link
Contributor

paritytech/polkadot#4457 will impose an additional constraint on upgrading: the parachain won't be able to upgrade to the same code. While this is silly, if attempted, this will most likely break the parachain. Thus parachain-system should protect the users from doing that.

@bkchr
Copy link
Member

bkchr commented Dec 16, 2021

Why will that break the parachain? Why isn't that just rejected by the relay chain if it doesn't want this? Just send the signal that the upgrade was rejected?

@pepyakin
Copy link
Contributor Author

Yeah, this is exactly the problem: the relay-chain will reject such an upgrade. Parachain will break because it won't receive a GoAhead::Abort signal. The relay-chain does not the abort signal because of technical reasons: right now the code structured in such a way, that signals set in schedule_code_upgrade will be removed in note_new_head. I pitched an idea to reverse their order but was told that it is too big of a change.

We can try to work on this issue more, but I figured it would be just easier to forbid this.

@bkchr
Copy link
Member

bkchr commented Dec 16, 2021

Okay, it will not break, more being stuck in a wait loop for the signal.

@pepyakin
Copy link
Contributor Author

Ah, that's right, stall.

Which makes me think that we should add some recovery functions for that as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants