Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient...

243
©2015 ICube Introduction to Distributed Ledger Technologies (the classy name of blockchains) May, 25 th 2018, ICUBE Quentin Bramas [email protected] 1

Transcript of Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient...

Page 1: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

©2015ICube

Introduction to Distributed Ledger Technologies (the classy name of blockchains)

May, 25th 2018, ICUBE

Quentin Bramas [email protected]

1

Page 2: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

2

Page 3: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

2

What are we ?

Page 4: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

2

ComputersWhat are we ?

Page 5: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

2

ComputersWhat are we ?

What do we want ?

Page 6: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

2

Computers

Distributed data

What are we ?

What do we want ?

Page 7: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

2

Computers

Distributed data

What are we ?

What do we want ?

How we want it ?

Page 8: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

2

Computers

Consistent

Distributed data

SecureEfficient Scalable

What are we ?

What do we want ?

How we want it ?

Page 9: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

Blockchain

Page 10: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

Blockchain

Page 11: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

Blockchain

Page 12: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

X is delivered from A to B

Blockchain

Page 13: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

X is delivered from A to B

Blockchain

Page 14: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

X is delivered from A to B

Blockchain

Page 15: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

X is delivered from A to B

Blockchain

X is delivered from B to C

Page 16: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

X is delivered from A to B

Blockchain

X is delivered from B to C

X is in the final product

Page 17: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

X is delivered from A to B

Blockchain

X is delivered from B to C

X is delivered from B to D

X is in the final product

Page 18: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

3

X is delivered from A to B

Blockchain

X is delivered from B to C

X is delivered from B to D

X is in the final product

Page 19: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

4

Data is distributed :

Page 20: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

4

Data is distributed :no single point of failure

Page 21: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

4

Data is distributed :no single point of failureno central Authority

Page 22: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

4

Data is distributed :no single point of failureno central Authorityno need to trust the others

Page 23: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

4

Data is distributed :no single point of failureno central Authorityno need to trust the others

I want to add some data

Page 24: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

Page 25: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

I want to add some data

Page 26: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

I want to add some data

Where is the data stored ?

Page 27: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

I want to add some data

Where is the data stored ?How do I read data ?

Page 28: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

I want to add some data

Where is the data stored ?How do I read data ?How do I write data ?

Page 29: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

I want to add some data

Where is the data stored ?How do I read data ?How do I write data ?How do I make sure my data is not tempered ?

Page 30: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

I want to add some data

Where is the data stored ?How do I read data ?How do I write data ?How do I make sure my data is not tempered ?How do I make sure what I read is correct ?

Page 31: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

I want to add some data

Where is the data stored ?How do I read data ?How do I write data ?How do I make sure my data is not tempered ?How do I make sure what I read is correct ?How do I become rich ?

Page 32: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

5

I want to add some data

Where is the data stored ?How do I read data ?How do I write data ?How do I make sure my data is not tempered ?How do I make sure what I read is correct ?How do I become rich ?Who am I ?

Page 33: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Talk Chain“Old-style” Consensus Algorithms

6

Bitcoin PoW Consensus

Nxt PoS Consensus

Ethereum Smart Contracts

IOTA BlockDAG

Page 34: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Page 35: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Page 36: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Process (can be faulty)

Page 37: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Process (can be faulty)

Channel (can be slow)

Page 38: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:

Process (can be faulty)

Channel (can be slow)

Page 39: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

Process (can be faulty)

Channel (can be slow)

Page 40: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

Process (can be faulty)

Channel (can be slow)

Page 41: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

Agreement

Process (can be faulty)

Channel (can be slow)

Page 42: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

AgreementEvery correct process must agree on the same value.

Process (can be faulty)

Channel (can be slow)

Page 43: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

AgreementEvery correct process must agree on the same value.

Validity

Process (can be faulty)

Channel (can be slow)

Page 44: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

AgreementEvery correct process must agree on the same value.

ValidityIf all processes propose the same value v, then all correct processes decide v.

Process (can be faulty)

Channel (can be slow)

Page 45: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

AgreementEvery correct process must agree on the same value.

ValidityIf all processes propose the same value v, then all correct processes decide v.

Termination

Process (can be faulty)

Channel (can be slow)

Page 46: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

AgreementEvery correct process must agree on the same value.

ValidityIf all processes propose the same value v, then all correct processes decide v.

TerminationEvery correct process decides some value.

Process (can be faulty)

Channel (can be slow)

Page 47: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

AgreementEvery correct process must agree on the same value.

ValidityIf all processes propose the same value v, then all correct processes decide v.

TerminationEvery correct process decides some value.

Integrity

Process (can be faulty)

Channel (can be slow)

Page 48: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

7

Definition of Consensus:Each process starts with an input value

AgreementEvery correct process must agree on the same value.

ValidityIf all processes propose the same value v, then all correct processes decide v.

TerminationEvery correct process decides some value.

IntegrityEvery correct process decides at most one value, and if it decides some value v, then v must have

been proposed by some process.

Process (can be faulty)

Channel (can be slow)

Page 49: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Page 50: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Impossibility results

Page 51: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Impossibility results [FLP 1985] "Impossibility of distributed consensus with one faulty process"

Page 52: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Impossibility results

Costly algorithms

[FLP 1985] "Impossibility of distributed consensus with one faulty process"

Page 53: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Impossibility results

Costly algorithms

[FLP 1985] "Impossibility of distributed consensus with one faulty process"

Every node should be connected to every node, broadcast everything, and waits for n/2 responses

Page 54: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Impossibility results

Costly algorithms

