Tomasz Drwiega
@tomusdrw
Parity Technologies
23.01.2018,
Ethereum Meetup Warsaw
Blockchain technology for Web 3.0
Web 3.0 ?
A vision of trust-free, decentralized Internet
Web3 Foundation
Research, develop, deploy, advocate and steward the set of protocols and technologies that comprise Web3
Web3 Foundation
- Trust-free core technologies such as Polkadot
- Cryptographic messaging protocols such as Whisper
- P2P networking infrastructure such as libp2p and devp2p
-
Crypto-economic mechanisms such as DAC/DAO
-
Data publication systems such as IPFS
hello@web3.foundation
Web3 Foundation
&
Parity Technologies?
Separate entities, but Parity is developing the initial implementation of Polkadot
5 key challenges of current blockchain technology
-
Scalability
processing, bandwidth and storage -
Isolability
can the same framework be applied to all problems?
-
Developability
are there easy to use tools and APIs -
Governance
Is it flexible? Can it evolve and adapt? -
Applicability
Is middleware necessary?
I want to build a blockchain!
-
Networking - The Boring Part
- libp2p, devp2p
-
State Transition - The Unique Part
- What kind of state do you need? (UTXO / Full)
- What "transaction" is?
- How to process transactions to get new state
-
Consensus - The Security Part
- How to decide which state is the latest/canonical?
- Who can mint new blocks?
I want to build a blockchain!
Even if you manage to build it you're blockchain will be completely isolated.
Security of your blockchain will depend on the amount of miners / validators you manage to convince to join you.
How can I do better?
Why do you need to build a new blockchain in the first place?
- Existing solutions are not Scalable and Isolated
- Too expensive / too slow - need for custom State Transition
It's because State Transition is currently tightly coupled with Consensus Logic!
With Polkadot?
-
Networking-
Provided by Polkadot
-
-
State Transition
- What kind of state do you need? (UTXO / Full)
- What "transaction" is?
- How to process transactions to get new state
-
Consensus-
Canonicality provided by Polkadot
-
Just focus on your State Transition
Polkadot
Many chains can be connected to Polkadot.
They are called Parachains.
You delegate canonicality to Polkadot
Relay Chain and gain from pooled security
Connect the dots
How does it work?
- Polkadot = Proof-of-Stake Relay Chain
- Validators create new blocks on the Relay Chain
- Nominators vouch for good validators
Relay Chain
Block 1
Block 2
Nominators
Validators
Bonded Validators (backed by Nominators) come to a consensus over the next block on the Relay Chain
What a Relay Chain is NOT?
- Not a generic state-transition chain
(doesn't have programmable smart contracts) - Doesn't even have transfers
(you cannot move coins to arbitrary addresses)
What a Relay Chain is?
- Manages validators bonds (PoS) and punishes for misbehaviour
- Stores latest/canonical state of each parachain
- Assigns validators to be responsible for parachains
- Manages connected Parachains (governance)
Relay Chain
Block 1
Block 2
Parablock #3
Parablock #5
Parablock #4
Parablock #2
Consequences
- Parachains = Parallel-chains (run concurrently)
- Parachains can have super-complicated/super-specific state transitions
-
Parachains use pooled security
canonicality info is included in the relay chain by validators -
Parachains don't need to leak private data
Private blockchains can anchor blocks in relay chain
What's even cooler?
Parachains can emit messages and receive messages emitted by other parachains. Trust-free.
Private bank parachain confirming identity details on identity parachain.
What's even cooler?
Such messages can cause DOT tokens to be moved from or into a parachain.
You can move DOTs to a transfer-specific parachain (where transferring is cheap)
How does it work?
- Relay-chain stores a "validation function" for parachain (WASM code)
-
validate( previousHeader, proposedHeader, witnessData, ingressQueue ) returns (bool, egressQueue)
- Validators "validate" parachain transitions and include new headers to the relay chain.
- Parachain nodes are light-clients of Relay Chain to verify canonicality of the blocks
Issues
-
How do validators get the parachain data?Validators are randomly assigned to parachains
It's not possible to synchronize them so fast (or even connect to them)
-
What if validators groups lie about a parachain?
Data availability, or result of validation function
✓ Solved
-
How do validators get the parachain data?Validators are randomly assigned to parachains
It's not possible to synchronize them so fast (or even connect to them)
-
What if validators groups lie about a parachain?
Data availability, or result of validation function
COLLATORS
FISHERMEN
Incentives
-
VALIDATORS
Bonded actors coming to consensus over blocks in the Relay Chain
-
NOMINATORS
Select good validators and contribute to their bonds
-
COLLATORS
Collect fees on specific parachains if their block is included to the Relay Chain
- FISHERMEN
High (but rare) reward for detecting and reporting misbehaviour on the Relay Chain
What's the best?
-
Polkadot Pick'n'Mix
build a solution utilizing unique features of each parachain
-
Trust-free bridges to existing blockchain networks
Ethereum Smart Contract executing a ZCash transfer
or
Private chain transaction transferring Bitcoins
Current State of Development
- github.com/paritytech/polkadot
- 100% Rust
- WASM runtime ready
- Initial Networking code
- Relay Chain Consensus PoC
- Initial parachain implementation in progress
Thank You
Questions?
Polkadot
By Tomasz Drwięga
Polkadot
- 1,309