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 the
set_code function. 由于节点更新到 runtime 状态受区块链的共识机制和密码学相关的一些限制，网络参与者可以使用区块链就能实现无需私下信任就能更新或扩展 runtime 逻辑，而不需要分叉该链或发布一个新的区块链客户端。
本教程将使用 Substrate 开发者中心的 Node Template 来演示两个基于 FRAME的 runtime 无分叉升级机制 。 First, the
sudo_unchecked_weight function from the Sudo pallet will be used to perform an upgrade that adds the Scheduler pallet. Then, the
schedule 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 monitor the
substrate tag on Stack Overflow. 还可以在
subport Github仓库 上提交問題。
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.