1 of 16

Tool: An Efficient and Flexible Simulator for Byzantine Fault-Tolerant Protocols

* National Taiwan University, Taiwan Academia Sinica, Taiwan

Ping-Lun Wang*

R09922058@csie.ntu.edu.tw

Tzu-Wei Chao*

CheshireCatNick@gmail.com

Chia-Chien Wu*

gccbs02590@gmail.com

Hsu-Chun Hsiao*

hchsiao@csie.ntu.edu.tw

2 of 16

Byzantine Fault-Tolerant (BFT) Protocols

  • Reach consensuses through network messages
  • Tolerate less than 1/3 faulty nodes
    • Aircraft systems
    • Blockchain systems

2

3 of 16

BFT Protocols: Security Guarantees

3

Safety

Ensure consistent state of nodes

Liveness

Consensus will be reached

FLP impossibility[1]: cannot be provided at the same time!

(in an asynchronous network)

Assume a partially-synchronous network

[1] Michael J. Fischer, Nancy A. Lynch, and Michael S. Paterson.

Impossibility of distributed consensus with one faulty process. (PODS '83).

4 of 16

Partially-Synchronous Network Assumption

4

Transfer time: bounded

After GST

(Global Stabilization Time)

Theoretical Analysis

Reality

Transfer time: ?

How can we evaluate the performance in a realistic setting?

Unbounded network delays

Network attacks

5 of 16

BFT Protocol Simulation

  • Why simulation?

5

Overall performance

Various network

Under attacks

High efficiency

Easy to deploy

… more

May differ from a real system

Calculation cost cannot be evaluated

6 of 16

Our BFT Simulator

7 of 16

Our Simulator Compare to Others

  • There are already some BFT simulators… [2, 3]
  • What can we achieve?

1. Much better performance

  • Simplified network
  • Only protocol messages
  • Only connectivity between nodes and no topology

2. Global attacker

  • Byzantine nodes collude together
  • Network attacks
  • Adaptive attacker

7

[2] A. Singh, T. Das, P. Maniatis, P. Druschel, and T. Roscoe.

BFT protocols under fire, NSDI 2008

[3] S. Bano, A. Sonnino, A. Chursin, D. Perelman, and D. Malkhi.

Twins: White-Glove Approach for BFT Testing. arXiv 2020.

8 of 16

Structure

  • Four major components
    • Controller
    • Consensus module
    • Network module
    • Attacker module
  • Configuration file
    • BFT protocol and nodes
    • Network environment
    • Attacker
  • Simulation result
    • Time and message usage
    • Execution trace of each node

8

9 of 16

BFT Protocol Implementation

  • Flexible design
    • BFT protocol logic
    • Handler for message and time events
    • Communication interface to the controller
  • We implemented
    • Three versions of ADD+ BA
    • Algorand Agreement
    • Async BA
    • PBFT
    • HotStuff with a naive view synchronizer
    • LibraBFT
  • Implementation validation
    • Validator module - PBFT

9

10 of 16

Attack Implementation

  • Extendable design
    • Attack logic
    • Handler for message and time events
  • Attacker models
    • Fail-stop
    • Network partition
    • Static and adaptive
    • Rushing

10

11 of 16

Experiment Results

12 of 16

Performance Comparison

12

13 of 16

Various Network Environments

13

14 of 16

Simulation With Attacks

14

↑ Different number of fail-stop nodes

↑ Network partition attack

15 of 16

Visualizaing BFT Protocols

15

16 of 16

Conclusion

  1. Simulation has several advantages over other methods, such as more efficient, support various environments, and easier to deploy
  2. Our simulator supports a wide range of BFT protocols and attacks, and it has much better performance than existing work
  3. Our simulator allows us to discover interesting behavior of BFT protocols, and we anticipate it to empower future research

16