code wiki / _hdl_build / nx_gossip_gate.nx
nx_gossip_gate.nx
buildroot/runtime/_hdl_build/nx_gossip_gate.nx
about
nx_gossip_gate.nx -- proves epidemic anti-entropy convergence: peer A holds {X,Y}, peer B holds {Y,Z}. One
symmetric gossip round (digest -> select-the-delta -> merge) leaves BOTH holding the union {X,Y,Z}, and each
side ships ONLY the row the other lacked (efficient -- not the whole registry). Run pairwise across a mesh and
the who-has-what converges everywhere. Composes nx_dist_index + nx_gossip. expect_exit: 0 license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_dist_index.nxnx_g_puts_lib.nxnx_gossip.nxnx_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
| none |
functions
| 10 | func 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 } |
| 11 | func has3(reg: *u8, rlen: i64, a: *u8, b: *u8, c: *u8) -> i64 { var r: i64=1; if di_has_cid(reg,rlen,a)==0 {r=0} if di_has_cid(reg,rlen,b)==0 {r=0} if di_has_cid(reg,rlen,c)==0 {r=0} return r } |
| 13 | func main() -> i64 |