Conversation
spacesops
added a commit
to spacesops/certrelay
that referenced
this pull request
Jul 24, 2026
…ture check, epoch-hint fix
Propagation is now pull-based: relays page GET /sync (borsh rows ordered by a strictly-increasing per-relay write counter) from verified peers, track persistent per-peer watermarks, and re-verify everything locally (rebuild message per space + chain proof from own spaced + the same handle_message admission as client publishes). POST /poke gives seconds-level propagation: a content-free "pull me" acted on only for verified peers with a fresh cursor, debounced on send and cooled down on receive. /message no longer forwards anything, deleting the gossip amplification problem by construction. Fresh relays bootstrap through the same path; existing DBs are migrated in place (sync_seq backfill). Also lands the reliability/security overhaul from the relay audit: - Rate buckets split read (120/min) / proof (30/min), message 60/min; churn-only content limits (first insert free, replacement charged, burst 3); per-IP limiter maps periodically evicted; rightmost-XFF client IP extraction - Global proof (6) and verify (4) semaphores; HTTP sheds with 503; verification on the blocking pool; veritas behind RwLock - Outbound hardening: connect/total timeouts, no redirect following, peer address policy (http and bare public IPs allowed by design; private/reserved ranges rejected) with DNS results pinned into the connection to close the rebind TOCTOU; bounded /peers and /sync bodies - TOML config (--config / CERTRELAY_CONFIG) for all limits and tuning - GET /stats counters (incl. last sync per peer), unmetered /health, graceful shutdown - storage retention with entitlement-weighted eviction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.