1

We've tried to use the scheduler pallet using both enact_authorized_upgrade and setCode, but because the scheduler pallet executes on_initialize and it appears that the upgrades cannot happen without the validation data which doesn't exist yet on_initialize (See: Runtime upgrade error: parachainSystem.ValidationDataNotAvailable)

Is there some other way that I have missed to be able to predetermine the block of a sudo upgrade?

2 Answers 2

2

Is there some other way that I have missed to be able to predetermine the block of a sudo upgrade?

If you want to use scheduler, you have to use authorize_upgrade and then anyone can send the enact_authorized_upgrade transaction. However, exactly determining the point on when the runtime upgrade will happen is not that easy. When the Parachain has signaled to the relay chain the intend to upgrade, there is some minimum time until the upgrade is applied. However, as the majority of relay chain validators need to approve the upgrade (to check that it compiles etc), the actual time between signaling and enacting can be longer.

TDLR, you can not predetermine for sure the exact block when it will happen.

1

Parachains need to schedule runtime upgrades with the relay chain. This process is already handled for you with a set of custom extrinsics coming from the parachain-system pallet.

There are details here: https://decentration.medium.com/how-to-make-a-parachain-runtime-upgrade-2b0e063fe1f7

1
  • Ah that "schedule" for runtime upgrade is scheduling with the relay chain. I kept trying to understand how it worked with the scheduler pallet.
    – Wil W
    Oct 17, 2022 at 12:19

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.