Substrate Release Deep-Dive is a new series of posts highlighting notable updates to the Substrate and FRAME codebases. In each edition, we’ll guide you through some of the most recent pull requests and look at new features and capabilities introduced since the previous release.
Substrate has come a long way since Parity co-founder Dr. Gavin Wood first demonstrated its capabilities in 2018 with Substrate v1.0. After a series of release candidates in recent months, Substrate 2.0 has officially been released, marking a major milestone for the blockchain framework. In this post we’ll take an in-depth look at some of the most impactful pull requests introduced in recent release candidates and included as part of the current version of Substrate 2.0. These features are just a few of the most recent highlights; for an overview of the functionality introduced from v1.0 to v2.0, check out our Substrate 2.0 announcement post.
Bounty protocol for the Treasury pallet
The FRAME Treasury pallet defines an account that may be used by an on-chain governance body to manage network funds. One of the most exciting capabilities released as part of v2.0.0 is a bounty protocol that enables this account to create and fund sets of objectives. The protocol was defined and implemented by seasoned Substrate contributor Bryan Chen, better known as xlc on GitHub. The Treasury pallet is used on both Kusama and Polkadot, and the new bounty capabilities will unlock some exciting funding opportunities for the Substrate developer community.
A proxy is a mechanism that allows an account to delegate the ability to perform actions on its behalf. Dr. Gavin Wood, the creator of Substrate, authored a PR that introduced a powerful new risk management feature to the Proxy pallet: time-delayed proxies, which announce their intent to perform a delegated action and provide a time window during which time they may be cancelled. If you’d like to learn more about proxies, including the access control capabilities of anonymous proxies, there are three videos about proxies in the Technical Explainers playlist on the Polkadot YouTube channel.
GRANDPA finality subscription RPC
A new RPC (remote procedure call) subscription endpoint has been added to Substrate’s implementation of the GRANDPA finality gadget for deterministic consensus. This new feature was co-written by Jon Häggblad (@octol on GitHub) and Hernando Castano, and is part of a larger effort to support Substrate’s bridge library for cross-chain interoperability. Jon authored a follow-up PR to add an RPC endpoint that can be used to “catch up” with finality justifications in the event that the connection to the subscription endpoint is lost. Learn more about bridges by reading about the Rialto bridge test network and watching a demonstration of it in action.
Feeless runtime upgrades
One of the defining features of Substrate is its support for forkless runtime upgrades, which require an updated runtime to be submitted to the chain in the form of a transaction. In order to make it easier to participate in the governance of Substrate-based chains, Substrate core developer Shawn Tabrizi recently introduced a new feature that allows runtime engineers to define transactions that may be feeless upon success. Shawn followed up with an additional enhancement that applied this feature to the function used to submit updated runtimes.
Precompiles for the EVM pallet
The FRAME EVM pallet now supports the four basic built-in smart contracts known as “precompiles”: ecrecover, identity, ripemd160 and sha256. This enhancement was written by the lead developer of the EVM pallet, Wei Tang (@sorpaas on GitHub), who has also made major contributions to the Rust EVM implementation and the OpenEthereum client.
Wei authored another PR that introduced the tracing and tracing-subscriber libraries to the Substrate codebase. The improved logging capabilities were consumed in a follow-up PR by Benjamin Kampmann (@GNUnicorn on GitHub) that implemented improved logging and tracing capabilities for Substrate Wasm runtimes. Both of these changes will contribute to end-to-end state tracing that will make it easy to associate a transaction with the storage changes it caused.
Request/response networking protocols
Substrate developers working at the networking layer now have access to dependable request/response networking protocols. This enhancement was authored by Substrate core developer Pierre Krieger (aka @tomaka on Github), long-time contributor to the Rust implementation of the libp2p library that Substrate’s networking capabilities are built upon. Another long-awaited improvement made by Pierre is the removal of the dependency on legacy substreams, which is part of a larger strategy around the deprecation of these substreams.
Learn more about the powerful features and capabilities of Substrate 2.0 on October 15th at Sub0 Online, the Substrate developer community conference. The multi-track program features talks and workshops by Substrate and Polkadot developers and ecosystem builders for all levels of experience, from Substrate beginner to Substrate pro. You can also get in touch with Substrate core developers on the Substrate Technical Element channel.