Substrate has its method to upgrade the runtime. Stability has built some tools for upgrading the runtime easier.
You can read the guide to upgrade a substrate based chain here
Stability has created the pallet pallet-upgrade-runtime-proposal to allow any member of the TechCommittee to propose a code. To propose a code a member of the TechCommittee has to submit the extrinsic propose_code.
There is no method to accept a proposed code and apply it immediately. To accept the proposed code, a block in which the code must be applied must be submitted. Stability has created two methods to accept a proposed code. The first method uses the extrinsic set_block_application from pallet-upgrade-runtime-proposal using root origin. The other way is using the EVM precompile precompile-upgrade-runtime-controller in the address 0x0000000000000000000000000000000000000806 calling the function setApplicationBlock(uint32). setApplicationBlock(uint32) must be called from the owner address.
There are two methods to reject a proposed code. The first method uses the extrinsic reject_proposed_code from pallet-upgrade-runtime-proposal using root origin. The other way is using the EVM precompile precompile-upgrade-runtime-controller in the address 0x0000000000000000000000000000000000000806 calling the function rejectProposedCode(). rejectProposedCode() must be called from the owner address.
- member:
TechCommitteemember - owner:
precompile-upgrade-runtime-controllerowner - precompile:
precompile-upgrade-runtime-controller - pallet:
pallet-upgrade-runtime-proposal
sequenceDiagram
participant member
participant owner
participant precompile
participant pallet
member ->>pallet: propose_code
owner ->> precompile: setApplicationBlock(uint32)
sequenceDiagram
participant member
participant root
participant pallet
member ->>pallet: propose_code
root ->> pallet: set_block_application