What is Substrate Framework?
The Polkadot Blockchain Framework

Substrate is a web application framework, but to build distributed or decentralized systems like cryptocurrencies or a message bus.

substrate framework polkadot kusama

Just like most web applications shouldn’t need to reimplement their own version of HTTP, Substrate tries to eliminate wasted effort and simplify the creation of new blockchains so you don’t have to implement all the network and consensus code from scratch.

This means significant savings in resources and speeds up the implementation of new networks…

Substrate has been developed by Parity and, although it is closely related to Polkadot, it is not part of the same system. In fact, Polkadot is built with Substrate and projects built with Substrate can run natively on Polkadot, but Substrate can also be used to build new blockchains.

Advantages of using Substrate Framework to build your blockchain

Using substrate can save a lot of development costs as it includes systems of:

  • Consensus, finality, and block voting logic: means that for free you can get Byzantine fault tolerance, so your system will continue to function properly even if some of the nodes in it are broken, disabled, or malicious
  • P2P Networking
  • Efficient, deterministic, and sandboxed WebAssembly runtime: Can be used to run smart contracts or even run other Substrate-based projects. No need to use WebAssembly, of course you can write your own virtual machine interpreter
  • Ability to run a node in the browser that can communicate with any desktop or cloud node
  • Cross-platform file storage/database abstraction, that even works in the browser
  • Seamless updates: any update that could affect the consensus is managed by compiling the code in WebAssembly and deploying it as a message on the network. Not only that, but you can store as many versions of the consensus code as you want to compile into native code, and Substrate will take care of the complexity of making sure the native code that is executed aligns with the currently deployed WebAssembly code. . You get the speed of native code, but because there’s always a WebAssembly fallback, you can deploy a native version of the code at your own pace and be sure you never accidentally get a hard fork or other consensus issues.
  • Ability to immediately start running your project in Polkadot the moment it is released. Although projects built with Substrate can be compiled to use separate clients per project (as existing blockchains do), because Polkadot implements the Substrate API you can take advantage of the shared security and interoperability that Polkadot provides. Polkadot is being built using Substrate, which allows us to get quick feedback on any holes in the framework and allows us to run a Polkadot testnet or even a second instance of Polkadot as a parachain. If you don’t know about Polkadot or if you haven’t been advertised enough about its benefits, you can check out this post on the Polkadot blog.

What is not what you have to develop / customize with Substrate?

Substrate has pretty much everything, it’s just missing the state machine. This means that for Substrate to be as generic as possible, it has no transactions. Instead it has “extrinsics”, which are nothing more than binary blocks that you can use to store any data you want. For most chains, these extrinsics will include transactions, but of course they don’t need to be implemented that way.

You could eliminate the concept of a network currency altogether and use Substrate to create a decentralized concurrent system in the style of the Erlang actor model, with a set of trusted authorities to verify the correct behavior of the network.

However, assuming you want currency and transactions, implementing the transaction format is pretty straightforward: just an exchange format and a library to access that data from a language of your choice. It’s even easier than other distributed architectures like microservices – since the code and data it operates on are stored in the same place, you don’t need to apply backward compatibility guarantees for transactions, only for storage. For chains with private transactions the implementation can be more complex.

Polkadot news, guides, and community content at Artickusama.com

Links
Share this content!
Twitter
LinkedIn
RELATED CONTENT