Still puzzle researchers’ minds

[FLP 1985] "Impossibility of distributed consensus with one faulty process"

Every node should be connected to every node, broadcast everything, and waits for n/2 responses

Page 55: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Impossibility results

Costly algorithms

Still puzzle researchers’ minds

[FLP 1985] "Impossibility of distributed consensus with one faulty process"

Every node should be connected to every node, broadcast everything, and waits for n/2 responses

[Bramas 2016] Packet efficient implementation of the omega failure detector

Page 56: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Impossibility results

Costly algorithms

Still puzzle researchers’ minds

[FLP 1985] "Impossibility of distributed consensus with one faulty process"

Every node should be connected to every node, broadcast everything, and waits for n/2 responses

[Bramas 2016] Packet efficient implementation of the omega failure detector

[CAP theorem] "Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services"

Page 57: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

8

Impossibility results

Costly algorithms

Still puzzle researchers’ minds

[FLP 1985] "Impossibility of distributed consensus with one faulty process"

Every node should be connected to every node, broadcast everything, and waits for n/2 responses

[Bramas 2016] Packet efficient implementation of the omega failure detector

[CAP theorem] "Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services"

There exists consensus algorithms that tolerates up to n/3 Byzantins processes

Page 58: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

9

So what’s the problem with an algorithm tolerating n/3 byzantin nodes ?

Lots of honest nodes

Page 59: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

9

So what’s the problem with an algorithm tolerating n/3 byzantin nodes ?

Lots of honest nodes

Page 60: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

10

So what’s the problem with an algorithm tolerating n/3 byzantin nodes ?

lots of virtual nodes

What’s preventing an adversary from creating lots of byzantine nodes ?

Lots of honest nodes

Page 61: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

10

So what’s the problem with an algorithm tolerating n/3 byzantin nodes ?

lots of virtual nodes

What’s preventing an adversary from creating lots of byzantine nodes ?

“old-style” consensus algorithms work well when the participants are known, and not too many (eg, Hashgraph blockchain, 39 known participants in the “council”)

Lots of honest nodes

Page 62: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

11

Page 63: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

11

We need some kind of

Page 64: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

11

We need some kind ofWe need some kind of Proof

Page 65: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

11

We need some kind ofWe need some kind of Proofof “existence”

Page 66: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

11

We need some kind ofWe need some kind of Proofof “existence”that does not depend on how many nodesyou control in the network

Page 67: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Bitcoin PoW Consensus“Old-style” Consensus Algorithms

11

We need some kind ofWe need some kind of Proofof “existence”that does not depend on how many nodesyou control in the networkbut depends on ...

Page 68: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

12

How much work can you do ?

Page 69: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

12

How much work can you do ?

Your importance in the network depends on how many times you can execute a hash function.(no interest in simulating many nodes, because your hashing power will remain the same)

Page 70: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

13

Page 71: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

13

Basic principle of the Bitcoin Protocol :

Page 72: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

13

Basic principle of the Bitcoin Protocol : - Choose randomly one node

Page 73: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

13

Basic principle of the Bitcoin Protocol : - Choose randomly one node

The more computing power, the more chance you have to be selected

Page 74: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

13

Basic principle of the Bitcoin Protocol : - Choose randomly one node- This node decides what to write in the database

The more computing power, the more chance you have to be selected

Page 75: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

14

In more details

What is the database ? The blockchain

Page 76: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

14

In more details

What is the database ? The blockchain

Block of data 1 Block of data 2

ref to block 1

Block of data 3

ref to block 2

It’s a data structure with one function: append(Block)

(you cannot remove a block, so to “remove” a data just overwrite it)

Page 77: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

15

In more detailsWho stores the data? Every nodes

Page 78: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

15

In more detailsWho stores the data? Every nodes

How to read data? just read all the blocks in order

Page 79: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

15

In more detailsWho stores the data? Every nodes

How to read data? just read all the blocks in order

v = 1 v = 1 printf(“v = 2”)

Exemple 1: what’s the value of v ?

v = 2

Page 80: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

15

In more detailsWho stores the data? Every nodes

How to read data? just read all the blocks in order

v = 1 v = 1 printf(“v = 2”)

Exemple 1: what’s the value of v ?

v = 2

Initial Coins Distribution:Alice : 100$

Bob has 10$ Oscar to Alice : 10$

Exemple 2: How much does Alice have ? and Bob ?

Alice to Oscar : 50$Alice to Daniel : 30$

Page 81: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

16

In more detailsHow to write data ?

Page 82: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

16

In more detailsHow to write data ?

Send my data to everyone

Page 83: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

16

In more detailsHow to write data ?

Send my data to everyoneThe node that will be elected will include it in its block (hopefully)

Page 84: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

16

In more detailsHow to write data ?

Send my data to everyoneThe node that will be elected will include it in its block (hopefully)

Exemple : Oscar to Alice 10$

Page 85: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

16

In more detailsHow to write data ?

Send my data to everyoneThe node that will be elected will include it in its block (hopefully)

Oscar to Alice : 10$

https://blockchain.info/unconfirmed-transactions

Exemple : Oscar to Alice 10$

Page 86: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

17

In more detailsHow to write data ?- Send my data to everyone- The node that will be elected will include it in its block (hopefully)

https://blockchain.info/unconfirmed-transactions

OO OO

OO OO

OO OOOO OO

OO OO

OO OOOO OO

OO OO

OO OO

OO

O

Exemple : Oscar to Alice 10$

Page 87: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

17

In more detailsHow to write data ?- Send my data to everyone- The node that will be elected will include it in its block (hopefully)

