code wiki / _hdl_build / nx_gossip.nx

nx_gossip.nx

buildroot/runtime/_hdl_build/nx_gossip.nx

3075 B60 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_gossip.nx -- LIB: EPIDEMIC / ANTI-ENTROPY gossip so the Napster index spreads across the mesh with NO central bottleneck (operator: "lots of peers can share with lots of peers ... spoke to spoke or hub to hub"). Each node holds a local content registry (nx_dist_index rows). A gossip round reconciles two nodes: exchange a compact DIGEST (the set of cids each holds) -> each side selects the rows the other LACKS -> merge (idempotent by cid). After a symmetric round both nodes hold the UNION -> run pairwise across the mesh and knowledge converges epidemically. Composes nx_dist_index (row parsing, di_has_cid). No TLS. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_dist_index.nx nx_syscalls.nx nx_gossip.nx nx_gossip_gate.nx nx_hub_replicate_gate.nx

imports: nx_dist_index.nxnx_syscalls.nx

imported by: nx_gossip_gate.nxnx_hub_replicate_gate.nx

structs

none

consts

none

functions

11func gossip_digest(reg: *u8, rlen: i64, out: *u8) -> i64
called by 2: mainmain calls 2: di_eoldi_tab
22func gossip_digest_has(digest: *u8, dlen: i64, cid: *u8) -> i64
32func gossip_select(my_reg: *u8, mlen: i64, peer_digest: *u8, dlen: i64, out: *u8) -> i64
46func gossip_merge(dst: *u8, dlen: i64, incoming: *u8, ilen: i64) -> i64