code wiki / (root) / nx_commons_witness_gate.nx

nx_commons_witness_gate.nx

buildroot/runtime/nx_commons_witness_gate.nx

6369 B129 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic commons
docsdependenciesstructsconstsfunctions

about

nx_commons_witness_gate.nx -- proves the witness producer against the rule it was matched from. Both improvements over nx_trust_corroborate are BITE-PROVEN, not asserted: each must FIRE on the known-good rule and be SILENT on the new one. T1/T4 are the negative controls -- an attestation rule that admits nothing is not a detector, it is a wall, and one that ignores the hearsay floor is not a rule at all. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_gate_verdict.nx nx_commons_witness.nx nx_commons_witness_gate.nx

imports: nx_gate_verdict.nxnx_commons_witness.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ wg_fill cwit_plurality_agreement sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_seed_allocated sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ sha256_destroy

structs

none

consts

11const WG_STRIDE: i64 = 64
12const WG_LEN: i64 = 32
13const WG_TRUE: i64 = 170 // 0xAA -- the honest view of the contribution record
14const WG_POISON: i64 = 187 // 0xBB -- a fabricated view
15const WG_GIVER: i64 = 7
16const WG_RECV: i64 = 9
17const WG_K: i64 = 2

functions

19func wg_fill(dst: *u8, off: i64, len: i64, val: i64) -> i64
called by 1: main
25func main() -> i64