https://blockchain.info/unconfirmed-transactions

OO OO

OO OO

OO OOOO OO

OO OO

OO OOOO OO

OO OO

OO OO

O

O

OExemple : Oscar to Alice 10$

Page 88: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

17

In more detailsHow to write data ?- Send my data to everyone- The node that will be elected will include it in its block (hopefully)

https://blockchain.info/unconfirmed-transactions

Each node includes “Oscar to Alice : 10$” to their block

OO OO

OO OO

OO OOOO OO

OO OO

OO OOOO OO

OO OO

OO OO

O

O

OExemple : Oscar to Alice 10$

Page 89: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

17

In more detailsHow to write data ?- Send my data to everyone- The node that will be elected will include it in its block (hopefully)

https://blockchain.info/unconfirmed-transactions

Each node includes “Oscar to Alice : 10$” to their blockOne Block is “randomly” selected to be appended to the blockchain

OO OO

OO OO

OO OOOO OO

OO OO

OO OOOO OO

OO OO

OO OO

O

O

OExemple : Oscar to Alice 10$

Page 90: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

18

In more detailsExemple : Oscar to Alice 10$

https://blockchain.info/unconfirmed-transactions

Each node include “Oscar to Alice : 10$” to their blockOne Block is “randomly” selected to be appended to the blockchain

Oscar to Alice : 10$

Page 91: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

18

In more detailsExemple : Oscar to Alice 10$

https://blockchain.info/unconfirmed-transactions

Each node include “Oscar to Alice : 10$” to their blockOne Block is “randomly” selected to be appended to the blockchain

Oscar to Alice : 10$

Initial Coins Distribution:Alice : 100$

Alice to Oscar : 50$Alice to Daniel : 30$

Page 92: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

18

In more detailsExemple : Oscar to Alice 10$

https://blockchain.info/unconfirmed-transactions

Each node include “Oscar to Alice : 10$” to their blockOne Block is “randomly” selected to be appended to the blockchain

Oscar to Alice : 10$

Initial Coins Distribution:Alice : 100$

Alice to Oscar : 50$Alice to Daniel : 30$

Page 93: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

18

In more detailsExemple : Oscar to Alice 10$

Initial Coins Distribution:Alice : 100$

Alice to Oscar : 50$Alice to Daniel : 30$

Oscar to Alice : 10$........

https://blockchain.info/unconfirmed-transactions

Each node include “Oscar to Alice : 10$” to their blockOne Block is “randomly” selected to be appended to the blockchain

Initial Coins Distribution:Alice : 100$

Alice to Oscar : 50$Alice to Daniel : 30$

Page 94: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

19

In more detailsExemple : Oscar to Alice 10$

Initial Coins Distribution:Alice : 100$

Alice to Oscar : 50$Alice to Daniel : 30$

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

OO OO

O

OO OOO

OO OOO OO OOO

OO OOO

OO OOO

Page 95: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

19

In more detailsExemple : Oscar to Alice 10$

Initial Coins Distribution:Alice : 100$

Alice to Oscar : 50$Alice to Daniel : 30$

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

OO OO

O

OO OOO

OO OOO OO OOO

OO OOO

OO OOO

Page 96: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

19

In more detailsExemple : Oscar to Alice 10$

Initial Coins Distribution:Alice : 100$

Alice to Oscar : 50$Alice to Daniel : 30$

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

OO OO

O

OO OOO

OO OOO OO OOO

OO OOO

OO OOO

Page 97: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

19

In more detailsExemple : Oscar to Alice 10$

Initial Coins Distribution:Alice : 100$

Alice to Oscar : 50$Alice to Daniel : 30$

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

Oscar to Alice : 10$........

OO OO

O

OO OOO

OO OOO OO OOO

OO OOO

OO OOO

Page 98: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

20

In more detailsHow to prevent anyone from appending a block?How to make sure data is not removed?

https://anders.com/blockchain/

4080782: I worked hard for this presentation

Page 99: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

21

In more details

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

hash: #053nonce: 134data: Alice has 100$prev: #0

hash: #0000067nonce: 3452data: Alice to Bob: 10$prev: #0000018

...

Page 100: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

21

In more details

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

hash: #053nonce: 134data: Alice has 100$prev: #0

hash: #0000067nonce: 3452data: Alice to Bob: 10$prev: #0000018

...

hash: #028nonce: 1421data: Alice to Bob: 1$prev: #053

hash: #053nonce: 134data: Alice has 100$prev: #0

It’s easy for Alice to replace a block with another one:

Page 101: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

21

In more details

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

hash: #053nonce: 134data: Alice has 100$prev: #0

hash: #0000067nonce: 3452data: Alice to Bob: 10$prev: #0000018

...

hash: #028nonce: 1421data: Alice to Bob: 1$prev: #053

hash: #053nonce: 134data: Alice has 100$prev: #0

It’s easy for Alice to replace a block with another one:

But the other nodes will prefer the longest blockchain

Page 102: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

21

In more details

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

hash: #053nonce: 134data: Alice has 100$prev: #0

hash: #0000067nonce: 3452data: Alice to Bob: 10$prev: #0000018

...

hash: #028nonce: 1421data: Alice to Bob: 1$prev: #053

hash: #053nonce: 134data: Alice has 100$prev: #0

It’s easy for Alice to replace a block with another one:

But the other nodes will prefer the longest blockchain

The deeper the block you modify, the harder it gets to generate a blockchain longer than the existing one

Page 103: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

22

In more details

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

...

What if two nodes generates two different block at the same time ?

Page 104: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

