An open API service indexing awesome lists of open source software.

https://github.com/timyiu478/dolev-strong-protocol

A State Machine Replication built on top of Dolev-Strong Authenticated Broadcast Protocol
https://github.com/timyiu478/dolev-strong-protocol

byzantine-broadcast consensus distributed-systems pki protocol simulation state-machine-replication synchrony

Last synced: 7 months ago
JSON representation

A State Machine Replication built on top of Dolev-Strong Authenticated Broadcast Protocol

Awesome Lists containing this project

README

          

## About

This repository shares my implementation of a toy state machine replication built on top of the dolev-strong protocol for educational purposes.

---

## Overall Design

![](assets/overall_design.png)

---

## Repo Structure

- **src/**: Contains the main source code for the protocol and state machine.
- **main.py**: Run this script to start a protocol simulation.
- **tests/**: Includes test cases for validating protocol correctness.
- **assets/** & **recording/**: Visual resources for documentation and examples.

---

## Example Run

### Understand The Output

The program will output the register value and history(append-only log) of each honest node for each dolev-strong protocol cycle(or epoch). We should see that all honest nodes have the same register value and history at the end of each cycle.

```bash
Node 0's register value is 0
Node 0's history is []
Node 3's register value is 0
Node 3's history is []
```

### Attack Strategies

- non-sender: does not participate in the protocol
- sender:
- sometime, send value $v1$ to half of the non-senders and send value $v2$ to another half of the non-senders
- sometime, it follows the protocol correctly (it acts as an honest node)

### Case 1: 2 Honest Nodes, 2 Faulty Nodes, 1 is the sender and 1 is the non-sender, fixed leader mode

![2_f_n_1_sender.gif](recording/2_faulty_node_1_sender_1_non_sender.gif)

### Case 2: 2 Honest Nodes, 2 Faulty Nodes, both are non-senders, fixed leader mode

![2_f_n_both_non_senders.gif](recording/2_faulty_node_2_non_senders.gif)

### Case 3: 2 Honest Nodes, 2 Faulty Nodes, round-robin leader election mode

![rr_leader_election.gif](recording/round_robin_leader_election.gif)

Occasionally, the register values of honest nodes may differ, but their histories remain identical because the executor has not yet applied the latest record.

---

## Dolev-Strong protocol

The dolev-Strong protocol is an authenticated protocol for solving broadcast, against any adversary controlling *t