Why DevOps Make Perfect Sense for the Substrate Ecosystem

Muthee Vincent
Nerd For Tech
Published in
3 min readSep 28, 2020
https://substrate.dev

Traditional blockchains usually face a major challenge when it comes to upgrading the underlying chain technology, often referred to as blockchain hard forking. This is mainly because altering the core protocol code-base usually require a lot of consensus coordination between network nodes for the improvement proposal to take effect. Case in point, the infamous Ethereum DAO hack that led to a hardfork split the Ethereum community into Ethereum (ETH) and Ethereum Classic (ETC). By splitting the network, the fork severely weakened the corresponding Ethereum network security.

There are however numerous reasons we may need to upgrade blockchains:

1. Fix critical security flaws

2. Change core protocol rules

3. Add new blockchain functionality

4. Repair the chain state

Today, a new blockchain building framework, the Parity Substrate promises to solve this ecosystem-wide problem by ushering in the forkless blockchain upgrade future. The substrate is an open-source, modular, and extensible framework for building custom blockchains. The substrate provides all the core components of a blockchain — the database layer, networking layer, consensus engine, transaction queue, and a library of runtime modules.

SubOps (Substrate Runtime + DevOps)

The substrate is an open-source framework that lets you build entire, configurable blockchains in minimal time. Optionally, you can join the Polkadot network as a para chain — for pooled security and interoperability with other connected blockchains.

DevOps is the modern software development methodology whose core tenets can be generally summarized as ‘continuous everything’, including:

  • Continuous development
  • Continuous integration
  • Continuous delivery

The Substrate Runtime, the block execution logic of the blockchain, is composed of Runtime Modules and is also known as the State Transition Function. Pallets are the special kind of Rust modules from which Substrate runtimes can be composed. Each pallet has its own discrete logic which can modify the features and functionality of your blockchain’s state transition function.

For example, the Balances pallet, which is included in the Framework for Runtime Aggregation of Modularised Entities (FRAME), defines a cryptocurrency for your blockchain. More specifically, it defines storage items that track the tokens a user has, functions that users can call to transfer and manage those tokens, APIs which allow other modules to burn or mint those tokens, and hooks which allow other modules to trigger functions when a user’s balance changes.

You are able to write custom pallets that define logic and functionality you want to introduce to your blockchain.

Runtime upgrades usually involve adding a special transaction with upgrade instructions in the target chain extrinsic. However, the runtime upgrade mechanism for Substrate parachains is quite different from that of standalone chains since parachain consensus follows the finality gadget of the relay chain.

Conclusion

Since the Substrate Runtime code is accessible through on-chain governance, Substrate-based chains can conveniently perform frequent, forkless blockchain upgrades, thereby maintaining the cohesion of the network’s community while consistently improving their technology.

--

--

Muthee Vincent
Nerd For Tech

I’m a passionate blockchain/cryptocurrency researcher and developer. Have an in-depth technical understanding of the underlying blockchain technology stack.