A Blockchain Project - cse.unsw.edu.au › ~cs9243 › 16s1 › lectures › vincent-blo… ·...
Transcript of A Blockchain Project - cse.unsw.edu.au › ~cs9243 › 16s1 › lectures › vincent-blo… ·...
A Blockchain ProjectVincent Gramoli
(Collaboration with Ingo Weber and Rob van Glabbeek)
1
Bitcoin nodes
source: https://bitnodes.21.co/
2
What is blockchain?
3
• Abstraction to represent the state of a ledger
• Each transaction transfers from one account to another a quantity of coins and gets recorded in a ledger
• Information can only be appended to the ledger forever (it cannot be modified)
genesis
How does blockchain work?
4
• On a large-scale network
• Any computer node can issue a transaction
• Other nodes, miners, include it in a block
• They propose to append the block to the chain
• Nodes reach consensus on the block to append
Logical overlay
current blockchain
5
genesis
New transaction
6
tx
current blockchain
genesis
Gossip-based protocol
7
tx
tx
tx
current blockchain
genesis
Gossip-based protocol
8
tx
tx
tx
tx
tx
current blockchain
genesis
Mining into a block
9
tx
tx
tx
current blockchain
genesis
miner miner
tx tx
Mining into a block
10
tx
b2
tx
tx
b1
current blockchain
genesis
miner miner
Consensus
11
b2 b1
current blockchain
genesis
b2 ok! b1 ok!
tx
tx
tx
Consensus
12
b2 b1
b1
b1
b1 ok!
b1 ok!
b2 b2 ok!
current blockchain
genesis
b2 ok! b1 ok!
Consensus
13
b2 b1
b1
b1
b1 ok!
b1 ok!
b2 b2 ok!
current blockchain
genesisb2
b1
b2 ok! b1 ok!
Consensus
14
b2 b1
b1
b1
b1 ok!
b1 ok!
b1 b1 ok!
current blockchain
genesisb2
b1
b1 ok!
Consensus
15
b1 b1
b1
b1
b1 ok!
b1 ok!
b1 b1 ok!
b1 ok!
current blockchain
genesis b1
b1 ok!
Consensus
16
Applications assume that the block i is decided (and its transactions are committed) when the blockchain depth reaches i+k
genesis
1 i i+1 i+k-1
i+k
0
decided block undecided block
The Blockchain Anomaly [NG’16]
17
We showed under realistic assumptions that in a private chain, there is no k sufficiently large for the application to work correctly
The Blockchain Anomaly [NG’16]
18
b1 b1
b1
b1
b1 ok!
b1’ ok!
b1 b1 ok!
b1 ok!
current blockchain
genesisb1’
b1
b1 ok!
The Blockchain Anomaly [NG’16]
19
b1 b1
b1
b1 b1’, b2’, …, bk’ ok!
b1
b1, b2, …, bk-1
current blockchain
genesisb1’
b1
bk-1'
bk-1
bk'
b1, b2, …, bk-1
b1, b2, …, bk-1
b1, b2, …, bk-1
The Blockchain Anomaly [NG’16]
20
b1 b1
b1
b1 b1’, b2’, …, bk’ ok!
b1
current blockchain
genesis b1’ bk-1' bk'
b1’, b2’, …, bk’ ok!
b1’, b2’, …, bk’ ok!
b1’, b2’, …, bk’ ok!
Next Steps
Replaying the blockchain anomaly on the network of R3, and implementing a solution
Understanding the assumptions necessary to transfer across blockchains
Taste-Of-Research: building a crowd-funding (DAO) application based on smart contract
1
2
3
21
References• [Nak’08] S. Nakamoto, “Bitcoin: a peer-to-peer electronic cash
system,” 2008. http://www.bitcoin.org
• [Woo’14] G. Wood, “Ethereum: A secure decentralised generalised transaction ledger”. 2014. https://github.com/ethereum/wiki/wiki/White-Paper
• [NG’16] C. Natoli, V. Gramoli. The Blockchain Anomaly. TechRep. arXiv 1605.5438.
• [XPZ+16] X. Xu, C. Pautasso, L. Zhu, V. Gramoli, S. Chen, A. Ponomarev, and A. B. Tran, “The blockchain as a software connector,” in Proceedings of the 13th Working IEEE/IFIP Conference on Software Architecture (WICSA), 2016.
22