scalable consensus algorithms in distributed ledger ...³لسله سمینارهای رمز و...

Post on 27-May-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Scalable Consensus Algorithmsin

Distributed Ledger TechnologiesHabib Yajam

Secure Communication Lab,

University of Tehran

1

Outline

• Blockchains, what are them? Why we need them? And when?

• A Brief History of Bitcoin.

• Consensus Algorithms, Definition and Properties.

• Categorizing Consensus Algorithms.

• Hot Topics for Research.

2

BlockchainsWhat are them? Why we need them? And when?

3

When do we need a Blockchain?

4

Is a Shared Common Database

needed?

Are Multiple Parties involved?

Do Parties have conflicting interests?

Traditional Database

Blockchain(DLT)

yes

yes

yes

no

no

noCan everyone see

the database?

Can everyone maintain the

database integrity?

Permissioned Private Ledger

(Bankchain)

Permissioned Public Ledger

(Ripple)

Permissionless Public Ledger

(Bitcoin)

yes

yes

no

no

Blockchain Use Cases

• P2P Payments

• Video Games

• Back Office Settlement

• Supply Chain Management

• Copyright Management

• Reliable Log Keeping

• Digital Identity Management

• Decentralized Voting

5

What are the Ingredients?

• P2P Network

• Consensus Algorithm

• Ledger Database

6

P2P Network

7

Transaction Flow in Bitcoin

8

mempool

Bitcoin Blockchain

9

Generating a Valid Block (Mining)

10

Has

hFu

nct

ion

4198659816850181691986501

< 𝑡𝑎𝑟𝑔𝑒𝑡Change nonce

Publish to Network

no

yes

Generating a Valid Block (Mining)

11

Has

hFu

nct

ion

1712039707102730871029375

< 𝑡𝑎𝑟𝑔𝑒𝑡Change nonce

Publish to Network

no

yes

Generating a Valid Block (Mining)

12

Has

hFu

nct

ion

0000961965911298498619761

< 𝑡𝑎𝑟𝑔𝑒𝑡Change nonce

Publish to Network

no

yes

Nakamoto Consensus

13

Nakamoto Consensus

14

Nakamoto Consensus

15

Nakamoto Consensus

16

Nakamoto Consensus

17

Nakamoto Consensus

18

Forks

19

Normal State Fork in Blockchain

Double Spending Attack

20

Double Spending Attack

21

Double Spending Attack

22

Double Spending Attack

23

Double Spending Attack

24

BitcoinA Brief History

25

Bitcoin History (2009)

• 01/03: (Block 1) The genesis block established by Satoshi Nakamoto. marking the creation of the cryptocurrency.

• 01/09: (Block 2) Bitcoin v0.1 was released and mining began.

Bitcoin History (2009)

• 01/11: (Block 78) the first block mined by an individual other than Satoshi. It was Hal Finney.

• 01/12: (Block 170) The first transaction occurred between Satoshi and Hal Finney.

27

Bitcoin History (2009)

• 10/05: (Block ~24400) first bitcoin exchange price was determined by Libertarian Advocating Website “New Liberty Standard” (~0.0008$)

• 12/10: (Block 32256) The difficulty adjusts for the first time, rising from 1 to 1.18.

Bitcoin History (2010)

• 02/06: (Block ~57600) dwdollar’s Bitcoin Market first bitcoin exchange was started. Used PayPal as the method of exchange.

• 05/22: (Block 57043) First purchase of a tangible good using bitcoin. (0.0025$)

Bitcoin History (2010)

• 07/02: (Block ~65600) Bitcoin v0.3 was released.

• 07/17: (Block ~67040) Mt.Gox, Second Bitcoin Exchange and most well-known exchange at the time was established.

• 07/18: (Block ~67180) First time GPU Mining by pseudonymous person named ArtForz. Later he Acquired 25% of bitcoin network hashing power using a private GPU program.

Bitcoin History (2010)

• 12/13: (Block ~97300) Satoshi’s Last Login on BitcoinTalk. He later said he has “moved on to other things”. That was the last the world heard of the secretive Bitcoin creator.

• 12/16: (Block 97834) First Pool-mined Bitcoin Block by Slush Pool.

31

Bitcoin History (2011)

• 02/01: (~Block 105000) Silk road an online black market and the first modern darknet market, best known as a platform for selling illegal drugs opens.

• 02/09: (~Block 107000) Dollar Parity happens on Mt.Gox.

32

Bitcoin Price History

33

Bitcoin P2P network

34

Number of Nodes

35

Orphan Rate

36

Bitcoin Mining

37

Bitcoin Mining

38

Bitcoin Mining

39

Bitcoin Mining

40

Bitcoin Mining Hashrate Distribution

41

Other Cryptocurrencies

• Litecoin 2011 (PoW Scrypt) [Currency]

• Ripple 2012 (BPFT) [Currency]

• Dash 2014 (PoW X11 + PoS) [Privacy]

• Ethereum 2015 (PoW → PoS) [DApps]

