code wiki / (root) / nx_pollinate.nx

nx_pollinate.nx

buildroot/runtime/nx_pollinate.nx

13587 B338 linesdepth 3pulls 5 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_pollinate.nx -- peer-mesh community defense distribution. Biology: bees cross-flower pollination spreads genetic material across a community of flowers, so a useful trait that arose in one plant becomes available to many. Nishi pollinate is the cross-host distribution of useful DEFENSIVE material: federation-ready antibodies (per [[feedback-unified-immune-architecture-three-tier]] item "antibody V2 federates via peer mesh"), decoy tripwire tokens (per nx_decoy V2 cross-host registry), and signed xenocell observations (the Citizen Lab analog). Per [[feedback-captain-moroni-doctrine]]: defensive only. We share DETECTION SIGNATURES not exploitation payloads. We share OBSERVED ATTACKS not retaliation plans. Captain Moroni's discipline: spread the warning so other operators can defend, never spread the weapon. Per [[feedback-cell-immune-system-ransomware-judo-ddos-by-bit]]: the judo is of INFORMATION. Vendor monitoring 1000 hosts becomes 1000 hosts holding 1000 signed records of vendor monitoring. The pollinate primitive scales that judo across the community. Per [[feedback-privacy-by-default-no-tracking]]: pollinate is PER-CALL CONSENT (matches existing nx_trace_consent in the bit- traceability cardinal). No automatic distribution; operator explicitly approves each share. V2 adds policy-driven auto-share for high-confidence federation-ready material. Payload kinds shipped V1: ANTIBODY -- federation-ready detection signature DECOY_TOKEN -- "this token was planted in my host; flag if it shows up at yours" XENO_OBSERVATION -- signed observation of vendor / state-actor behavior; community-knowledge-of-record IMMUNE_ALERT -- "host X is COMPROMISED; consider your peer session with it suspect" RECLAIM_REPORT -- "this commodity hardware reclaimed safely with these mitigations; others can apply" Composes: nx_antibody -- federation-ready antibodies are V1 payload

dependencies 5 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_budget.nx nx_attention_class.nx nx_evict_journal.nx nx_pollinate.nx nx_pollinate_test.nx nx_tier2_immune_compose_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_budget.nxnx_attention_class.nxnx_evict_journal.nx

imported by: nx_pollinate_test.nxnx_tier2_immune_compose_test.nx

structs

110struct NxPollinationPayload
128struct NxPeerRelation
143struct NxPollinator

consts

87const NX_PK_ANTIBODY: nx_int = 0
88const NX_PK_DECOY_TOKEN: nx_int = 1
89const NX_PK_XENO_OBSERVATION: nx_int = 2
90const NX_PK_IMMUNE_ALERT: nx_int = 3
91const NX_PK_RECLAIM_REPORT: nx_int = 4
92const NX_PK_N_KINDS: nx_int = 5
96const NX_PL_OK: nx_int = 0
97const NX_PL_ERR_BAD_KIND: nx_int = 1
98const NX_PL_ERR_BAD_SIG: nx_int = 2
99const NX_PL_ERR_CONSENT_REQUIRED: nx_int = 3
100const NX_PL_REFUSED_BY_POLICY: nx_int = 4 // auto-share policy says no
101const NX_PL_QUEUE_FULL: nx_int = 5
154const NX_PEER_BYTES: nx_size = 40
155const NX_PL_PAYLOAD_BYTES: nx_size = 64

functions

159func nx_pk_is_valid(k: nx_int) -> nx_int
167func nx_pollinator_new(peer_capacity: nx_size,
called by 2: mainmain calls 1: sys_mmap
187func _peer_at(p: *NxPollinator, idx: nx_size) -> *NxPeerRelation
191func _outbox_at(p: *NxPollinator, idx: nx_size) -> *NxPollinationPayload
197func _find_peer(p: *NxPollinator, peer_id: nx_int) -> nx_int
209func nx_pollinate_add_peer(p: *NxPollinator,
called by 2: mainmain calls 2: _find_peer_peer_at
234func nx_pollinate_propose(p: *NxPollinator,
called by 2: mainmain calls 2: nx_pk_is_valid_outbox_at
280func nx_pollinate_send(p: *NxPollinator,
301func nx_pollinate_receive(p: *NxPollinator,
318func nx_pollinate_outbox_count(p: *NxPollinator) -> nx_size
called by 2: mainmain
324func nx_pollinate_peer_share_count(p: *NxPollinator, peer_id: nx_int) -> nx_int
called by 1: main calls 2: _find_peer_peer_at
333func nx_pollinate_peer_receive_count(p: *NxPollinator, peer_id: nx_int) -> nx_int
called by 1: main calls 2: _find_peer_peer_at