Skip to main content

Module simulation_support

Module simulation_support 

Source
Expand description

Shared deterministic mechanics for the browser and storage simulation harnesses.

Structs§

NodeFingerprint
What one node contributes to the cluster fingerprint.
StableFingerprint
Stop after two timer rounds leave the cluster fingerprint unchanged.

Enums§

SimulationTimer
The timer wheel includes a leader heartbeat in addition to core timers.

Traits§

PartitionMessage
The endpoints of one queued message, used to clear messages crossing a simulator partition.

Functions§

action_messages
Translate the consensus actions that only send messages. None leaves local log and timer effects to the harness.
append_epochs
Append one leader epoch per simulated record.
clear_timer
Disarm the timer that just fired before applying its event.
earliest_timer
Earliest timer, retaining the input node order and timer order on equal deadlines.
epochs_to_replicate
Return the leader suffix a follower log of follower_len records lacks.
fetch_response
Answer a leader-side fetch only when data or divergence can advance the follower.
fingerprint
A node fingerprint uses the core’s leader watermark when it leads.
partition_node
Isolate one node and remove messages already in flight to or from it.
reachable_leader
A fetch watchdog can poll again while the node’s leader is reachable.
reconcile_timers
Enforce per-role timer ownership, preserving existing leader heartbeats.
truncate_epochs
Clamp negative cuts to zero; a cut beyond the log preserves it.
voter_set
Static simulator voters have no directory identity or network endpoints.