code wiki / (root) / nx_tg_autoseed_gate.nx

nx_tg_autoseed_gate.nx

buildroot/runtime/nx_tg_autoseed_gate.nx

3909 B45 linesdepth 9pulls 40 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_tg_autoseed_gate.nx -- proves tg_autoseed registers a COMPLETED download into the seeder registry with the correct geometry: name, info_hash hex40, piece_length, total (== download.part FILE SIZE), srcpath -- and is IDEMPOTENT (calling twice yields ONE row). A wrong total/hex here would make us serve corrupt pieces to peers, so this is a swarm-safety gate. license_tier: ORIGINAL depends: nx_torrent_get (tg_autoseed)

dependencies 1 imports · 0 importers

nx_torrent_get.nx nx_tg_autoseed_gate.nx

imports: nx_torrent_get.nx

imported by: nobody (leaf or entry point)

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

main ag_p sys_mkdir sys_openat_wr cl_write_n tg_autoseed pm_bstr sys_read pm_bint cl_write_n ↻ sys_read ↻ ag_has if_s

structs

none

consts

none

functions

7func ag_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
8func if_s(v: i64) -> *u8 { if v==1 { return "1" as *u8 } return "0" as *u8 }
called by 1: main
10func ag_has(hay: *u8, hlen: i64, ndl: *u8, nlen: i64) -> i64
called by 1: main
15func main() -> i64