code wiki / _hdl_build / nx_pub_receipt_loop.nx

nx_pub_receipt_loop.nx

buildroot/runtime/_hdl_build/nx_pub_receipt_loop.nx

6263 B82 linesdepth 10pulls 25 transitivereach 0 importersview sourcekind tooltopic pub
docsdependenciesstructsconstsfunctions

about

nx_pub_receipt_loop.nx -- the RETURN-AND-REPORT loop, run end-to-end on the SOVEREIGN store (operator: "push to the publisher and get the receipt it's published" + "no tsv -- nishi ecosystem only"). Receipts live in a content- addressed nx_seg_store (knowledge/store/receipts), NOT a flat file. It (1) publishes a REAL artifact through the publisher's atomic pub_deploy to a SAFE LOCAL liveroot (no NAS, #26), re-verifies the served bytes, emits a SIGNED receipt to the seg_store, then queries it back + verifies the signature with the PUBLISHED pubkey; and (2) emits HONEST HELD receipts for the 2 outward HR stores still queued (publisher R6 holds outward for operator approval).

dependencies 4 imports · 0 importers

nx_publisher.nx nx_pub_receipt.nx nx_pub_receipt_keys.nx nx_syscalls.nx nx_pub_receipt_loop.nx

imports: nx_publisher.nxnx_pub_receipt.nxnx_pub_receipt_keys.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_w sys_write sys_mmap prk_load_or_init sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_csprng_fill sys_mmap ↻ nx_csprng_urandom_path sys_openat_rd ↻ sys_read ↻ sys_close ↻ sys_openat_wr sys_write ↻ sys_close ↻ ed25519_pub_from_priv sys_mmap ↻ ed25519_sha512 sys_mmap ↻ sha512_init sha512_update sha512_blk_set_byte blk_get_i64 blk_set_i64 sha512_compress sys_mmap ↻ blk_get_i64 ↻ sha512_gamma0 sha512_gamma1 sha512_sigma1 sha512_ch sha512_k sha512_sigma0 sha512_maj

structs

none

consts

none

functions

12func g_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
13func g_n(v: i64) -> i64 { var m: i64=v; if m<0{g_w("-" as *u8);m=0-m} let t:*u8=sys_mmap(24); var k:i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i:i64=0; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 }
14func g_streq_hex(a: *u8, b: *u8) -> i64 { var i: i64=0; while 1==1 { if a[i]!=b[i] {return 0} if a[i]==(0 as u8) {return 1} i=i+1 } return 1 }
called by 1: loop_publish
17func report_receipt(prefix: *u8, pub: *u8, label: *u8, sha: *u8, dest: *u8) -> i64
28func loop_publish(prefix: *u8, priv: *u8, pub: *u8, src: *u8, stage: *u8, live: *u8, now: i64, segid: i64) -> i64
42func loop_held(prefix: *u8, priv: *u8, pub: *u8, src: *u8, dest: *u8, now: i64, segid: i64) -> i64
51func main() -> i64