Crate runtime_upgrade

source ·
Expand description

This is a small pallet that handles runtime upgrades in chains that want to support them.

Right now this method is entirely unprotected (except by the verifier) which may not be realistic enough for public production chains. It should be composed with some governance mechanism when one is available.

It is not possible to adhere perfectly to the UTXO model here, because the wasm code must be stored in the well-known :code key. We stick as closely as possible to the UTXO model by having a UTXO that holds a hash of the current wasm code. Then we pass the full wasm code as part of the constraint checker and write it to the well-known key as a side effect.

Structs§

  • The sole constraint checker for the runtime upgrade. It confirms that the UTXO being consumed points to the correct current wasm and creates a new UTXO for the new wasm.

Enums§