mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 16:14:40 +00:00
The client's relay pool reconciles open sockets to the relays that active subscriptions currently need, so between-round gaps (routing + contactsOf scans > ~300ms) and niche-relay churn dropped connections we reuse every round, then reconnected them — a TCP+TLS+WS handshake each time. Hold a persistent do-nothing subscription (WARM_SUB_ID) open to the busiest WARM_POOL_SIZE(20) live relays, refreshed to the current top set at each round start (same subId → just updates the desired-relay set) and closed when the crawl finishes. Its filter matches an impossible event id, so the relay EOSEs immediately and streams nothing — it only keeps the socket warm. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RWk2ZMrGBSr4WenKgwqmbB