2

I'm trying to execute a runtime upgrade on a running parachain. I'm using the cumulus parachainSystem pallet to do, using the authorize -> enact flow.

My parachain have the contracts pallet, with the standard migration.

The steps I'm doing are the following:

  1. I'm just modifying the spec_version, without adding or removing any pallet.
  2. Then I run cargo build --release -p <runtime pkg> to build the new runtime blob.
  3. To execute the authorize_upgrade, I get the smallest file generated by the command above. Which the file name is something like <runtime pkg>.compact.compressed.wasm
  4. I execute the enact_upgrade call, and here is where the problem starts!

I've got mixed outputs, doing with and without the scheduler pallet.

It outputs this error first: enter image description here And it tries to collate over and over until the error Import failed: State Database error: Too many sibling blocks inserted start appearing. enter image description here

I've tried using the scheduler already, but I'm probably doing something wrong? How can I properly set the scheduler with the auth -> enact flow, to successfully execute the runtime upgrade in the parachain?

I'm calling using sudo, like this: authorize_upgrade

The steps I'm doing:

The upgraded runtime just have the spec_version increased, no pallets removed/addded.

  1. Scheduled a authorize_upgrade call, to be executed in n+5 blocks.
  2. Waited the execution of the n+5 block.
  3. After, scheduled the enact_authorizeto be executed in n+10.

When the second scheduled call happens, it keeps starting collation until the too many siblings error starts popping up.

Is the order right? Do I need to make a set_code call in the Parachain, before or after the auth/enact?

1

1 Answer 1

1

Looks like your migration is "too long". You may need to try a different migration strategy.

More on this can be found here:

6
  • I've already followed those instructions. The only needed calls to execute the parachain upgrade, must be done only in the parachainSystem pallet? There is no need to make extra calls on the relay? Or calling a set_code after or between the auth -> enact flow? Nov 10, 2022 at 17:58
  • When I'm executing with the scheduler pallet, I run in this sequence: scheduled a call, auth_upgrade, to block n + 5. after the block n+5, I then scheduled another call to enact in again, n+5 blocks. What is the correct order to make those calls? Nov 10, 2022 at 18:01
  • 2
    The issue is not with the calls. You have them correct. This issue is with the migration. Your migration most likely takes up more than what one block can hold.
    – Bruno
    Nov 10, 2022 at 18:56
  • 1
    This may help: substrate.stackexchange.com/questions/5852/…
    – Bruno
    Nov 11, 2022 at 19:36
  • 1
    Thank you very much for the help and support Bruno! The 5852 you posted is so damn good, I was able to understand de facto the processes. Thanks again, and I was able to execute a runtime upgrade using zombienet. Nov 18, 2022 at 15:37

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.