22

In more details

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

...

hash: #0000067nonce: 3452data: Bob to Alice: 10$prev: #032

hash: #0000042nonce: 98423data: Bob to Alice: 1$prev: #032

What if two nodes generates two different block at the same time ?

Page 105: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

23

In more detailsparts of the networks will receive this first and will try to append a block to this (they don’t want to change their choice when they receive the other one because that would mean that they wasted their computing power on this one)

parts of the networks will receive this first and will try to append a block to this (they don’t want to change their choice when they receive the other one because that would mean that they wasted their computing power on this one)

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

hash: #0000067nonce: 3452data: Bob to Alice: 10$prev: #032

hash: #0000042nonce: 98423data: Bob to Alice: 1$prev: #032

Page 106: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

24

In more details

same as beforehash: #0000091nonce: 3452data: ...prev: #0000067

same as before

hash: #0000012nonce: 3452data: ...prev: #0000042

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

hash: #0000067nonce: 3452data: Bob to Alice: 10$prev: #032

hash: #0000042nonce: 98423data: Bob to Alice: 1$prev: #032

Page 107: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

25

In more details

If it finds the next block first

they receive the other block, stop working on extending #0000042 and start extending #0000091(they don’t want to continue with #0000042 because it becomes harder to have a longer chain, so trying to extends here is a waste of their computing power)

hash: #0000091nonce: 3452data: ...prev: #0000067

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

hash: #0000067nonce: 3452data: Bob to Alice: 10$prev: #032

hash: #0000042nonce: 98423data: Bob to Alice: 1$prev: #032

Page 108: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

26

In more details

Every one tries to extend here

This block is orphaned

hash: #0000091nonce: 3452data: ...prev: #0000067

hash: #032nonce: 5441data: Alice to Bob: 10$prev: #053

hash: #0000067nonce: 3452data: Bob to Alice: 10$prev: #032

hash: #0000042nonce: 98423data: Bob to Alice: 1$prev: #032

Page 109: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

27

In more detailsWhen finding a block, a node receives some coins (a fixed reward + transaction fees chosen freely by the sender)

Page 110: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

27

In more detailsWhen finding a block, a node receives some coins (a fixed reward + transaction fees chosen freely by the sender)

hash: #032nonce: 5441data: Alice to Bob: 10$reward of 10$ goes to : Oscarprev: #053

hash: #0000067nonce: 3452data: Bob to Alice: 10$reward of 10$ goes to : Oscarprev: #032

...hash: #0000042nonce: 98423data: Bob to Alice: 1$reward of 10$ goes to : Danielprev: #032

Page 111: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

27

In more detailsWhen finding a block, a node receives some coins (a fixed reward + transaction fees chosen freely by the sender)

hash: #032nonce: 5441data: Alice to Bob: 10$reward of 10$ goes to : Oscarprev: #053

hash: #0000067nonce: 3452data: Bob to Alice: 10$reward of 10$ goes to : Oscarprev: #032

...hash: #0000042nonce: 98423data: Bob to Alice: 1$reward of 10$ goes to : Danielprev: #032

Oscar has 10$ in this version of the blockchain

Page 112: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

27

In more detailsWhen finding a block, a node receives some coins (a fixed reward + transaction fees chosen freely by the sender)

So the goal of the nodes, is to find a block first, and that this block is not orphaned.This does not mean “extends only the version where I have the greatest balance” because you want to avoid wasting hashing power on a chain that has great chance to be orphaned

hash: #032nonce: 5441data: Alice to Bob: 10$reward of 10$ goes to : Oscarprev: #053

hash: #0000067nonce: 3452data: Bob to Alice: 10$reward of 10$ goes to : Oscarprev: #032

...hash: #0000042nonce: 98423data: Bob to Alice: 1$reward of 10$ goes to : Danielprev: #032

Oscar has 10$ in this version of the blockchain

Page 113: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

28

In more detailsWhat is the balance of Alice ?

Reward: O S -> A (5$)

Genesis : S : 10000$

Reward: D O -> A (2$) A -> D (1$)

Reward: O O -> A (2$)

Reward: O D -> O (2$) A -> D (1$)

Reward: O D -> S (5$)

Alice: 5$Satoshi: 10000$Oscar: 30$Daniel: 5$

Sum: 10000 + 4x10

Alice: 0$ Alice += 5$ Alice += 2$ -1$ Alice -= 1$ Alice += 0$

Page 114: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

29

In more detailsBlock Validation

Reward: O S -> A (5$)

Genesis : S : 10000$

Reward: D O -> A (2$) A -> D (1$)

Reward: O O -> A (2$)

Reward: O D -> O (2$) A -> D (1$)

Reward: O A -> O (100$)

Alice: 0$ Alice: +5$ Alice: +2$ -1$ Alice: -1$ Alice: +0$

No one will accept this block

Page 115: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

30

In more detailsDouble spending

Page 116: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

30

In more detailsDouble spending

Alice buy a sandwich to Bob and sign A -> B (1$)

Page 117: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

30

In more detailsDouble spending

Alice buy a sandwich to Bob and sign A -> B (1$)

but Alice also sign A -> A’ (5$) and send this one to the network

Page 118: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

30

In more detailsDouble spending

Alice buy a sandwich to Bob and sign A -> B (1$)

but Alice also sign A -> A’ (5$) and send this one to the network

Reward: O S -> A (5$)

Genesis : S : 10000$

Reward: D A -> A’ (1$)

Reward: O ...

Reward: O ...

Page 119: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

30

In more detailsDouble spending

