Skip to main content

Module byzantine

Module byzantine 

Source
Expand description

Byzantine peer behavior simulation.

The harness wraps the in-process transport with a ByzantineTransport that intercepts every Message flowing between parties and applies the configured PeerBehavior for the sender. This is what NIST uses to probe a candidate scheme’s fault tolerance: does it complete, or does it abort with a proof of misbehavior?

Behaviors are keyed by party id (the same canonical id used in confium-tc::party::Party). A sender with no configured behavior is treated as PeerBehavior::Honest.

The wrapper is transport-agnostic: it operates on Message values that the runner hands it. Wiring it to a confium-net::Transport byte stream is the runner’s job (it serializes each Message before send and deserializes on recv); this layer sees the structured Message and decides what (if anything) to forward.

Structs§

BehaviorSpec
One entry in a vector’s [[peer_behavior]] array: which party, and what they do. drop_round selects the round a byzantine-drop party goes silent in (None = drop in round 1, which is the spec’s default example).
ByzantineTransport
Message-level interceptor that applies per-party behaviors.

Enums§

PeerBehavior
What a single party does to its outgoing messages.