swactor/crates/simulation/scenarios/parity/reference.toml

82 lines
2 KiB
TOML

# SIM_SPEC §7.6 cross-architecture parity reference scenario.
# The simulator's events.ndjson hash for this scenario is checked in
# next to the test (`tests/cross_arch_parity.rs`). A mismatch is either
# a deliberate spec amendment with justification, or a determinism bug.
#
# RELAY_SPEC extension: the alpha↔charlie pair is routed through the
# `R` relay so the parity test also gates the relay vertex's
# determinism. Direct edges still cover alpha↔bravo and bravo↔charlie.
name = "parity_reference_v1"
seed = 0x0dead_beef_cafe_b0
duration_ns = 10_000_000
[default_tick]
period_ns = 2_000_000
[default_link]
latency_ns = 100_000
jitter_stddev_ns = 0
loss_prob_ppm = 0
reorder_prob_ppm = 0
bandwidth_bps = 1_000_000_000
cold_dial_penalty_ns = 50_000
cache_warm_after_ns = 1_000_000
cache_invalidate_after_idle_ns = 100_000_000_000
[[relays]]
id = "R"
ingress_capacity_bps = 1_000_000_000 # 1 GB/s combined ingress
egress_capacity_bps_per_link = 100_000_000 # 100 MB/s per outbound link
queue_depth_bytes = 1_000_000 # 1 MB shared queue
cold_start_penalty_ns = 200_000 # 200 µs first-message warmup
[[peers]]
id = "alpha"
kind = "parity_stub"
initial_state = "ready"
kind_config = { peers = ["alpha", "bravo", "charlie"] }
[[peers]]
id = "bravo"
kind = "parity_stub"
initial_state = "ready"
kind_config = { peers = ["alpha", "bravo", "charlie"] }
[[peers]]
id = "charlie"
kind = "parity_stub"
initial_state = "ready"
kind_config = { peers = ["alpha", "bravo", "charlie"] }
# Direct edges for alpha↔bravo and bravo↔charlie.
[[links]]
from = "alpha"
to = "bravo"
[[links]]
from = "bravo"
to = "alpha"
[[links]]
from = "bravo"
to = "charlie"
[[links]]
from = "charlie"
to = "bravo"
# alpha↔charlie is routed through the relay. The loader expands each
# via shorthand into a host→relay leg and a relay→host leg.
[[links]]
from = "alpha"
to = "charlie"
via = "R"
[[links]]
from = "charlie"
to = "alpha"
via = "R"
[[snapshots]]
at_ns = 5_000_000