Now, no one will ever include A -> B (1$) transaction because it’s in conflict with A -> A’ (5$)

Alice buy a sandwich to Bob and sign A -> B (1$)

but Alice also sign A -> A’ (5$) and send this one to the network

Reward: O S -> A (5$)

Genesis : S : 10000$

Reward: D A -> A’ (1$)

Reward: O ...

Reward: O ...

Page 120: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

31

In more detailsDouble spending

Alice buy a sandwich to Bob and sign A -> B (1$)

Bob waits to see this transaction in a block before giving the sandwich

Page 121: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

31

In more detailsDouble spending

Alice buy a sandwich to Bob and sign A -> B (1$)

Bob waits to see this transaction in a block before giving the sandwich

Reward: O S -> A (5$)

Genesis : S : 10000$

Reward: D A -> B (1$)

Page 122: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

32

In more detailsDouble spending

Reward: O S -> A (5$)

Genesis : S : 10000$

Reward: D A -> B (1$)

Alice buy a sandwich to Bob and sign A -> B (1$)

Alice also sign A -> A’ (5$) and use a lots of power to extends this chain faster than the other

Reward: A A -> A’ (5$)

Reward: A ... ...

In this chain, B never received the coins and A -> B (1$) cannot be included anymore

Bob waits to see this transaction in a block before giving the sandwich

Page 123: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

33

In more detailsDouble spending

Alice buy a sandwich to Bob and sign A -> B (1$)

Bob waits to see this transaction in a block and waits for 10 confirmation blocks

Page 124: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

33

In more detailsDouble spending

Alice buy a sandwich to Bob and sign A -> B (1$)

Bob waits to see this transaction in a block and waits for 10 confirmation blocks

Reward: O S -> A (5$)

Genesis : S : 10000$

Reward: D A -> B (1$) ... ... ... ...

Page 125: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

33

In more detailsDouble spending

Alice buy a sandwich to Bob and sign A -> B (1$)

Bob waits to see this transaction in a block and waits for 10 confirmation blocks

Reward: O S -> A (5$)

Genesis : S : 10000$

Reward: D A -> B (1$) ... ... ... ...

Reward: A A -> A’ (1$)

It’s too expensive for Alice to generate 10 blocks on her own

Page 126: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

34

In more details

Page 127: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

34

In more detailsDouble spending: If an adversary owns more than ½ the network hashing power, it can always perform a double spend

Page 128: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

34

In more detailsDouble spending: If an adversary owns more than ½ the network hashing power, it can always perform a double spend

Orphaned blocks wasted hashing power reduce protocol security

Page 129: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

34

In more detailsDouble spending: If an adversary owns more than ½ the network hashing power, it can always perform a double spend

Orphaned blocks wasted hashing power reduce protocol security

The easier the PoW the more forks will occur.(the average time between two nodes to find a block should be much greater than the latency in the network)

Page 130: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

34

In more detailsDouble spending: If an adversary owns more than ½ the network hashing power, it can always perform a double spend

Orphaned blocks wasted hashing power reduce protocol security

The easier the PoW the more forks will occur.(the average time between two nodes to find a block should be much greater than the latency in the network)

Bitcoin protocol : - new blocks should arrive in average every 10 minutes- reward : 12.5BTC (divided by two every 4 years)

Page 131: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

Page 132: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

Bitcoin protocol : new blocks should arrive in average every 10 minutes

Page 133: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

: hashrate, hash/s of the network

Bitcoin protocol : new blocks should arrive in average every 10 minutes

Page 134: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

: hashrate, hash/s of the network

: probability of finding a block with 1 hash

Bitcoin protocol : new blocks should arrive in average every 10 minutes

Page 135: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

: hashrate, hash/s of the network

: probability of finding a block with 1 hash

: expecting number of hash before finding a block

Bitcoin protocol : new blocks should arrive in average every 10 minutes

Page 136: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

: hashrate, hash/s of the network

: probability of finding a block with 1 hash

: expecting number of hash before finding a block

: expecting number of seconds before finding a block

Bitcoin protocol : new blocks should arrive in average every 10 minutes

Page 137: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

: hashrate, hash/s of the network

: probability of finding a block with 1 hash

: expecting number of hash before finding a block

: expecting number of seconds before finding a block

We want

Bitcoin protocol : new blocks should arrive in average every 10 minutes

Page 138: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

: hashrate, hash/s of the network

: probability of finding a block with 1 hash

: expecting number of hash before finding a block

: expecting number of seconds before finding a block

We want

Bitcoin protocol : new blocks should arrive in average every 10 minutes

Page 139: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

: hashrate, hash/s of the network

: probability of finding a block with 1 hash

: expecting number of hash before finding a block

: expecting number of seconds before finding a block

We want

Bitcoin protocol : new blocks should arrive in average every 10 minutes

is the difficulty. The greater the difficulty, the smaller the probability

Page 140: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

35

In more details

: hashrate, hash/s of the network

: probability of finding a block with 1 hash

: expecting number of hash before finding a block

: expecting number of seconds before finding a block

We want

Bitcoin protocol : new blocks should arrive in average every 10 minutes

is the difficulty. The greater the difficulty, the smaller the probability

Page 141: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Page 142: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

Page 143: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Current difficulty : 4,022,059,196,164Current Hashrate : 29,911,310,546 GH/s (3 * 10^16 hash / s)

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

Page 144: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Current difficulty : 4,022,059,196,164Current Hashrate : 29,911,310,546 GH/s (3 * 10^16 hash / s)

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

How many BTC I gifted to my cousin in 2013,

