code wiki / (root) / nx_etg_byzantine.nx

nx_etg_byzantine.nx

buildroot/runtime/nx_etg_byzantine.nx

5093 B126 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind librarytopic etg
docsdependenciesstructsconstsfunctions

about

nx_etg_byzantine.nx -- E2.5 Byzantine M-of-N outcome agreement. Anti-forgery gate for ETG attestations. Composes E1 NxEtgEntry + E2 tournament selector + E3 per-tier probes by running the same probe N times (across diverse-double-compile + canary-tagged probe binaries per [[NISHI_RACING_CREW_ROADMAP]]) and requiring M-of-N replicas to agree on the outcome before the substrate commits the attestation to its journal. Detects: - Compromised probe binary lying about silicon truth - Transient measurement noise that flipped a single replica - Vendor-driven runtime gating that only triggers on specific probe call patterns (probe diversity defeats this) - Wheeler diverse-double-compile detection of compiler-side attestation forgery (different compilers should produce the same outcome on the same silicon -- if they don't, agreement fails loud, never silent) Composes: [[NISHI_ETG_ROADMAP]] E2.5 (this is the gate primitive) nx_etg.nx (E1 NxEtgEntry; SHIPPED) [[NISHI_RACING_CREW_ROADMAP]] (Byzantine N-of-M mechanism) [[feedback-racing-crew-team-honesty-threat-aware]] (the threat model this gate addresses) [[feedback-no-false-ok-substrate-honesty-audit]] (NO_AGREEMENT is the substrate-honest verdict; never silent picks of minority-majority) API: nx_etg_byzantine_outcome_agree(outcomes, n, m_required) -> i64 Returns the agreed outcome (NX_ETG_OUTCOME_*) iff some outcome occurs >= m_required times in the input. Else returns NX_ETG_BYZ_NO_AGREEMENT. Tie-break: if multiple outcomes reach the m_required threshold, returns the FIRST one found by walking outcome ids 0..NX_ETG_OUTCOME_N-1 (deterministic replay). nx_etg_byzantine_count_outcome(outcomes, n, target) -> i64 Counts occurrences of `target` in the outcomes array. Useful

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_etg.nx nx_etg_byzantine.nx nx_etg_byzantine_test.nx

imports: nx_syscalls.nxnx_etg.nx

imported by: nx_etg_byzantine_test.nx

structs

none

consts

74const NX_ETG_BYZ_NO_AGREEMENT: i64 = -1

functions

80func nx_etg_byzantine_count_outcome(
108func nx_etg_byzantine_outcome_agree(
called by 1: main calls 1: nx_etg_byzantine_count_outcome