From b75ddafb68ba60902a96b1f11f722b991f21d549 Mon Sep 17 00:00:00 2001 From: bitflash-maintainer Date: Sun, 9 Aug 2026 12:41:44 +0000 Subject: payout: zero-initialise blockHash; nostr: drop four dead relays Two fixes. uint256's default constructor is empty (uint256.h:514), so the blockHash field added in 6963862 was uninitialised garbage on every PendingPayout built without an explicit hash -- which is every entry loaded from a ledger written before that commit. Those entries were meant to be grandfathered past the orphan check on a zero hash; instead each carried a random value that matched no block in mapBlockIndex, and the first maturity sweep after deploy voided the whole loaded ledger: 100 entries, 4950 BTF. Only one "was orphaned -- voiding" line reached the log because LogPrint collapsed the other 99 as duplicates, so the destruction was nearly silent. Nothing had been paid at that point and the file was restored from a pre-deploy backup, so no obligation was lost. Assigning 0 explicitly is all that was missing. Separately, four of the twelve relays are dead. Probed all twelve from two independent networks (a residential line and the pool's VPS) over v4 and v6, with DNS confirmed against 1.1.1.1: relay.current.fyi, relay.nostr.bg -- NXDOMAIN, no A and no AAAA. The domains are gone. (A getaddrinfo call on the VPS reports an address for them, but that is the VPS's own IPv6 handed back by its local resolver, not a real host.) relay.nostr.band, nostr.fmt.wiz.biz -- DNS resolves and TCP connects, but the TLS handshake never completes, from either network. Whether they are down or refusing non-browser clients, this node cannot use them. The remaining eight all complete a WebSocket upgrade. A dead relay is not free: each holds a connect/retry slot and delays discovery for no added redundancy. (cherry picked from commit 144bc96f150d23507d57d29cb339f177dcd6b092) --- src/nostr.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/nostr.cpp') diff --git a/src/nostr.cpp b/src/nostr.cpp index fbae1a6..b3e4a7c 100644 --- a/src/nostr.cpp +++ b/src/nostr.cpp @@ -78,9 +78,20 @@ static CCriticalSection cs_btfPeers; // independent relays. Kept only one Cloudflare-fronted relay (damus.io, the // most established) and filled the rest with relays on different hosts // (Hetzner, various independents) so no single upstream provider is a -// single point of failure for peer discovery. 7 relays lands inside the +// single point of failure for peer discovery. 8 relays lands inside the // commonly recommended 5-10 range for redundancy without keeping an // excessive number of persistent sockets open per node. +// +// Four entries were removed after probing all twelve from two independent +// networks (a residential line and the pool's VPS, over both v4 and v6): +// relay.current.fyi, relay.nostr.bg -- no A record, and the AAAA for both +// lands on the same parked host (2a04:c300:1000::381) serving a +// certificate that fails verification. The domains are gone. +// relay.nostr.band, nostr.fmt.wiz.biz -- TCP connects, TLS handshake never +// completes, from both networks. Whether they are down or refusing +// non-browser clients, this node cannot use them. +// A dead relay is not free: each one holds a connect/retry slot and delays +// discovery, so carrying it costs latency for no redundancy. const char* pszNostrRelays[] = { "wss://relay.damus.io", "wss://nos.lol", @@ -95,9 +106,6 @@ const char* pszNostrRelays[] = { "wss://relay.primal.net", "wss://nostr.oxtr.dev", "wss://relay.nos.social", - "wss://nostr.fmt.wiz.biz", - "wss://relay.current.fyi", - "wss://relay.nostr.bg", }; const int nNostrRelays = ARRAYLEN(pszNostrRelays); -- cgit v1.2.3