upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nostr.cpp16
-rw-r--r--src/rpc.cpp6
2 files changed, 17 insertions, 5 deletions
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;
78// independent relays. Kept only one Cloudflare-fronted relay (damus.io, the 78// independent relays. Kept only one Cloudflare-fronted relay (damus.io, the
79// most established) and filled the rest with relays on different hosts 79// most established) and filled the rest with relays on different hosts
80// (Hetzner, various independents) so no single upstream provider is a 80// (Hetzner, various independents) so no single upstream provider is a
81// single point of failure for peer discovery. 7 relays lands inside the 81// single point of failure for peer discovery. 8 relays lands inside the
82// commonly recommended 5-10 range for redundancy without keeping an 82// commonly recommended 5-10 range for redundancy without keeping an
83// excessive number of persistent sockets open per node. 83// excessive number of persistent sockets open per node.
84//
85// Four entries were removed after probing all twelve from two independent
86// networks (a residential line and the pool's VPS, over both v4 and v6):
87// relay.current.fyi, relay.nostr.bg -- no A record, and the AAAA for both
88// lands on the same parked host (2a04:c300:1000::381) serving a
89// certificate that fails verification. The domains are gone.
90// relay.nostr.band, nostr.fmt.wiz.biz -- TCP connects, TLS handshake never
91// completes, from both networks. Whether they are down or refusing
92// non-browser clients, this node cannot use them.
93// A dead relay is not free: each one holds a connect/retry slot and delays
94// discovery, so carrying it costs latency for no redundancy.
84const char* pszNostrRelays[] = { 95const char* pszNostrRelays[] = {
85 "wss://relay.damus.io", 96 "wss://relay.damus.io",
86 "wss://nos.lol", 97 "wss://nos.lol",
@@ -95,9 +106,6 @@ const char* pszNostrRelays[] = {
95 "wss://relay.primal.net", 106 "wss://relay.primal.net",
96 "wss://nostr.oxtr.dev", 107 "wss://nostr.oxtr.dev",
97 "wss://relay.nos.social", 108 "wss://relay.nos.social",
98 "wss://nostr.fmt.wiz.biz",
99 "wss://relay.current.fyi",
100 "wss://relay.nostr.bg",
101}; 109};
102const int nNostrRelays = ARRAYLEN(pszNostrRelays); 110const int nNostrRelays = ARRAYLEN(pszNostrRelays);
103 111
diff --git a/src/rpc.cpp b/src/rpc.cpp
index b12dc2f..11020d8 100644
--- a/src/rpc.cpp
+++ b/src/rpc.cpp
@@ -237,7 +237,11 @@ struct PendingPayout {
237 // owed against blocks that no longer existed, which then drained the 237 // owed against blocks that no longer existed, which then drained the
238 // wallet paying fork-era miners out of real-chain coin. 238 // wallet paying fork-era miners out of real-chain coin.
239 int blockHeight = 0; 239 int blockHeight = 0;
240 uint256 blockHash; // zero = entry predates hash keying 240 // Must be explicitly zeroed: uint256's default constructor is empty
241 // (uint256.h:514), so leaving this unassigned gives every ledger entry
242 // loaded from an older file a garbage hash, which then matches no block
243 // and gets voided as "orphaned". That mistake voided a live payout.
244 uint256 blockHash = 0; // zero = entry predates hash keying
241 int matureAtHeight; 245 int matureAtHeight;
242 std::map<std::string, int64> amounts; // address -> satoshis 246 std::map<std::string, int64> amounts; // address -> satoshis
243 int retries = 0; // exec-thread only: SendMoney attempts so far 247 int retries = 0; // exec-thread only: SendMoney attempts so far