Page 145: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Current difficulty : 4,022,059,196,164Current Hashrate : 29,911,310,546 GH/s (3 * 10^16 hash / s)

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

How many BTC I gifted to my cousin in 2013,but he lost it because it was a paper wallet : 0.022 BTC (170$)

Page 146: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Current difficulty : 4,022,059,196,164Current Hashrate : 29,911,310,546 GH/s (3 * 10^16 hash / s)

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

How many BTC I gifted to my cousin in 2013,but he lost it because it was a paper wallet : 0.022 BTC (170$)

Bitcoin's current estimated annual electricity consumption (TWh) : 67.3

Page 147: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Current difficulty : 4,022,059,196,164Current Hashrate : 29,911,310,546 GH/s (3 * 10^16 hash / s)

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

How many BTC I gifted to my cousin in 2013,but he lost it because it was a paper wallet : 0.022 BTC (170$)

Bitcoin's current estimated annual electricity consumption (TWh) : 67.3Annualized estimated global mining costs : $3,364,875,703

Page 148: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Current difficulty : 4,022,059,196,164Current Hashrate : 29,911,310,546 GH/s (3 * 10^16 hash / s)

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

How many BTC I gifted to my cousin in 2013,but he lost it because it was a paper wallet : 0.022 BTC (170$)

Bitcoin's current estimated annual electricity consumption (TWh) : 67.3Annualized estimated global mining costs : $3,364,875,703Electricity consumed per transaction (KWh) : 904

Page 149: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Current difficulty : 4,022,059,196,164Current Hashrate : 29,911,310,546 GH/s (3 * 10^16 hash / s)

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

How many BTC I gifted to my cousin in 2013,but he lost it because it was a paper wallet : 0.022 BTC (170$)

Bitcoin's current estimated annual electricity consumption (TWh) : 67.3Annualized estimated global mining costs : $3,364,875,703Electricity consumed per transaction (KWh) : 904Carbon footprint per transaction (kg of CO2) : 442.72

Page 150: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

36

Fun facts

Current difficulty : 4,022,059,196,164Current Hashrate : 29,911,310,546 GH/s (3 * 10^16 hash / s)

Estimated Satoshi’s balance : 1M BTC = 10 billion USD

How many BTC I gifted to my cousin in 2013,but he lost it because it was a paper wallet : 0.022 BTC (170$)

Bitcoin's current estimated annual electricity consumption (TWh) : 67.3Annualized estimated global mining costs : $3,364,875,703Electricity consumed per transaction (KWh) : 904Carbon footprint per transaction (kg of CO2) : 442.72

https://digiconomist.net/bitcoin-energy-consumption

Page 151: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts“Old-style” Consensus Algorithms Bitcoin PoW Consensus

37

How to avoid wasting energy for leader election ?

Page 152: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

38

How to avoid wasting energy for leader election ?

Page 153: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

39

Proof of Stake

Page 154: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

39

Proof of Stake

The more coins you own, the more chance you get of being elected

Page 155: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

39

Proof of Stake

The more coins you own, the more chance you get of being elected

Election :

Page 156: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

39

Proof of Stake

The more coins you own, the more chance you get of being elected

Election :

Page 157: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

39

Proof of Stake

The more coins you own, the more chance you get of being elected

Election :

For each address, take t = hash(adr + last block hash) / balance

Page 158: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

39

Proof of Stake

The more coins you own, the more chance you get of being elected

Election :

For each address, take t = hash(adr + last block hash) / balanceThe address with the smallest t is elected.

Page 159: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

40

Using “old-style” Consensus algorithm

Page 160: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAGBitcoin PoW Consensus

40

Using “old-style” Consensus algorithm

Elects n validators (with PoS for instance)The validators use “old-style” Consensus algorithm to agree on the next blocks

Page 161: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

41

Page 162: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

41

What is a smart contract ?

Page 163: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

41

What is a smart contract ?

Alice want to sell a singleplayer game

Page 164: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

41

What is a smart contract ?

Alice want to sell a singleplayer game

But users should buy a licence to play it

Page 165: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

41

What is a smart contract ?

Alice want to sell a singleplayer game

But users should buy a licence to play it

The contract is simple: a user pay 10$ and he can play it

Page 166: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

41

What is a smart contract ?

Alice want to sell a singleplayer game

But users should buy a licence to play it

The contract is simple: a user pay 10$ and he can play it

user paid ?

Yes/No

server with a secure paiement system, etc...

Page 167: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

42

What is a smart contract ?

Alice want to sell a singleplayer game

But users should buy a licence to play it

The contract is simple: a user pay 10$ and he can play it

user paid ?

Yes/No

Blockchain

Page 168: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

43

What is a smart contract ?

Page 169: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

43

What is a smart contract ?

“var usersWhoOwnTheGame: Set

If an address adr sent to Alice 10$ and add “buyTheGame()” in the data of a block then usersWhoOwnTheGame.insert(adr)

Page 170: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

43

What is a smart contract ?

“var usersWhoOwnTheGame: Set

If an address adr sent to Alice 10$ and add “buyTheGame()” in the data of a block then usersWhoOwnTheGame.insert(adr)

Alice add this to a block:

Page 171: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

43

What is a smart contract ?

“var usersWhoOwnTheGame: Set

If an address adr sent to Alice 10$ and add “buyTheGame()” in the data of a block then usersWhoOwnTheGame.insert(adr)

Alice add this to a block:

Then in addition to remember the balance of each address, each nodes remember the value of usersWhoOwnTheGame and updates it after each block if the condition is met.

Page 172: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

43

What is a smart contract ?

