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

chainspace a sharded smart contract platform
SMART_READER_LITE
LIVE PREVIEW

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,


slide-1
SLIDE 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

slide-2
SLIDE 2

▪Blockchains are cool — but scale badly ▪Hard to operate on secret inputs

Motivation

Transactions are recorded on chain Smart contracts are public

visa 2000 TPS

slide-3
SLIDE 3

Introduction

▪What is Chainspace?

Scalable smart contract platform Supporting PETs by Design contribution I contribution II

slide-4
SLIDE 4

Contents

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

slide-5
SLIDE 5

▪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 System Overview

Alice’s wallet Balance: 10 Alice’s wallet Balance: 5 Object 1 Object 2

Object 1: active Object 2: nonexistant Object 1: inactive Object 2: active

Chainspace transaction

Balance - 5

slide-6
SLIDE 6

▪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 System Overview

Train seat #33 Free Train seat #33 Taken by Alice Object 1 Object 2

Object 1: active Object 2: nonexistant Object 1: inactive Object 2: active

Chainspace transaction

Reserve train seat

slide-7
SLIDE 7

▪How does Chainspace work?

▪Nodes are organised into shards ▪Shards manage objects ▪Objects can be used only once System Overview

slide-8
SLIDE 8

Privacy by Design

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

slide-9
SLIDE 9

Privacy by Design

▪What are Chainspace Smart Contract?

execution checker user side node side

slide-10
SLIDE 10

execution checker

Privacy by Design

▪What are Chainspace Smart Contract?

input

  • bjects
  • utput
  • bjects

user

execution checker

input & output

  • bjects

node

  • r
slide-11
SLIDE 11

Privacy by Design

▪How are smart contract executed?

inputs

execution checker

contract execution checker

  • utputs &

invalidate inputs transaction user node

 inputs  proof of execution  parameters  outputs  …

❶ ❷ ❹ ❸ ❺

slide-12
SLIDE 12

Privacy by Design

▪Private data never leaves the client!

user node

execution — zk-proof — checker — verify zk-proofs — private data — secret key —

❶ ❷ ❸

slide-13
SLIDE 13

▪How to map objects to shards?

Privacy by Design

The smart contracts decide!

shard 1 shard 2

slide-14
SLIDE 14

Scalability

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

slide-15
SLIDE 15

Scalability

▪We split the blockchain to multiple shards.

slide-16
SLIDE 16

Scalability

▪What is the train-and-hotel problem?

Travel agent Book hotel room #12 in shard 1 Book train seat #33 in shard 2

slide-17
SLIDE 17

Scalability

▪What is the train-and-hotel problem?

Travel agent Book hotel room #12 in shard 1 Book train seat #33 in shard 2

Book hotel room #12 in shard 1

✔ ✘

slide-18
SLIDE 18

Scalability

▪How nodes reach consensus?

Byzantine Agreement Atomic Commit

The S-BAC Protocol

Shard 1

(manage o1)

Shard 2

(manage o2)

Shard 3

(manage o3)

user

lock unlock

slide-19
SLIDE 19

Scalability

▪The Wisdom behind S-BAC

Shard 1

(manage o1)

Shard 2

(manage o2)

Shard 3

(manage o3)

user

Only shards managing o1 and o2 are working Shard 1 and shard 2 can work in parallel

slide-20
SLIDE 20

Security Properties

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

slide-21
SLIDE 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:

Transparency (HS & DS)

Anyone can authenticate the history of transactions and objects that led to the creation of an object.

Integrity (HS) Encapsulation (HS & DS) Non-Repudiation (HS & DS)

A smart contract cannot interfere with

  • bjects created by another contract

(except if defined by that contract). Misbehaviour is detectable: there are evidences of misbehaviour pointing to the faulty parties or shards. Only valid & non-conflicting transactions will be executed.

slide-22
SLIDE 22

Performance

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

slide-23
SLIDE 23

Performance

https://github.com/chainspace S-BAC protocol implemented in Java Python contract environment Everything is released as open source software Deployed and tested on Amazon AWS

▪What did we implemented?

Based on BFT-SMaRt

1. Helps developers 2. Simulation of the checker 3. No need for full deployment

slide-24
SLIDE 24

Performance

▪How the number of shards influence the TPS?

(standard setup: 2 shards, 4 nodes/shard, 20 runs/data point)

TPS VS Number of Shards

slide-25
SLIDE 25

Performance

▪How does the size of the shard influence the TPS?

(standard setup: 2 shards, 4 nodes/shard, 20 runs/data point)

TPS VS Nodes per Shard

slide-26
SLIDE 26

Performance

▪How the number of inputs influence the TPS?

(standard setup: 2 shards, 4 nodes/shard, 20 runs/data point)

TPS VS Number of Inputs

slide-27
SLIDE 27

Performance

▪How does the latency vary under different system loads?

(standard setup: 2 shards, 4 nodes/shard, 20 runs/data point)

Probability VS Latency

slide-28
SLIDE 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

slide-29
SLIDE 29

Conclusions

▪What did we talk about?

Scalable smart contract platform Supporting PETs by Design contribution I contribution II

slide-30
SLIDE 30

Conclusions

▪Main take-aways

sharding scalability execution / checker privacy by design

slide-31
SLIDE 31

Conclusions

▪Future Works

  • 1. How to recover from malicious shards?
  • 2. How can a smart contract creator avoid

dishonest shards?

slide-32
SLIDE 32

Conclusions

▪Future Works

  • 3. How to bootstrap the system?
  • 4. How to incentivise nodes?
slide-33
SLIDE 33

Mustafa Al-Bassam m.albassam@cs.ucl.ac.uk

Questions? Thank you for your attention