code wiki / _hdl_build / nx_spore_manifest_gate.nx
nx_spore_manifest_gate.nx
buildroot/runtime/_hdl_build/nx_spore_manifest_gate.nx
about
nx_spore_manifest_gate.nx -- X-SEED-001 / V-SPORE manifest: the GERMINATION MANIFEST
(the seed body, "the .torrent of the organism"). Generalizes the proven single-piece
germination (V-SPORE-1, nx_spore_germ_gate) to a LAYERED, MULTI-piece, content-addressed seed:
PACK -- FNV-1a each piece's source bytes; EMIT germination_manifest.tsv
(id <tab> source <tab> hash <tab> layer <tab> kat_expect) = a real persisted seed.
GERMINATE -- in LAYER order, per piece: re-read source (received), FNV-1a, verify == packed
hash (INTEGRITY), materialize, REBUILD via the sovereign toolchain, run -> exit
== kat_expect (BEHAVIOR/KAT). ADMIT iff both.
NEG -- one piece tampered (a byte flipped) -> hash mismatch -> REJECTED, never built.
READ-BACK -- re-read the emitted manifest; data-row count must == piece count (seed persisted).
verdict GREEN iff ADMIT-ALL + NEG-REJECT + ROWS==N.
HONEST scope: verification uses the in-run packed hashes + a persisted-manifest read-back;
full content-addressing FROM the persisted manifest (re-parse the recorded hash) and
AUTO-DERIVING the piece set from the capability registry/lineage (X-SEED-001 full) are next rungs.
Build/run (from nxc2 cwd): _offc/nx_sov_build_run.elf nx_spore_manifest_gate
genealogy_id: nishi_spore_seed_portability_charter (X-SEED-001 / V-SPORE manifest)
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 22 | const GERM_FNV_OFFSET: i64 = 0 - 3750763034362895579 // 0xcbf29ce484222325 |
| 23 | const GERM_FNV_PRIME: i64 = 1099511628211 // 0x100000001b3 |
| 24 | const MAN_PATH: *u8 = "knowledge/registry/germination_manifest.tsv" |
| 25 | const N_PIECES: i64 = 2 |
functions
| 27 | func germ_hash(buf: *u8, len: i64) -> i64 called by 1: main |
| 33 | func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 34 | func g_puts(s: *u8) -> i64 { sys_write(1, s, g_slen(s)); return 0 } |
| 35 | func g_puts_fd(fd: i64, s: *u8) -> i64 { sys_write(fd, s, g_slen(s)); return 0 } |
| 36 | func g_tab(fd: i64) -> i64 { let t: *u8 = sys_mmap(8); t[0] = 9; sys_write(fd, t, 1); return 0 } |
| 37 | func g_putn(fd: i64, v: i64) -> i64 |
| 51 | func g_run(path: *u8, argv: *i64, redir_out: i64, redir_err: i64) -> i64 |
| 66 | func g_rebuild_run(basename: *u8) -> i64 |
| 75 | func g_man_row(fd: i64, id: *u8, src: *u8, hash: i64, layer: i64, kat: i64) -> i64 |
| 84 | func main() -> i64 |