• Zcash 2016 (PoW Equihash) [Privacy]

• IOTA 2017 (PoW Curl) [Currency]

• Cardano 2017 (PoS Provably Secure) [DApps]

42

Consensus AlgorithmsDefinition, Goals and Properties

43

Defining Consensus

• Consensus:Achieving agreement in a multi-agent system.

• If communication/agents are reliable:Consensus is Trivial

• Consensus Algorithms:Achieving agreement in an unreliable environment

44

Defining Consensus

• Unreliability Model: Fault

• Types of Fault:• Crash fault:

node hangs/stops/goes offline

• Byzantine fault:node violates protocol maliciously

45

Defining Consensus

• Properties of Consensus Algorithms:

• Safety (Consistency)

• Liveness (Availability)

• Throughput

• Latency

• Scalability

• Decentralization, Transparency, Order Preserving, …

46

Consistency

• A confirmed transaction in an honest node will eventually be confirmed by all honest nodes.

47

Consistency

Node1

6

8

1

9

Node3

6

8

1

9

Node2

6

8

1

9

Node4

6

8

1

9

48

Consistency

Change “8” to “5”

Node1

6

8

1

9

Node3

6

8

1

9

Node2

6

8

1

9

Node4

6

8

1

9

49

Consistency

Change “8” to “5”

Node1

6

5

1

9

Node3

6

8

1

9

Node2

6

8

1

9

Node4

6

5

1

9

50

Availability

• A valid transaction will eventually be confirmed by an honest node.

51

Availability

Node1

6

8

1

9

Node3

6

8

1

9

Node2

6

8

1

9

Node4

6

8

1

9

Append “7”

52

Availability

Node1

6

8

1

9

7

Node3

6

8

1

9

7

Node2

6

8

1

9

7

Node4

6

8

1

9

7 53

Throughput/Scalability

• Throughput:Number of newly confirmed transactions per unit of time.

• Latency:

• Time it takes for a newly created transaction to get confirmed in an honest node.

• Scalability:In a scalable consensus algorithm, increasing the number of participants does not affect performance.

54

CategorizingConsensus AlgorithmsVoting-based, Chain-based, DAG-based

55

Categorization of Consensus Alg.

• Vote-based Consensus:• First Prominent Voting-base Protocol by Leslie Lamport 1998

• Example: PBFT, Paxos, Ripple

• Fast ✓

• Not Scalable

56

Categorization of Consensus Alg.

• Chain-based Consensus:• Introduced by Satoshi Nakamoto in 2008

• Example: Bitcoin, Ethereum

• Scalable ✓

• Not Fast

4Txs

3Txs

2Txs

1Txs

4Txs

3Txs

2Txs

1Txs

5Txs

57

Categorization of Consensus Alg.

• DAG-based Consensus:• Introduced by Sergio Demian Lerner in 2015

• Example: IOTA, Nano

• Fast ✓

• Scalable ✓

58

Categorization of Consensus Alg.

• Permissioned

• Permissionless:• Proof-of-Work

• Proof-of-Stake

• Proof-of-Importance

• Proof-of-Activity

• Delegated-Proof-of-Stake

• ...

Scalable+

Permissionless+

Byzantine Fault Tolerant=

New Form of Decentralization

59

Categorization of Consensus Alg.

Voting-based

Chain-based

DAG-based

Ripple, R3 Corda, Stellar, Fabric,

Chain Core, QuorumMultichain, Vechain Hashgraph

Zilliqa, NEO

Bitcoin, Etheruem, NEM, Qtum,

OmiseGo, TRON, EOS, Cardano

IOTA

60

BitcoinFirst Chain-based

2008

C D

DAGcoinFirst DAG-based

2015

EtheruemFirst Smart Contract

2013

C

V

PAXOSMost Famous Voting-based

1998

V

Apache Zookeeper

2007

Zab

C

PeercoinFirst Proof-of-Stake2012

Year Year Year

1998 2008 2018

2013 2014 2015 2016 20172009 2010 2011 20122004 2005 2006 20072000 2001 2002 20031999

PBFTFamous Byzantine

1999

V

V

RippleFast Payment

2011

2019

D

TangleIOTA

2016

D

PHANTOMAcademic Paper2017

61

Blockchain Scalability Solutions

• Base Layer Solutions:• Decoupling Blockchain

• Bitcoin-NG• Fruitchains• PRISM

• DAG-based Consensus Algorithms• Spectre• Phantom GHOST-DAG

• Hybrid Chain-based Voting-based Algorithms• Byzcoin• Casper: the friendly finality gadget• Thunderella

• Sharding

62

Blockchain Scalability Solutions

• Second Layer Solutions:• Lightening Network

• Plasma Network

63

Research Topics

64

Research Topics

• High-throughput, Low-latency, Scalable Consensus Algorithms.

• Privacy in Blockchains both in Smart-contracts and Payments.

• Multi Party Computations Using Blockchain.

• Blockchain Use Cases in Internet of Things.

65

Thank you

66

top related