Investigate the best bunker_relay source for seed URLs (multiple relays? nostrclient relay?) #36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #35 (
fix/pair-bunker-relay-default) defaults the seed'sbunker_urlrelay to the spire's first event relay (relays[0]) to kill the localhost-relay gotcha (the UI-minted seed embeddedws://127.0.0.1, unreachable from the ATM). That unblocks the common single-public-relay deploy, butrelays[0]is a pragmatic choice — let's decide the right long-term design.Open questions
Single vs. multiple relays. A NIP-46
bunker://URL can carry severalrelay=params. Right now we embed exactly one. Should the seed carry all ofrelays[](or a configured set) so the spire can reach the bunker via a fallback if one relay is down? The spire's events already publish to multiple; the bunker connection arguably wants the same redundancy.Is
relays[0]the right source at all? It assumes the bunker is reachable on the same relay the spire publishes its events to. True for a single operator nostrrelay, but a split-relay deploy (spire events on relay A, bunker on relay B) breaks it. The bunker's actual relay is what the operator's bunker (andnostrclient) connect to — should we source the bunker relay from there (the nostrclient relay / the bunker's configured public relay) instead of inferring it from the spire's event relays?Internal → public mapping.
settings.lnbits_nsec_bunker_urlis the internal relay lnbits uses to reach the co-located bunker (ws://127.0.0.1). There's no automatic internal→public translation. Options: a dedicatedLNBITS_NSEC_BUNKER_PUBLIC_URLsetting; derive from the instance's public base URL; or keep inferring fromrelays[].UI. Should the Pair form expose a
bunker_relayfield (advanced/optional) for split-relay deploys, or stay simple and rely on the default + a server-side config?Acceptance
A documented rule for which relay(s) a seed's
bunker_urlcarries, robust across single-relay and split-relay deploys, and matching what the bunker actually listens on. Updatepair_spire+ the UI accordingly; supersede therelays[0]default from #35 if a better source is chosen.Refs: #35 (the interim fix), coord thread (localhost-relay /pair gotcha), bitspire demo pairing.