code wiki / _hdl_build / nx_dist_index_gate.nx

nx_dist_index_gate.nx

buildroot/runtime/_hdl_build/nx_dist_index_gate.nx

4225 B66 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic dist
docsdependenciesstructsconstsfunctions

about

nx_dist_index_gate.nx -- proves the Napster-style registry end to end, composing the ENABLER (nx_dist_publish) with the INDEX (nx_dist_index): three files land -> content-ids -> published to the registry -> peers announce they hold one -> a searcher DISCOVERS content by name and learns WHO HAS IT by cid. Idempotent + append-only. expect_exit: 0 license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_dist_publish.nx nx_g_puts_lib.nx nx_dist_index.nx nx_syscalls.nx nx_dist_index_gate.nx

imports: nx_dist_publish.nxnx_g_puts_lib.nxnx_dist_index.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write sys_mmap g_fixture sys_openat_wr sys_write ↻ sys_close dp_content_id sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sys_openat_rd sys_read sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sys_close ↻ sha256_final blk_set_byte ↻ sha256_compress ↻ dp_hexenc dp_magnet dp_cat dp_dl_url dp_cat ↻ di_publish di_has_cid sys_mmap ↻ di_cat di_contains di_strlen di_cat ↻ di_wdec sys_mmap ↻

structs

none

consts

none

functions

10func g_ck(name: *u8, cond: i64, st: *i64) -> i64 { st[1]=st[1]+1; if cond==1 { st[0]=st[0]+1; g_puts(" [OK] " as *u8) } else { g_puts(" [FAIL] " as *u8) } g_puts(name); g_puts("\n" as *u8); return 0 }
called by 1: main calls 1: g_puts
11func g_fixture(path: *u8, content: *u8, n: i64) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd<0 { return 0-1 } sys_write(fd, content, n); sys_close(fd); return 0 }
13func main() -> i64