mirror of
https://github.com/block/buzz.git
synced 2026-10-29 05:21:31 +00:00
Startup used to await a NIP-43 sweep over every active community before binding the listener, and the 60 s maintenance loop repeated the same work on every pod: two sequential queries per community (latest kind:13534 snapshot, full relay_members roster) compared in Rust. With tens of thousands of communities that sweep dominated boot. Nothing correctness-critical waits on it. Membership enforcement reads relay_members, and every membership write republishes the snapshot; the sweep only repairs a snapshot that is missing or whose publication failed after the membership commit. - Drop the awaited startup sweep and the nip43_reconcile startup step. The maintenance loop now runs its first pass immediately, so repair still starts at boot without blocking the listener. - Find drifted communities with one SQL query: the newest relay-signed, community-global, non-deleted kind:13534 per active community is compared to relay_members as a (lowercase pubkey, role) multiset in Postgres. Only drifted communities are republished. The comparison stays set-based, not timestamp-based, so same-second mutations and removals are still caught. - Remove the bootstrap/maintenance purpose split, the per-community check variants, bootstrap_community_hosts, and the startup progress log that existed only for the blocking sweep. The deprecated compatibility entry points remain and delegate to the new path. Signed-off-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>