“var usersWhoOwnTheGame: Set

If an address adr sent to Alice 10$ and add “buyTheGame()” in the data of a block then usersWhoOwnTheGame.insert(adr)

Alice add this to a block:

Then in addition to remember the balance of each address, each nodes remember the value of usersWhoOwnTheGame and updates it after each block if the condition is met.

Should be understood by every nodes in the same way

Page 173: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

44

What is a smart contract ?

pragma solidity ^0.4.18; contract AliceGame {mapping(address => bool) public usersWhoOwnTheGame;

function buy() public payable {if(msg.value >= 10) {usersWhoOwnTheGame[msg.sender] = true;

}}

}

Alice add this to a block:

-> gets translated to EVM instructions

test here: http://remix.ethereum.org/

Page 174: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

45

PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x166 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT

Page 175: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

46

What is a smart contract ?

Page 176: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

46

What is a smart contract ?

Each and every node in the network executes all the smart contracts, and keep track of all the values of all the variables.

Page 177: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

46

What is a smart contract ?

Each and every node in the network executes all the smart contracts, and keep track of all the values of all the variables.

When a transaction arrives with data @AliceGame.buy() the node has to load the context of the smart contract into memory, executes the function, check if everything is ok, performs the corresponding actions.

Page 178: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

46

What is a smart contract ?

Each and every node in the network executes all the smart contracts, and keep track of all the values of all the variables.

When a transaction arrives with data @AliceGame.buy() the node has to load the context of the smart contract into memory, executes the function, check if everything is ok, performs the corresponding actions.

A client can ask a node “what’s the value of this variable @AliceGame.usersWhoOwnTheGame[playerAdr]”

Page 179: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

47

What is a smart contract ?

Page 180: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

47

What is a smart contract ?

Executing a contract has a cost depending on the complexity of the algorithm.

Page 181: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

47

What is a smart contract ?

Executing a contract has a cost depending on the complexity of the algorithm.

In bitcoin, a transaction just consumes space in the block (fees encourage miners to include a transaction)

Page 182: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

47

What is a smart contract ?

Executing a contract has a cost depending on the complexity of the algorithm.

In bitcoin, a transaction just consumes space in the block (fees encourage miners to include a transaction)

In Ethereum, the cost of a calling a contract is calculated in Gas (each EVM instruction has a Gas Cost)

Page 183: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

47

What is a smart contract ?

Executing a contract has a cost depending on the complexity of the algorithm.

In bitcoin, a transaction just consumes space in the block (fees encourage miners to include a transaction)

In Ethereum, the cost of a calling a contract is calculated in Gas (each EVM instruction has a Gas Cost)

When calling a contracts you declare

Page 184: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

47

What is a smart contract ?

Executing a contract has a cost depending on the complexity of the algorithm.

In bitcoin, a transaction just consumes space in the block (fees encourage miners to include a transaction)

In Ethereum, the cost of a calling a contract is calculated in Gas (each EVM instruction has a Gas Cost)

When calling a contracts you declareThe called function

Page 185: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

47

What is a smart contract ?

Executing a contract has a cost depending on the complexity of the algorithm.

In bitcoin, a transaction just consumes space in the block (fees encourage miners to include a transaction)

In Ethereum, the cost of a calling a contract is calculated in Gas (each EVM instruction has a Gas Cost)

When calling a contracts you declareThe called functionHow much gas at most the miner will spend executing it

Page 186: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

47

What is a smart contract ?

Executing a contract has a cost depending on the complexity of the algorithm.

In bitcoin, a transaction just consumes space in the block (fees encourage miners to include a transaction)

In Ethereum, the cost of a calling a contract is calculated in Gas (each EVM instruction has a Gas Cost)

When calling a contracts you declareThe called functionHow much gas at most the miner will spend executing itHow much Ether you’re willing to pay per Gas spent

Page 187: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

48

Fun fact

Page 188: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

48

Fun fact

You can buy this crypto cat for 150 ETH (10000$)

Page 189: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

49

Better Fact

https://www.dash.org/network/#section-governance

Page 190: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

50

So what’s the problem?

Page 191: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

50

So what’s the problem?

It does not scale

Page 192: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

50

So what’s the problem?

It does not scale

Bitcoin : 4 transactions / seconds

Page 193: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

50

So what’s the problem?

It does not scale

Bitcoin : 4 transactions / seconds

Visa: 2 000 transactions / seconds

Page 194: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

51

Solutions

Page 195: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

51

Solutions

Sharding (each node own a fraction of the database)

Page 196: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

51

Solutions

Sharding (each node own a fraction of the database)

Side-chains

Page 197: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Nxt PoS Consensus Ethereum Smart Contracts IOTA BlockDAG

51

Solutions

Sharding (each node own a fraction of the database)

Side-chains

DAG instead of Chain

Page 198: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

52

The Tangle (IOTA)

Page 199: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

52

The Tangle (IOTA)

Each transaction is a small block that reference two previous ones

Page 200: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

52

The Tangle (IOTA)

Each transaction is a small block that reference two previous ones

Page 201: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

52

The Tangle (IOTA)

Each transaction is a small block that reference two previous ones

You come up with a DAG (Directed Acyclic Graph)

Page 202: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

52

The Tangle (IOTA)

Each transaction is a small block that reference two previous ones

You come up with a DAG (Directed Acyclic Graph)

You’re only limited by bandwidth and storage

Page 203: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

53

The Tangle (IOTA)

Each transaction is a small block that reference two previous ones

sites

Page 204: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

53

The Tangle (IOTA)

Each transaction is a small block that reference two previous ones

