This repository shares my implementation of a toy state machine replication built on top of the dolev-strong protocol for educational purposes.
- 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.
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.
Node 0's register value is 0
Node 0's history is []
Node 3's register value is 0
Node 3's history is []- 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)
- sometime, send value
Occasionally, the register values of honest nodes may differ, but their histories remain identical because the executor has not yet applied the latest record.
The dolev-Strong protocol is an authenticated protocol for solving broadcast, against any adversary controlling t<n out of n parties, in t+1 rounds.
-
Permissioned: a prior known set of nodes
${1, 2, 3, ..., n}$ . -
Public Key Infrastructure: each node has a pair of
$pk_i$ ,$sk_i$ where$pk_i$ is known to all nodes upfront. -
Synchronous Network:
- all nodes share a global clock, time steps from
${0, 1, 2, ...}$ . - the message sent from time
$t$ will be arrived at time$t+1$ (in some arbitrary order).
- all nodes share a global clock, time steps from
-
Node Failure: there are
$f$ number of nodes that can be byzantine.



