Skip to content

BFT DPoS

auxten edited this page Apr 19, 2018 · 1 revision

BFT-DPoS

liuzhiteng, ThunderDB zhiteng.liu@thunderdb.io


Outline

  • Byzantine Fault Tolerance
  • DPoS Block Producing
  • Transaction as Proof of Stake
  • EOS.IO Implementation

Byzantine Fault Tolerance

Oral message are characterized as follows:

  • Every message that is sent is delivered correctly
  • The receiver of a message knows who sent it
  • The absence of a message can be detected

To tolerate m traitorous generals, requires 3m + 1 generals utilizing m + 1 rounds of information exchange.

a.k.a. Bounds on Fault Tolerance, applies to all consensus algorithms.


DPoS Block Producing

for i from 1 to INF
    dlist_i = get N delegates sort by votes
    dlist_i = shuffle(dlist_i)

    for j from 1 to N * K
        slot = global_time_offset / block_interval
        pos = slot % N

        if dlist_i[pos] exists in this node
            generateBlock(keypair of dlist_i[pos])
        else
            skip
        end
    end
end

Simplified Model

  • Block producers A, B, and C take turns to produce blocks every 3 seconds
  • Basic Rule: Longest Chain Wins

Normal Case


Minority Fork

  • Majority fork: 2 blocks / 9 secs
  • Minority fork: 1 block / 9 secs

Unlimited Minority Fork


Restore from Network Fragmentation

  • Each block producer was isolated due to network issue
  • Network connectivity is restored


Connected Minority Fork

Last Irreversible Block

  • Defines longest chain
  • Confirmation of irreversibility


Transaction as Proof of Stake (TaPoS)

The EOS.IO software requires every transaction to include part of the hash of a recent block header.

  • Prevents replay of a transaction on different forks
  • Signals the network that a particular user and their stake are on a specific fork

vs Proof-of-Work Security


EOS.IO Implementation (Whitepaper v1)

  • Direct connection
  • Remove random shuffle
  • 3s block time, confirmation time:

$$3s*(21*\dfrac{2}{3}+1)=45s$$


DAWN 3.0 (Whitepaper v2)

  • Asynchronous Byzantine Fault Tolerance (aBFT) for faster achievement of irreversibility
  • 500ms block time, under 1s confirmation

Q&A


Thank You!