Substrate 1.0 Beta is now available from Parity Technologies (Parity). Substrate is an open-source tech stack which simplifies the creation of a blockchain customised for specific applications.
“Substrate takes all of our lessons learned in building Ethereum and Polkadot and distills that down into a stack of tooling that allows you to get all of those same rewards… for free.
“I really hope that by pushing out Substrate, we can create a whole new class of sort of development teams and development applications that sit right in the sweet spot between the two where you don’t have to know everything, you don’t have to do everything to develop your whole new blockchain, but you can do just enough that you do have a domain-specific chain, that has its own parameterization, and its own features that allow you to get a particular job done, and done well, that wouldn’t have been possible before because smart contracts are too bloaty, and writing your own chain is too much work,” — Dr. Gavin Wood, Co-founder of Parity Technologies, Polkadot and Ethereum.
Designed for freedom and ease
Parity architected Substrate to:
- be as generic as possible
- provide technical freedom when designing a blockchain.
Substrate also generalises consensus. Parity claims the API can:
- enable developers to ‘roll their own consensus system’
- handle most consensus algorithms which currently exist.
Substrate 1.0 Beta on release offers a combined Aura/GRANDPA consensus, with additional consensus algorithms coming subsequent releases. It offers a light client out-of-the-box so that a blockchain can work natively on mobile devices. There is pooled security and interoperability via integration with the Polkadot protocol.
Substrate Core is the minimal Substrate base for building blockchains. Substrate Core offers a foundation which should be far easier to work with than building a blockchain from scratch (though it does not result in a finished blockchain). This includes:
pervasive and secure networking via libp2p
- light client
- block synchronisation
- extensible JSON-RPC API endpoints
- transaction queue and block production mechanism
- sandboxed WebAssembly interpreter
- interchain connectivity (via the Polkadot protocol)
- crypto primitives library
- chain specification and versioning
- pluggable consensus (see above)
- substrate Runtime Module Library (SRML).
SRML, Polkadot and Substrate Node
The core architecture of Substrate separates the basic functionality of a network blockchain node and the chain-specific implementations by executing the latter in a separate WebAssembly environment. Developers the freedom to write the chain logic in any language that can compile down to WebAssembly (Rust, C/C++, C#, Go, etc). With the SRML you can:
- add modules
- take off-the-shelf components and plug them together
- build the type of blockchain that does what you want it to do.
Initial modules include:
- Accounts & Balances – basic cryptocurrency, including account management and viewing
- Assets – simple, secure additional on-chain fungible assets
- Consensus – setting and modifying runtime code and storage (i.e. the set of authorities as a list of session keys on-chain), and reporting offline or misbehaving validators
- Contracts – turbo-charged Wasm-based smart contracts
- Council – council election and proposals
- Democracy – public proposals and referendums
- Sessions – key rotation for authorities
- Staking – Proof-of-Stake logic, including both staking and nominating of validator accounts
- Timestamp – have your chain know about time
- Treasury – decentralised grants, similar to a DAO.
The example Parity gives is for a Proof-of-Stake smart contract blockchain. For this a developer would take Substrate Core and plug in the Accounts & Balances, Staking and Contracts modules. Once Polkadot has become available (a future), developers can make a blockchain interoperable – by plugging it into Polkadot.
The Substrate Node enables a developer to deploy a blockchain with ease. In the future Parity says it will be possible configure the Substrate Node with a JSON file.
Enterprise Times: what does this mean
Substrate 1.0-beta is currently licensed under GPLv3. In keeping, however, with the objective that Substrate should enable maximum developer freedom, the Substrate repo will transition to an Apache 2.0 licence. This will allow for commercial use, distribution, modification, patent use as well as private use. The Parity hope is this will open the door for Fortune 500 companies to adopt the technology (unsurprisingly, Parity offers professional services to organisations interested in building with Substrate).
In an environment where real blockchain implementation is proving harder than free-form discussion of blockchain’s abstract benefits, all and any tools which facilitate or simplify blockchain development are welcome. How easy Substrate will be to exploit will require objective experience. Enterprise Times will be interested to hear from any developers who would like to comment.
“ Substrate takes […]