7

A parachain had an upgrade schedule on a relay chain, but the upgrade did not go through, forcing the parachain to stop producing blocks. I tried forcing a new validationCode using SUDO, but that did not work either, and the parachain is still waiting to upgrade.

enter image description here

What's the best solution to unbrick the chain? I don't need to recover any of it's state and ideally I want to remove it. For reference this is the current (March 23 2022) status of paraID 2000 on Rococo.

1 Answer 1

5

The issue appears to be that you have put your chain into an expected state, which it cannot resolve.

When calling schedule_para_cleanup we check:

// Disallow offboarding in case there is an upcoming upgrade.
//
// This is not a fundamential limitation but rather simplification: it allows us to get
// away without introducing additional logic for pruning and, more importantly, enacting
// ongoing PVF pre-checking votes. It also removes some nasty edge cases.
//
// This implicitly assumes that the given para exists, i.e. it's lifecycle != None.
if FutureCodeHash::<T>::contains_key(&id) {
    return Err(Error::<T>::CannotOffboard.into())
}

I am seeing that Para 2000 on Rococo does have a FutureCodeHash:

enter image description here

So the chain cannot be cleaned up until this is removed.

I am not sure how you got in this state, and it would be good for you to share that so that we may potentially handle these state transitions in the runtime better, but for now, probably you need to use Sudo to remove this storage item manually, and then you can offboard your chain.

3
  • Thanks! This was actually an external team testing runtime upgrades, and I actually need this paraID to onboard another team to the network. Not sure how it got to this point, but I'll try and remove the storage item manually. Mar 24, 2022 at 8:26
  • Would still be good if we can do a basic check on how this happened, since we would never want this state to be reached on Polkadot or Kusama.
    – Shawn Tabrizi
    Mar 24, 2022 at 13:49
  • The discussion tho that case was on this post: substrate.stackexchange.com/questions/859/… Mar 24, 2022 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.