#5 Wrocław Blockchain Meetup
Tomasz Drwięga,
Parity Technologies
transfer(from, to, property)
properties(who)
User X transfers property 5 to User Y
transfer(X, Y, 5)
Database
API
User X
User Y
User Z
Admin
Database
API
User X
User Y
User Z
Authenticate
Enforce Rules
Persist State
Trusted Zone
It needs to be distributed.
Database
API
User X
User Y
User Z
Authenticate
Enforce Rules
Persist State
Trusted Zone
User X
User Y
User Z
properties(A) = [5]
properties(B) = []
properties(A) = []
properties(B) = [5]
transfer(A, B, 5)
properties(A) = [5,7]
properties(B) = []
properties(C) = []
properties(A) = []
properties(B) = [5]
properties(C) = [7]
Day 1
Day 2
Transition
(list of transactions)
transfer(A, B, 5)
transfer(A, C, 7)
+
Transfers
+
Transfers
+
Transfers
+
Transfers
+
Transfers
+
Transfers
State 1
State 2
State 3
=
=
State 1 + Transfers = State 2
State 2 + Transfers = State 3
State 3 + Transfers = ...
But sending all states over the network is not feasible...
DATA
)
f(
= hash
Easy to computer `f`, but impossible* to revert.
Can be used as a checksum.
0x123456789
)
sha256(
= 0x6c4...3e6
How can you verify that they were intended by owners?
Alice's Public Key
Alice's Private Key
Bob's Public Key
Bob's Private Key
verify with Public
Alice's Private Key
Message
Signature
verify with Public
Alice's Public Key
Message
Signature
Alice sent it!
That's a blockchain!
transfer(A, B, 5)
Alice's Sig
transfer(B, C, 5)
Bob's Sig
transfer(B, A, 5)
Bob's Sig
Signed transactions packed together in blocks,
linked to each other to encode time-relations.
hash(Genesis) = Parent Hash
hash(Block 1) = Block Hash
hash(Block 1) = Parent Hash
hash(Block 2) = Block Hash
hash(State 1)
hash(State 2)
hash(Block 2) = Parent Hash
hash(State 2)
hash(Block 3) = Block Hash
Timestamp = 2017-05-18 13:45
Timestamp = 2017-05-18 13:45
Timestamp= 2017-05-18 13:45
If everyone can create them how do we know which one encodes "the truth"?
We need a puzzle that is:
1. Trivial to validate
2. Difficult to compute
transfer(B, A, 5)
Bob's Sig
hash(Block 1) = Parent Hash
hash(Block 2) = Block Hash
hash(State 2)
Timestamp = 2017-05-18 13:45
Puzzle Solution
DATA
)
f(
= hash
BlockHash
)
sha256(
= 0x000...
Nonce
Puzzle: Find a Nonce that hashed together with current block hash gives a hash starting with X zeros
Canonical Chain
transfer(A, B, 5)
Alice's Sig
transfer(B, C, 5)
Bob's Sig
transfer(B, A, 5)
Bob's Sig
transfer(B, C, 5)
Bob's Sig
Longest in some metric
Consensus ensures the blocks are produced in expected rate via
Difficulty Adjustment / Protocol Delays
It's incentivized - You will earn money
(and it's called mining)
Bitcoin is the first public blockchain ever.
Block Time | 10 minutes |
Consensus | Proof of Work - hashcash |
State | Account Balances of BTC / UTXO* |
Transactions | Value Transfers* |
Launched | 2009 |
Block Reward | 12BTC (halving) ~ 21M total coins |
Ethereum is the World Computer
Block Time | 14 seconds |
Consensus | Proof of Work - ethash* |
State | Arbitrary |
Transactions | Turing-complete / programmable |
Launched | 2015 |
Block Reward | 5ETH (+uncles) ~ Unlimited coins |
Trustless transactions between multiple parties.
Transactions without trust of a third party intermediary!
Alex Fisher - The web and "trustless" communications
https://www.youtube.com/watch?v=7WyIms8YDVo
Dan Finlay - Intro to how ethereum works
https://www.youtube.com/watch?v=-SMliFtoPn8