From e2bc68de1af27d3459878f43c40061d0c30d09d7 Mon Sep 17 00:00:00 2001 From: Bitflash-sh Date: Fri, 24 Jul 2026 14:46:49 -0300 Subject: Automatic relay discovery over Nostr + call-to-action Relay operators announce their relay with -announcerelay=host:port; every node discovers announced relays (kind 38502) and adds them to its failover list, so volunteer relays join with no maintainer edit or approval. Anti-spam cap + validation; relays are trustless (echan makes a bad relay unable to read/MITM). README: automatic relay-volunteer guide, 'don't let the network die' section. --- src/nostr.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nostr.h') diff --git a/src/nostr.h b/src/nostr.h index 41e59df..b878db9 100644 --- a/src/nostr.h +++ b/src/nostr.h @@ -32,6 +32,12 @@ std::string BtfActiveRelay(); // Record the relay this node just registered its service at (thread-safe). void BtfSetActiveRelay(const std::string& relay); +// If set (via /announcerelay=host:port), this node announces that relay on +// Nostr so other nodes discover it automatically -- no manual seed-list edit. +extern std::string strBtfAnnounceRelay; +// Every relay to try: curated seeds + relays discovered from Nostr announcements. +std::vector BtfAllRelays(); + // Copy this node's .btf identity (lazily loading or generating it): the x-only // pubkey (= the .btf address) and the x25519 secret for the end-to-end channel. bool BtfGetIdentity(unsigned char pubkey[32], unsigned char enc_sk[32]); -- cgit v1.2.3