Exercise 04

Objectives: runtime update

Needs: Exercise 03

Content: In this exercise, we're going to meet a crucial mechanism: updating runtime for a live chain.

Start chain without banishment pallet (e.g. from main branch). Then perform runtime update according to 3 scenarios (for each you will have to restart the chain from the scratch). The target runtime is the one introducing banishment.

  1. Use our tool cliain to update runtime, but make sure that the spec_version of your new runtime is the same as the one on main. You shouldn't observe any updates (in particular, you shouldn't be able to interact with the new pallet). Nevertheless, you should check that indeed, setCode extrinsic has been placed in some finalized block.

  2. Use our tool cliain, but this time with bumping spec_version. Assert that the new pallet is available and works correctly.

  3. Update runtime using UI page for submitting extrinsics. Again, assert that the new pallet is available and works correctly.

Hint

If you are observing errors while updating runtime with UI, try to check what's the weight of system.setCode call.

You can launch cliain with cd bin/cliain && cargo run --release.

References:

Last updated

Was this helpful?