code wiki / (root) / nx_asset_merkle_gate.nx

nx_asset_merkle_gate.nx

buildroot/runtime/nx_asset_merkle_gate.nx

8593 B178 linesdepth 10pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic asset
docsdependenciesstructsconstsfunctions

about

nx_asset_merkle_gate.nx -- KAT + TEETH for nx_asset_merkle (R8: whole-inventory Merkle root). (T1) DETERMINISM / order-independent: root[A,B,C,D] == root[D,C,B,A] (same SET -> same root) (T2) TAMPER: change one record's bytes -> the whole-inventory root CHANGES (T3) COMPLETENESS: drop one record -> the root CHANGES (an omission cannot hide) (T4) INCLUSION: a member's CID is a leaf; a well-formed but absent CID is NOT (no false inclusion) Verdict appended to knowledge/status/asset_merkle_gate.log (additive law #13). expect_exit: 0 license_tier: ORIGINAL

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_asset_record.nx nx_asset_catalog.nx nx_asset_merkle.nx nx_gate_verdict.nx nx_asset_merkle_gate.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_asset_record.nxnx_asset_catalog.nxnx_asset_merkle.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_append g_puts sys_write gt_determinism sys_mmap build_abcd sys_mmap ↻ mk_asset sys_mmap ↻ sset E ar_fields sys_mmap ↻ ar_addf ar_present ar_encode canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap root_of sys_mmap ↻ gt_prefix sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_mmap ↻ cat_ingest sys_mmap ↻ cat_ingest_cid ar_cid cid_of ss_open ss_open2 sys_mmap ↻ cat_idx_load sys_mmap ↻

structs

none

consts

none

functions

17func g_puts(logfd: i64, s: *u8) -> i64
24func g_putn(logfd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
38func g_streq(a: *u8, b: *u8) -> i64
47func E() -> *u8 { return "\x00" as *u8 }
called by 1: mk_asset
48func sset(a: *i64, i: i64, s: *u8) -> i64 { a[i] = s as i64; return 0 }
called by 1: mk_asset
51func mk_asset(typ: *u8, cls: *u8, tags: *u8, id: *u8, out: *u8) -> i64
67func gt_prefix(prefix: *u8, base: *u8, salt: i64) -> i64
83func build_abcd(recs: *i64, lens: *i64) -> i64
92func root_of(salt: i64, recs: *i64, lens: *i64, n: i64, out_root: *u8) -> i64
101func gt_determinism(logfd: i64) -> i64
115func gt_tamper(logfd: i64) -> i64
130func gt_completeness(logfd: i64) -> i64
141func gt_inclusion(logfd: i64) -> i64
159func main() -> i64