5

I have been upgrading my parachain many times over the last few days with no issue at all. I have been using Polkadotjs Apps for this also running on my local machine.

My process is that I use the Sudo user in the Sudo pallet and by selecting the Sudo(Call) extrinsic I can select the ParachainSystem pallet.

From there I can authorize a hash of the x_runtime.compact.compressed.wasm, before enacting the upgrade. In every case until now it has worked and I have been able to test the new functionality I added.

However, my latest upgrade attempt gives me this "Incomplete Execution" error (I note a spelling error in the actual message). The actual file size is 570,166 bytes so should be well within the limits mentioned in this issue . I am not sure what this warning means exactly - but I can confirm that the upgrade does not happen.

Below are two screenshots of the message and the resulting event message.

enter image description here

enter image description here

1 Answer 1

5

While I don't know for sure what the "incomplete execution" error means. I think we can conclude that from your given context it means that the actual sudo transaction was executed successfully, but the wrapped call returned an error. As you show in your screenshot the error is:

Module {
  index: 1,
  error: 0,
}

This error means that a pallet has returned an error. The index is the index of the pallet in the runtime. System is always at index == 0 and it is safe to assume that you have ParachainSystem at index == 1. So, we need to check the error type in parachain system:

#[pallet::error]
pub enum Error<T> {
    /// Attempt to upgrade validation function while existing upgrade pending
    OverlappingUpgrades,
    /// Polkadot currently prohibits this parachain from upgrading its validation function
    ProhibitedByPolkadot,
    /// The supplied validation function has compiled into a blob larger than Polkadot is
    /// willing to run
    TooBig,
    /// The inherent which supplies the validation data did not run this block
    ValidationDataNotAvailable,
    /// The inherent which supplies the host configuration did not run this block
    HostConfigurationNotAvailable,
    /// No validation function upgrade is currently scheduled.
    NotScheduled,
    /// No code upgrade has been authorized.
    NothingAuthorized,
    /// The given code upgrade has not been authorized.
    Unauthorized,
}

The error: 0 means that is was the variant at 0 in the given enum, so it should be OverlappingUpgrades. This means that you already have scheduled a runtime upgrade. For Parachains the runtime upgrades are not applied directly, they need to wait until the relay chain has given the go to apply the runtime upgrade. This minimum time between registering the runtime upgrade and when it is applied is the validation_upgrade_delay of the relay chain HostConfiguration. If you are running a test local relay chain network, you can override this value at genesis or also later at runtime.

2
  • I'm running the vanilla Rococo Local Relaychain and this appeared to be almost as soon as the upgrade transaction was in the block - however I have been doing many over the course of testing/fixing - is there a limit or can I check/purge a pending upgrade?
    – T9b
    Mar 21, 2022 at 11:16
  • 1
    There is currently no automatic way to stop a pending upgrade. You would need to modify the storage manually on the relay chain and the parachain.
    – bkchr
    Mar 21, 2022 at 11:39

Your Answer

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

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