A Decentralized Blockchain with High Throughput and Fast - - PowerPoint PPT Presentation

a decentralized blockchain with high throughput and fast
SMART_READER_LITE
LIVE PREVIEW

A Decentralized Blockchain with High Throughput and Fast - - PowerPoint PPT Presentation

A Decentralized Blockchain with High Throughput and Fast Confirmation Chenxing Li , Peilun Li , Dong Zhou , Zhe Yang , Ming Wu , Guang Yang , Wei Xu , Fan Long , Andrew Chi-Chih Yao Tsinghua University Conflux


slide-1
SLIDE 1

A Decentralized Blockchain with High Throughput and Fast Confirmation

Chenxing Li∗, Peilun Li∗, Dong Zhou, Zhe Yang†, Ming Wu†, Guang Yang†, Wei Xu, Fan Long‡†, Andrew Chi-Chih Yao Tsinghua University †Conflux Foundation ‡University of Toronto

∗The first two authors contributed equally.

slide-2
SLIDE 2

An Ideal Blockchain System

  • Robustness

§ Safety against double spending attacks § Liveness against denial of service attacks

  • Performance

§ High throughput § Fast confirmation

  • Decentralization

§ Scale to large amount of participants § Permissionless to join and leave

slide-3
SLIDE 3

Blockchain Performance Problem

Transactions per Second: ~7 ~30 ~200 ~3000

Undesirable user experience, long processing delay, and skyrocketing transaction fees!

Confirmation Latency: 1 hour 7~10 minutes Few seconds Few seconds

slide-4
SLIDE 4

Bitcoin and Ethereum Background

P2P gossip network

Blue: 2 Red: 1 Blue: 2 Red: 1 Blue: 2 Red: 1 Blue: 2 Red: 1 Blue: 2 Red: 1 Blue: 2 Red: 1 Blue: 2 Red: 1 Blue: 2 Red: 1

The Blockchain:

A record of transactions

4

Secured by “Proof-of-Work” Sybil Attack

slide-5
SLIDE 5

Standard Nakamoto Consensus

  • Longest-chain: all participants agree on the

longest chain as the valid transaction history

§ Security assumption is >50% computation power owned by honest nodes.

  • Slow/small block generation

§ Bitcoin: 1MB block per 10 minutes § Ethereum: ~100KB block per 15 seconds

slide-6
SLIDE 6

What if we run Nakamoto Consensus with lar

large e

blocks or fa

fast generation?

slide-7
SLIDE 7
  • Mining are concurrent and block broadcast has delay
  • Larger block size/faster block-gen rate -> more forks
  • Forks waste network/processing resources
  • Downgrade safety

Block1

Block0 Block2 Blockn-1

Blockn fork fork fork fork fork fork Agreed chain

slide-8
SLIDE 8

Longest Chain is No Not Safe e with Fast Generation

Block1

Block0 Block2 Blockn-1

Blockn fork fork fork fork fork fork

Suppose the Longest Chain has 10% of blocks

A1 A0 A2 Am-3

Am-2 Am-1 Am

Attacker with more than 10% computation power will be able to revert the longest chain

slide-9
SLIDE 9

GHOST Consensus

  • Proposed by Sompolinsky et. al., ICFCDS’15, adopted partially by

Ethereum

  • Heaviest subtree rule
  • Start from the Genesis block
  • Iteratively advance to the child block with the largest subtree
slide-10
SLIDE 10

Genesis A B G C D E F H J I K

  • 1. Start from the Genesis block
  • 2. Iteratively advance to the child block with the largest subtree

GHOST Rule:

Subtree A has 6 blocks Subtree B has 5 blocks New Block

All the blocks including forked blocks contribute to the chain selection

slide-11
SLIDE 11

GHOST is Weak to Liveness Attacks

  • When the block generation is much faster than d, an attacker with

little computation power can stall the consensus forever!

G A

Honest Group A Honest Group B Maximum delay of d

AttackerA AttackerA AttackerB AttackerB A A A A A A B B B B B B B

slide-12
SLIDE 12

One Fix: Structured GHOST Approach

  • Only 1/h of blocks have weights for chain selection

§ Remaining blocks only contribute transactions

  • Secure against liveness attacks if h is large enough

§ Because concurrent generation of weighted blocks is rare

  • Cons: Slow confirmation!

§ Need to wait for enough weighted blocks being generated to confirm

G A A A A A A B B B B B B B A B

slide-13
SLIDE 13

Greedy Heaviest Adaptive SubTree (GHAST)

  • Assign different weights to generated blocks
  • Select pivot chain using heaviest subtree rule and decide total order
  • f all blocks based on the pivot chain.
  • In normal scenarios, assign equal weights to all blocks

§ Operate like GHOST § Achieve near optimal throughput and confirmation latency

  • When attack happens, assign high weights to a small subset of blocks

§ Operate like structured GHOST § Slow confirmation to ensure consensus progress

slide-14
SLIDE 14

How to make honest participants

