Expand description
Determinism guard: trap handlers for clock, randomness, and thread spawn in Replay/Verify.
When the kernel is in crate::kernel::kernel_mode::KernelMode::Replay or crate::kernel::kernel_mode::KernelMode::Verify, these traps immediately fail execution if code attempts clock access, hardware randomness, or uncontrolled thread spawning, so the same run guarantees an identical event stream.
Structs§
- Determinism
Guard - Guard that enforces determinism in Replay/Verify mode.
Functions§
- compute_
event_ stream_ hash - Computes SHA-256 hash of the canonical serialized event sequence.
- event_
stream_ hash - Computes a deterministic SHA-256 hash of the event stream for a run.
- verify_
event_ stream_ hash - Verifies that the current event stream for
run_idmatchesexpected_hash. Returns Err if the hash does not match (replay mismatch).