Dan Shields
Support Eng. @ Parity.io
Steward @ Cryptorado.org
@nukemandan // dan.shields@parity.io
Presentation Adapted from Joshy Orndorff (github.com/joshorndorff).
Extensible, Modular, Frameworks in Rust: Substrate's Approach for Blockchains
A quick review of blockchains
Blockchain nodes need:
BODY
Block 42
HEADER
BODY
Block 43
HEADER
BODY
Block 41
HEADER
Block 41
Parity has a lot of blockchain building experience...
github.com/openethereum/
OpenEthereum
github.com/paritytech/
parity-bitcoin
github.com/paritytech/
polkadot
From Polkadot, came Substrate.
What is Substrate?
Substrate is an open source, modular, and extensible framework for building blockchains.
( )
What is Substrate?
Substrate provides all the core components of a Blockchain:
Each of which can be customized and extended.
Substrate is built using Rust and Wasm.
+
Architecture of a Substrate Node
libp2p
Written in Rust
Built into Wasm�(& native)
Written in Rust
Built into native
5
Application logic that makes this chain special
Runtime
Tx Pool
jsonRPC
Consensus
Block Storage
The Substrate Runtime
The runtime is the block execution logic of the blockchain, a.k.a. the State Transition Function.
5
sudo
grandpa
indices
system
babe
balances
It is composed of Pallets.
RUNTIME
Mix and Match Pallets | |||
assets | babe | balances | collective |
contracts | democracy | elections | grandpa |
evm | grandpa | indices | membership |
offences | session | staking | sudo |
system | timestamp | treasury | and more... |
timestamp
(this branch w/ nick’s added)
Substrate Hands-on!
Tutorials and More
Join Substrate’s
Matrix Channel
Recap most recent dev conference ^^
Keynote is great overview: https://www.crowdcast.io/e/axvfinsv/2
Earn while you learn!
Cash prizes!
The Local Blockchain Community:
Additional Slides
Analogy: Blockchains as Computers
Think of a blockchain network as a single computer with many simultaneous users
...a mainframe
Use Substrate to design optimized computers
…with easy networking between computers
Substrate enables creation of
a network of Blockchains.
Each optimized for a specific purpose
Custom built, optimized, computers
Communicate via a relay
Single machine, with
only EVM smart contracts
Write Parachains with Substrate
Cumulus turns your runtime into a Polkadot Parachain:
In progress...
Parachain
Parachain
Architecture of Polkadot
Relay Chain
Architecture of a Substrate Node
libp2p
Written in Rust
Built into Wasm�(& native)
Written in Rust
Built into native
5
Application logic that makes this chain special
Runtime
Tx Pool
jsonRPC
Consensus
Block Storage
Substrate Consensus
Who may author new blocks and when?
When are blocks considered final?
Consensus
Authoring | Finality |
PoW | Grandpa |
Aura | Cumulus / Polkadot |
Babe | |
Sassafras | |
Manual Seal | |
Aura
Grandpa
Hard Fork Upgrades
Some nodes upgrade their software
OLD LOGIC
OLD LOGIC
OLD LOGIC
OLD LOGIC
OLD LOGIC
OLD LOGIC
NEW LOGIC
NEW LOGIC
NEW LOGIC
NEW LOGIC
Forkless Upgrades
Upgrade is processed� On Chain
OLD LOGIC
OLD LOGIC
OLD LOGIC
NEW LOGIC
NEW LOGIC
NEW LOGIC
Governing Runtime Upgrades