sites

tips (unconfirmed sites)

Page 205: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

53

The Tangle (IOTA)

Each transaction is a small block that reference two previous ones

sites

tips (unconfirmed sites)

A new site and its parents should not create conflicts.

Page 206: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

54

The Tangle (IOTA)

How to read a value?

Page 207: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

55

The Tangle (IOTA)

How to read a value?

If you take a tip, you can order transactions and do the same as in a blockchain

Page 208: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

56

The Tangle (IOTA)

What if tips are conflicting?

A new site cannot confirm conflicting sites

How to read a value?

Page 209: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

57

The Tangle (IOTA)

What if tips are conflicting?

How to read a value?

Two conflicting tangles can appear

Which one is correct?

Page 210: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

58

The Tangle (IOTA)

Tip Selection Algorithm (TSA):- so we know how to read values- so we know where to extend the Tangle

Page 211: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

58

The Tangle (IOTA)

Tip Selection Algorithm (TSA):- so we know how to read values- so we know where to extend the Tangle

In Bitcoin, we read values from, and we try to extend, the longest chain. If you don’t follow this, you’ll lose money.

Page 212: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

59

The Tangle (IOTA)

In the Tangle, forks are ok if not conflicting

Page 213: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

59

The Tangle (IOTA)

In the Tangle, forks are ok if not conflicting

But conflicting forks are worst in this case

Page 214: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

59

The Tangle (IOTA)

In the Tangle, forks are ok if not conflicting

But conflicting forks are worst in this case

Page 215: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

60

The Tangle (IOTA)

In the Tangle, forks are ok if not conflicting

So its better to have something like this

Page 216: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

61

The Tangle (IOTA)

Page 217: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

61

The Tangle (IOTA)

Should be chosen with higher probability

Page 218: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

62

The Tangle (IOTA)Compute cumulative weight to each site

Page 219: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

62

The Tangle (IOTA)Compute cumulative weight to each site

1

1

1

2

6

3

35

8

6

1

11

12

8

15

Page 220: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

62

The Tangle (IOTA)Compute cumulative weight to each site

1

1

1

2

6

3

35

8

6

1

11

12

8

15

Perform a random walk

Page 221: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

62

The Tangle (IOTA)Compute cumulative weight to each site

1

1

1

2

6

3

35

8

6

1

11

12

8

15

Perform a random walk

Page 222: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

Ethereum Smart Contracts IOTA BlockDAG Infinite Scalability

63

The Tangle (IOTA) How many tips are left behind ?

Page 223: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

64

Page 224: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

65

QuarkChain white paper :

https://quarkchain.io/QUARK%20CHAIN%20Public%20Version%200.3.4.pdf

Page 225: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

66

QuarkChain white paper :

https://quarkchain.io/QUARK%20CHAIN%20Public%20Version%200.3.4.pdf

Page 226: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

67

Page 227: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

68

Take Away

Page 228: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

68

Take Away

graphic quality of the white paper

1quality of a protocol =

Page 229: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

68

Take Away

graphic quality of the white paper

1quality of a protocol =

Ethereum Smart contracts are smart

Page 230: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

68

Take Away

graphic quality of the white paper

1quality of a protocol =

Ethereum Smart contracts are smart

IOTA tangle is tangled

Page 231: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

Perspectives

Page 232: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Page 233: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain security

Page 234: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacks

Page 235: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacksHow to defend against them

Page 236: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacksHow to defend against them

Also :

Page 237: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacksHow to defend against them

Also :How to store efficiently blockchain data

Page 238: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacksHow to defend against them

Also :How to store efficiently blockchain dataLots of algorithms for quick graph traversal / transactions validation are specific toblockchain and could be optimized

Page 239: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacksHow to defend against them

Also :How to store efficiently blockchain dataLots of algorithms for quick graph traversal / transactions validation are specific toblockchain and could be optimized

And also :

Page 240: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacksHow to defend against them

Also :How to store efficiently blockchain dataLots of algorithms for quick graph traversal / transactions validation are specific toblockchain and could be optimized

And also :What programs could run on the blockchain for distributed democracy / authority /management system for IoT devices

Page 241: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacksHow to defend against them

Also :How to store efficiently blockchain dataLots of algorithms for quick graph traversal / transactions validation are specific toblockchain and could be optimized

And also :What programs could run on the blockchain for distributed democracy / authority /management system for IoT devicesHow to analyze blockchain history to predict …

Page 242: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

69

PerspectivesLots of interesting open problems about :

Network impacts on blockchain securityProperly defining the attacksHow to defend against them

Also :How to store efficiently blockchain dataLots of algorithms for quick graph traversal / transactions validation are specific toblockchain and could be optimized

And also :What programs could run on the blockchain for distributed democracy / authority /management system for IoT devicesHow to analyze blockchain history to predict …

Page 243: Introduction to DLTs › slides › Introduction to DLTs.pdf · [Bramas 2016] Packet efficient implementation of the omega failure detector [CAP theorem] "Brewer's conjecture and

IOTA BlockDAG Infinite Scalability

Conclusion

70

PerspectivesLots of interesting open problems about :

Network impacts on blockchain security Properly defining the attacks How to defend against them

Also : How to store efficiently blockchain data Lots of algorithms for quick graph traversal / transactions validation are specific to blockchain and could be optimized

And also : What programs could run on the blockchain for distributed democracy / authority / management system for IoT devices How to analyze blockchain history to predict …

Thank you for your attention !Quentin Bramas. The Stability and the Security of the Tangle. 2018. 〈hal-01716111v2〉