chainspace a sharded smart contract platform
play

Chainspace: A Sharded Smart Contract Platform Authors Mustafa - PowerPoint PPT Presentation

Chainspace: A Sharded Smart Contract Platform Authors Mustafa Al-Bassam * Alberto Sonnino * Shehar Bano * Dave Hrycyszyn George Danezis * Published in NDSS 18 * University College London constructiveproof.com Binary District Meetup,


  1. Chainspace: A Sharded Smart Contract Platform Authors Mustafa Al-Bassam * Alberto Sonnino * Shehar Bano * Dave Hrycyszyn † George Danezis * Published in NDSS ‘18 * University College London † constructiveproof.com Binary District Meetup, London

  2. Motivation ▪ Blockchains are cool — but scale badly visa 2000 TPS ▪ Hard to operate on secret inputs Transactions are Smart contracts are recorded on chain public

  3. Introduction ▪ What is Chainspace? contribution I Scalable smart contract platform contribution II Supporting PETs by Design

  4. Contents .3. Scalability .1. System Overview .2. Privacy by Design .4. Security Properties .5. Performances

  5. System Overview ▪ How does Chainspace work? ▪ Everything in Chainspace is an object ▪ For example: a bank account, a hotel room, a train seat ▪ Objects are either active , inactive , or nonexistant ▪ Only active objects can be used in transactions Object 2 Object 1 Balance - 5 Alice’s wallet Alice’s wallet Balance: 10 Balance: 5 Chainspace transaction Object 1: inactive Object 1: active Object 2: nonexistant Object 2: active

  6. System Overview ▪ How does Chainspace work? ▪ Everything in Chainspace is an object ▪ For example: a bank account, a hotel room, a train seat ▪ Objects are either active , inactive , or nonexistant ▪ Only active objects can be used in transactions Object 2 Object 1 Reserve train seat Train seat #33 Train seat #33 Free Taken by Alice Chainspace transaction Object 1: inactive Object 1: active Object 2: nonexistant Object 2: active

  7. System Overview ▪ How does Chainspace work? ▪ Nodes are organised into shards ▪ Shards manage objects ▪ Objects can be used only once

  8. Privacy by Design .3. Scalability .1. System Overview .2. Privacy by Design .4. Security Properties .5. Performance

  9. Privacy by Design ▪ What are Chainspace Smart Contract? user side execution checker node side

  10. Privacy by Design ▪ What are Chainspace Smart Contract? execution user node execution checker checker input input & output objects objects output or objects

  11. Privacy by Design ▪ How are smart contract executed? execution checker ❺ contract inputs outputs & invalidate inputs ❶ user node ❸ transaction  inputs  proof of execution ❹ ❷  parameters execution checker  outputs  …

  12. Privacy by Design ▪ Private data never leaves the client! user private data ❶ — secret key — ❷ execution — zk-proof — node ❸ checker — verify zk-proofs —

  13. Privacy by Design ▪ How to map objects to shards? The smart contracts decide! shard 1 shard 2

  14. Scalability .3. Scalability .1. System Overview .2. Privacy by Design .4. Security Properties .5. Performance

  15. Scalability ▪ We split the blockchain to multiple shards.

  16. Scalability ▪ What is the train-and-hotel problem? Travel agent Book hotel Book train room #12 seat #33 in shard 1 in shard 2

  17. Scalability ▪ What is the train-and-hotel problem? Travel agent Book hotel Book train room #12 seat #33 ✘ ✔ in shard 1 in shard 2 Book hotel room #12 in shard 1 ✔

  18. Scalability ▪ How nodes reach consensus? The S-BAC Protocol Byzantine Atomic Agreement Commit lock unlock user Shard 1 (manage o1) Shard 2 (manage o2) Shard 3 (manage o3)

  19. Scalability ▪ The Wisdom behind S-BAC Only shards managing o1 and o2 Shard 1 and shard 2 can work in are working parallel user Shard 1 (manage o1) Shard 2 (manage o2) Shard 3 (manage o3)

  20. Security Properties .3. Scalability .1. System Overview .2. Privacy by Design .4. Security Properties .5. Performance

  21. Security Properties ▪ What does Chainspace guarantee? ▪ Honest Shard (HS): among 3f+1 nodes, at most f are malicious. ▪ Malicious Shard (DS): over f dishonest nodes. ▪ Chainspace properties: Encapsulation (HS & DS) Transparency (HS & DS) Anyone can authenticate the history of A smart contract cannot interfere with transactions and objects that led to the objects created by another contract creation of an object. (except if defined by that contract). Integrity (HS) Non-Repudiation (HS & DS) Misbehaviour is detectable: there are Only valid & non-conflicting transactions evidences of misbehaviour pointing to will be executed. the faulty parties or shards.

  22. Performance .3. Scalability .1. System Overview .2. Privacy by Design .4. Security Properties .5. Performance

  23. Performance ▪ What did we implemented? Deployed and tested on S-BAC protocol Amazon AWS implemented in Java Based on BFT-SMaRt Python contract Everything is released as open source software environment https://github.com/chainspace 1. Helps developers 2. Simulation of the checker 3. No need for full deployment

  24. Performance ▪ How the number of shards influence the TPS? TPS VS Number of Shards (standard setup: 2 shards, 4 nodes/shard, 20 runs/data point)

  25. Performance ▪ How does the size of the shard influence the TPS? TPS VS Nodes per Shard (standard setup: 2 shards, 4 nodes/shard, 20 runs/data point)

  26. Performance ▪ How the number of inputs influence the TPS? TPS VS Number of Inputs (standard setup: 2 shards, 4 nodes/shard, 20 runs/data point)

  27. Performance ▪ How does the latency vary under different system loads? Probability VS Latency (standard setup: 2 shards, 4 nodes/shard, 20 runs/data point)

  28. Conclusions ▪ What else is in the paper? Cross shard transactions Real world applications (smart metering, …) Smart contracts benchmarking And much more… https://arxiv.org/abs/1708.03778

  29. Conclusions ▪ What did we talk about? contribution I Scalable smart contract platform contribution II Supporting PETs by Design

  30. Conclusions ▪ Main take-aways sharding scalability execution privacy / checker by design

  31. Conclusions ▪ Future Works 1. How to recover from malicious shards? 2. How can a smart contract creator avoid dishonest shards?

  32. Conclusions ▪ Future Works 3. How to bootstrap the system? 4. How to incentivise nodes?

  33. Thank you for your attention Questions? Mustafa Al-Bassam m.albassam@cs.ucl.ac.uk

Recommend


More recommend