One of the defining features of the Substrate blockchain development framework is its support for forkless runtime upgrades. Forkless upgrades are a means of enhancing a blockchain runtime in a way that is supported and protected by the capabilities of the blockchain itself. A blockchain's runtime defines the state the blockchain can hold and also defines the logic for effecting changes to that state.
Substrate makes it possible to deploy enhanced runtime capabilities (including breaking changes(!))
without a hard fork. Because the definition of the
runtime is itself an element in a Substrate chain's state, network participants may update this
value by way of an extrinsic, specifically
Since updates to runtime state are bound by the blockchain's consensus mechanisms and cryptographic
guarantees, network participants can use the blockchain itself to trustlessly distribute updated or
extended runtime logic without needing to fork the chain or even release a new blockchain client.
This tutorial will use the Substrate Developer Hub
Node Template to explore two
mechanisms for forkless upgrades of FRAME-based runtimes.
function from the Sudo pallet will be used to perform an
upgrade that adds the Scheduler pallet. Then, the
function from the Scheduler pallet will be used to perform an upgrade that increases the
existential (minimum) balance
for network accounts.
If you have problems with this tutorial, the Substrate community is full of helpful resources! We
maintain an active
Substrate Technical chat room and
substrate tag on Stack Overflow. You can
also use the
subport GitHub repository to
create an Issue.
Please do note that your problem may already solved on stackoverflow or subport,** do a search first for keywords in your error messages and concepts, and if you found them useful as well, comment to let us know that it's a common issue to escalate for a fix.**
Before You Begin
To get a sense of what they are more concretely, read the runtime upgrade documentation first, or at least have it open as a reference as you progress.
If you haven't already, you should complete these tutorials before this one:
- Create Your First Substrate Chain - that will guide you through the process of setting up your development environment.
- Add a Pallet to Your Runtime - that will introduce the FRAME system for runtime development and guide you through the process of extending the capabilities of a FRAME runtime by adding a pallet.