code wiki / (root) / nx_commons_units_gate.nx

nx_commons_units_gate.nx

buildroot/runtime/nx_commons_units_gate.nx

4905 B92 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic commons
docsdependenciesstructsconstsfunctions

about

nx_commons_units_gate.nx -- proves, against the REAL shipped nx_hypha, that a reciprocity floor denominated in EVENT COUNTS cannot see magnitude, and that the units-based verdict can. Calls the real organs, never a copy: a hand-copied differential probe is evidence only if proven character-identical, and this estate has already paid four rounds for that lesson. THE ATTACK BEING MEASURED: make your giving granular and your taking bulky. The skimmer renders many tiny fee-justifying services and extracts in a few large events. Under a COUNT floor the books look 50/50 and pass a 30% threshold with room to spare. Under a UNITS floor the same peer is a 1:1,000,000 free-rider. T2 is the NEGATIVE CONTROL and it is the test that matters most: the units verdict must ACCEPT a genuinely balanced peer. A rule that rejects everyone is not a detector, it is a wall. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_gate_verdict.nx nx_hypha.nx nx_commons_units_gate.nx

imports: nx_gate_verdict.nxnx_hypha.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ ug_seasoned_peer nx_hy_peer_state_new sys_mmap ↻ nx_hy_record_exchange nx_em_mode_is_valid nx_em_dir_is_valid nx_hy_reciprocity_verdict nx_hy_total_shared nx_hy_share_count nx_em_mode_is_valid ↻ nx_hy_total_received nx_hy_receive_count nx_em_mode_is_valid ↻ nx_hy_reciprocity_verdict_ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check

structs

none

consts

18const UG_TINY: i64 = 100 // units this peer actually shared
19const UG_HUGE: i64 = 100000000 // units this peer actually received (1e8)
20const UG_BAL: i64 = 90 // a balanced peer's shared units
21const UG_BAL_R: i64 = 110 // ...and received units
22const UG_DRAIN: i64 = 100 // receives needed to drain NX_HY_STARTER_QUOTA_DEFAULT

functions

27func ug_seasoned_peer(shares: i64) -> *NxPeerExchangeState
42func main() -> i64