Skip to main content

Module server

Module server 

Source
Expand description

Pure rendezvous/relay server state machine: soft-state registration with TTL, per-source rate limiting, and blind relay forwarding. No I/O — the bin/yip-rendezvous loop owns the socket and the clock.

Structs§

RendezvousServer
Soft-state rendezvous + blind relay. Keyed by NodeId.

Constants§

MAX_MSGS_PER_WINDOW
MAX_RATE_ENTRIES
Hard cap on distinct source addresses tracked for rate limiting (memory bound). Set to 2x MAX_REGISTRATIONS as generous headroom for legitimate distinct sources (registered peers plus in-flight lookups/relays from addresses that never register) while still bounding memory against a flood of packets from many distinct (or spoofed) source addresses.
MAX_REGISTRATIONS
Hard cap on concurrent registrations (memory bound).
RATE_WINDOW_MS
Rate-limit window and per-source message cap within it.
REGISTRATION_SKEW_SECS
Clock-skew grace applied when verifying a RegisterSigned record’s embedded cert/signature window. Mirrors bin/yipd/src/membership.rs’s CLOCK_SKEW_SECS production default (300s / YIP_CERT_SKEW_SECS override) — this crate has no access to that binary-local constant, so the value is duplicated here rather than reused; keep the two in sync by hand if the #41 default ever changes.
REG_TTL_MS
Registration lifetime; clients refresh well within this.