omniledger: a secure, scale-out, decentralized ledger via ... · l. luu et al., protocol for open...
TRANSCRIPT
![Page 1: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/1.jpg)
OmniLedger: A Secure, Scale-Out, Decentralized Ledger via Sharding
Lefteris Kokoris-Kogias (@LefKok) Decentralized and Distributed Systems Lab (DEDIS)
Swiss Federal Institute of Technology Lausanne (EPFL)
IEEE Security & Privacy 2018-05-22, San Fransisco
![Page 2: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/2.jpg)
Acknowledgements
2
Philipp Jovanovic(EPFL, CH)
Nicolas Gailly(EPFL, CH)
Linus Gasser(EPFL, CH)
Ewa Syta(Trinity College, USA)
Bryan Ford(EPFL, CH)
![Page 3: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/3.jpg)
Talk Outline
• Motivation
• OmniLedger
• Evaluation
• Conclusion
3
![Page 4: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/4.jpg)
Blockchain, Blockchain, Blockchain• Bring transparency in the
Digital World
• Minimise (or eradicate) the need for trusted third parties
• Cheaper and faster transactions against traditional methods (Banking)
4
![Page 5: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/5.jpg)
Bitcoin vs OmniLedger
5
Bitcoin OmniLedger*
Throughput ~4 TPS ~20.000 TPS
1-st Confirmation ~10 minutes ~1 second
Full Security ~60 minutes ~42 second
More Available Resources
No performance Gain
Linear Increase in Throughput
* Configuration with 1120 validators against a 12.5% adversary
![Page 6: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/6.jpg)
Bitcoin vs OmniLedger
6
Bitcoin OmniLedger*
Throughput ~4 TPS ~20.000 TPS
1-st Confirmation ~10 minutes ~1 second
Full Security ~60 minutes ~42 second
More Available Resources
No performance Gain
Linear Increase in Throughput
* Configuration with 1120 validators against a 12.5% adversary Scale-Out
![Page 7: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/7.jpg)
… But Scaling Blockchains is Not Easy
7
![Page 8: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/8.jpg)
Elasti
co
L. Luu et al., A Secure Sharding Protocol for Open Blockchains, CCS 2016
Distributed Ledger Landscape
8
Decentralization
Scale-Out Security
ByzCoin
E. Kokoris Kogias et al., Enhancing Bitcoin Security and Performance with Strong Consistency via Collective Signing, USENIX Security 2016
OmniLedger
RSCoin
G. Danezis and S. Meiklejohn, Centrally Banked Cryptocurrencies, NDSS 2016
![Page 9: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/9.jpg)
No Scale-Out (Bitcoin)
9
Blockchain
![Page 10: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/10.jpg)
Scale-Out (OmniLedger)
10
Shard Shard
• How do validators choose which blockchain to work on?
• How can I pay a yellow vendor with greencoins?
Double Throughput
![Page 11: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/11.jpg)
Random Validator Assignment• Let validators choose? —> All malicious validators can choose the
same chain
• Randomly assign validators? —> Preserve security for adequately large shard size
11
![Page 12: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/12.jpg)
Strawman: SimpleLedger
12
Trusted randomness beacon
Overview
• Evolves in epochs e
• Trusted randomness beacon emits random value rnde
• Validators:
‣ Use rnde to compute shard assignment (ensures shard security)
‣ Process tx using consensus within one shard (ByzCoin)
Shard 1(ByzCoin group)
Shard 3(ByzCoin group)
Shard 2(ByzCoin group)
Shard ledgers
Validators
rnde
![Page 13: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/13.jpg)
Strawman: SimpleLedger
13
Security Drawbacks
• Randomness beacon: trusted third party
• No tx processing during validator re-assignment
• No cross-shard tx support
Performance Drawbacks
• ByzCoin failure mode
• High storage and bootstrapping cost
• Throughput vs. latency trade-off
![Page 14: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/14.jpg)
Talk Outline
• Motivation
• OmniLedger
• Evaluation
• Conclusion
14
![Page 15: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/15.jpg)
Roadmap
15OmniLedger
SimpleLedger
Sharding via distributed randomness
Smooth epoch transitions
Atomix: Atomic cross-shard txs
ByzCoinX: Robust BFT consensus
Shard ledger pruning
Trust-but-verify validation: Throughput / Latency trade-off
Security
Performance
![Page 16: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/16.jpg)
Roadmap
16OmniLedger
SimpleLedger
Sharding via distributed randomness
Smooth epoch transitions
Atomix: Atomic cross-shard txs
ByzCoinX: Robust BFT consensus
Shard ledger pruning
Trust-but-verify validation: Throughput / Latency trade-off
Security
Performance
![Page 17: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/17.jpg)
Shard Validator Assignment
17
Verifiable randomness rnde
1. Temp. leader election (Can be biased)
3. Shard assignment (using rnde)
2. Randomness generation (Output is unbiasable)
Validators Validators (sharded)
RandHound*
Temp. leader
* Syta, Ewa, et al. "Scalable bias-resistant distributed randomness." Oakland ‘17
![Page 18: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/18.jpg)
Roadmap
18OmniLedger
SimpleLedger
Sharding via distributed randomness
Smooth epoch transitions
Atomix: Atomic cross-shard txs
ByzCoinX: Robust BFT consensus
Shard ledger pruning
Trust-but-verify validation: Throughput / Latency trade-off
Security
Performance
![Page 19: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/19.jpg)
Two-Phase Commit
19
Coordinator Server
Query to commit
prepare / abort
Commit / Rollback
commit / abort
![Page 20: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/20.jpg)
Atomix: Cross-Shard Transactions
20
Challenge:
• Cross-shard tx commit atomically or abort eventually
Solution: Atomix
• Client-managed protocol
1. Client sends cross-shard tx to input shards
2. Collect ACK/ERR proofs from input shards
(a) If all input shards accept, commit to output shard, otherwise (b) abort and reclaim input funds
The Atomix protocol for secure cross-shard transactions
client
(1) Initialize
tx
tx
client
(2) Lock
accept1
accept2
client
(3a) Unlock to Commit
commit tx
client
(2) Lock
accept1
reject2
client
(3b) Unlock to Abort
reclaimtx inputs
cross-shard transaction tx
inputs outputsshard1 shard3
shard2
shard3shard2shard1
shard3shard2shard1
shard3shard2shard1
shard3shard2shard1
shard3shard2shard1
![Page 21: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/21.jpg)
Roadmap
21OmniLedger
SimpleLedger
Sharding via distributed randomness
Smooth epoch transitions
Atomix: Atomic cross-shard txs
ByzCoinX: Robust BFT consensus
Shard ledger pruning
Trust-but-verify validation: Throughput / Latency trade-off
Security
Performance
![Page 22: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/22.jpg)
Challenge:
• Latency vs. throughput trade-off
Solution:
• Two-level “trust-but-verify” validation
• Low latency: ‣ Optimistically validate transactions by
“insecure” shards
• High throughput: ‣ Batch optimistically validated blocks and
audit by “secure” shards
Trust-but-Verify Transaction Validation
22
core validatorsoptimistic
validators
clients
tx
tx
tx shard ledger (with state block)
finalized block
optimistically validated blocks
sbj,e-1
![Page 23: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/23.jpg)
Talk Outline
• Motivation
• OmniLedger
• Evaluation
• Conclusion
23
![Page 24: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/24.jpg)
Implementation & Experimental SetupImplementation
• OmniLedger and its subprotocols (ByzCoinX, Atomix, etc.) implemented in Go
• Based on DEDIS code ‣ Kyber crypto library ‣ Onet network library ‣ Cothority framework
• https://github.com/dedis 24
DeterLab Setup
• 48 physical machines up to 1800 clients‣ Intel Xeon E5-2420 v2
(6 cores @ 2.2 GHz) ‣ 24 GB RAM ‣ 10 Gbps network link
• Network restrictions (per client)‣ 20 Mbps bandwidth ‣ 200 ms round-trip latency
![Page 25: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/25.jpg)
Evaluation: Scale-Out
25
#validators (#shards) 70 (1) 140 (2) 280 (4) 560 (8) 1120 (16)OmniLedger (tx/sec) 439 869 1674 3240 5850
Bitcoin (tx/sec) ~4 ~4 ~4 ~4 ~4
Scale-out throughput for 12.5%-adversary and shard size 70 and 1200 validators
![Page 26: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/26.jpg)
Evaluation: Throughput
Results for 1800 validators 26
![Page 27: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/27.jpg)
Evaluation: Latency
27
#shards, adversary 4, 1% 25, 5% 70, 12.5% 600, 25%
regular validation 1.38 5.99 8.04 14.52
1st lvl. validation 1.38 1.38 1.38 4.48
2nd lvl. validation 1.38 55.89 41.89 62.96
Bitcoin 600 600 600 600
Transaction confirmation latency in seconds for regular and mutli-level validation
latency increase since optimistically validated blocks are batched into larger blocks for final validation to
get better throughput
1 MB blocks
500 KB blocks
16 MB blocks
![Page 28: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/28.jpg)
Talk Outline
• Motivation
• OmniLedger
• Experimental Results
• Conclusion
28
![Page 29: OmniLedger: A Secure, Scale-Out, Decentralized Ledger via ... · L. Luu et al., Protocol for Open BlockchainsA Secure Sharding , Elastico CCS 2016 Distributed Ledger Landscape 8 Decentralization](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbe54019eab18341d1f74a0/html5/thumbnails/29.jpg)
Conclusion• OmniLedger – Secure scale-out distributed ledger
framework ‣ Atomix: Client-managed cross-shard tx ‣ ByzCoinX: Robust intra-shard BFT consensus ‣ Sharding: Visa-level throughput and beyond ‣ Trust-but-verify validation: No latency vs.
throughput tradeoff ‣ For PoW, PoS, permissioned, etc.
• Code: https://github.com/dedis
• Contact: [email protected] , @LefKok 29
Shard 1(ByzCoinX group)
Shard 3(ByzCoinX group)
Shard 2(ByzCoinX group)
Validators
Shard ledgers
Client(Atomix coordinator)
tx3,out
tx2,in
tx1,in
Epoch randomness rnde (RandHound)