aut automatic ically ally switch between

two scenarios?

slide-15
SLIDE 15

Genesis

Tx0 Tx1

A

Tx2

B

Tx3 Tx4

G

Tx4

C D E F H J I K Parent edges Ref edges

Conflux operates with a Tree-Graph structure. Each block has one parent edge.

slide-16
SLIDE 16

Genesis

Tx0 Tx1

A

Tx2

B

Tx3 Tx4

G

Tx4

C D E F H J I K Parent edges Ref edges

Each block may have multiple reference edges Reference edges simply denote happens-before relationships E admits that D is generated before E

slide-17
SLIDE 17

Genesis

Tx0 Tx1

A

Tx2

B

Tx3 Tx4

G

Tx4

C D E F H J I K Parent edges Ref edges

  • 1. Select the last block in the pivot chain as the parent
  • 2. Create reference edges to all other blocks without incoming edges

New Block

When generating a new block:

slide-18
SLIDE 18

Genesis

Tx0 Tx1

A

Tx2

B

Tx3 Tx4

G

Tx4

C D E F H J I K Parent edges Ref edges New Block

Edges in the Tree-Graph capture the history blockchain state for each generated block The past-subgraph of a block à All blocks that the block generator saw

slide-19
SLIDE 19

Determine Weights from Past Sub-graphs

  • All honest participants will agree on the weights
  • Even with the presence of attackers!

Weight of the generated block

Is the past sub-graph stable enough? Yes: Assign weight 1 No: Assign weight h for 1/h blocks, 0 for other blocks

slide-20
SLIDE 20

Determine Sub-graph Stability

  • Rationale: For any pivot chain block A that is generated long enough,
  • ne of its child A’ must become dominant
  • Most future blocks after A should accumulate under the subtree of A’

A’

Subtree of A’

A …

All blocks generated after A

slide-21
SLIDE 21

Trusted Block Generation Time: TimerChain

  • TimerChain: a blockchain embedded in TreeGraph with longest-chain

rule and low generation rate.

§ A small subset of blocks (Timer Blocks) have weights, like structured GHOST

  • Block generation time: the height of the latest Timer Block in its past.

Past of A

G A B C D … … GenerationTime(A) = TimerChainHeight(C) E …

slide-22
SLIDE 22

Conflux Ordering Algorithm

  • Key Idea: deterministically define a block total order of a Tree-Graph

based on a chain

  • First use GHAST to agree on a pivot chain of blocks
  • Then extend the agreed pivot chain into a total order of all blocks in

the Tree-Graph

slide-23
SLIDE 23

Genesis A B G C D E F H J I K Parent edges Ref edges Epoch of Genesis Epoch of A Epoch of C Epoch of E Epoch of H

  • 1. Each pivot chain block forms one epoch
  • 2. An off-chain block belongs to the first epoch whose

corresponding pivot chain block happens after it.

D belongs to the epoch of E, because D happens before E but does not happen before C

slide-24
SLIDE 24

Genesis A B G C D E F H J I K Parent edges Ref edges Epoch of Genesis Epoch of A Epoch of C Epoch of E Epoch of H

  • 1. Order based on epoch first
  • 2. Topologically sort blocks in each epoch
  • 3. Break ties based on block id

Block Total Order: Genesis, A, B, C, D, F, E, G, J, I, H, K

slide-25
SLIDE 25

Implementation & Optimizations

  • Implemented in Rust with a modified EVM to handle smart contract

transactions.

  • Several key optimizations:
  • Link-cut tree and lazy validation

§ Efficiently maintain weights in Tree-Graph

  • Deferred execution

§ Avoid redundant execution rollbacks

slide-26
SLIDE 26

Evaluation

slide-27
SLIDE 27

Experimental Environment

  • Run up to 12k Conflux full nodes on Amazon EC2 m5.2xlarge VMs
  • Limit the bandwidth of each full node to 20Mbps
  • Simulate network latency between full nodes
  • Measure the achieved throughput and confirmation latency

§ Consider a block confirmed if its confidence is the same as waiting for 6 Bitcoin blocks

slide-28
SLIDE 28

Throughput, Latency, and Scalability

  • 300K block size and 4

block per second.

  • Conflux achieves

9.6Mbps throughput

  • Up to 32X GHOST

throughput.

  • Confirm transactions
  • n avg. 51.5 seconds.
  • Scales to 12k full nodes

Run up to 15 full nodes per EC2 VM and disabled transaction executions

slide-29
SLIDE 29

Conclusion

  • Conflux achieves both high throughput and fast confirmation.
  • Conflux is safe against both double spending and liveness attacks.
  • Conflux achieves this with a novel consensus protocol GHAST, which

assigns different weights to blocks adaptively and automatically.

  • With 12K nodes, Conflux can reach 9.6Mbps throughput and confirm

blocks within one minute.

slide-30
SLIDE 30

Thanks!

Presenter Email: lpl15@mails.tsinghua.edu.cn Conflux Website: https://www.conflux-chain.org/