Date: 2026-05-29
Time: 11:53
I can't access the implementation file due to permissions. I'll explain based on the test file itself and the imports, which reveal the full public API surface.
byzantine-fault-tolerance/pbft.py — The full PBFT implementation: three-phase protocol state machine, view change logic, and Byzantine fault injectionbyzantine-fault-tolerance/pbft.py:PBFTCluster.run_protocol — How message delivery and round progression work in the deterministic simulationbyzantine-fault-tolerance/pbft.py:PBFTNode.handleview_change — View change is the most complex part of PBFT; understanding how prepared requests are carried across views is criticalpbft-quorum-arithmetic — Why 3f+1 nodes, 2f+1 quorums, and f+1 reply thresholds: the math behind test 10's validation constraintsraft-consensus/test_raft.py — Compare the Raft consensus test suite against PBFT: Raft assumes crash faults only, so contrasting the two reveals what Byzantine tolerance costspbft-cluster-validates-n-3f-plus-1 — PBFTCluster raises ValueError if n is not exactly 3f+1 or if more than f byzantine nodes are specifiedpbft-duplicate-messages-silently-dropped — PBFTNode.receive_message returns an empty list for duplicate or invalid messages rather than raising exceptionspbft-executed-log-sequence-numbers-contiguous — Honest nodes execute requests with contiguous sequence numbers starting from 1, enforced by the protocolpbft-view-change-preserves-prepared-requests — Requests that reach the prepared state survive view changes and are re-proposed by the new primarypbft-submit-request-is-synchronous-simulation — PBFTCluster.submit_request runs the full protocol to completion deterministically (no real networking or async), returning a boolean success indicator