fix(pairing): drop purplepag.es and nostr.band from the pairing relay set
Live write+readback canary (Sep 22): purplepag.es rejects kind 24133
outright ('blocked: kind 24133 is not allowed') and relay.nostr.band
hangs the WebSocket handshake. A signer (Amber) that picks a blocking
relay reports 'connected' while its connect event is silently discarded
— exactly the observed failure. The Sep 22 18:01 trace shows a pairing
window that opened, never saw an inbound 24133, and timed out; a
post-hoc relay sweep found zero 24133 events tagged to the ephemeral
key on any relay, consistent with Amber's write being rejected.
Replaced with nos.lol and relay.snort.social, both verified to accept
and serve ephemeral kind-24133. Added a regression test pinning the
blockers out of the set.
This commit is contained in:
parent
2e5938a3fa
commit
c789cb4784
1 changed files with 31 additions and 2 deletions
|
|
@ -20,12 +20,22 @@ pub fn default_relays() -> Vec<RelayConfig> {
|
||||||
/// reliability for ephemeral kind-24133 traffic; listening on a few extra
|
/// reliability for ephemeral kind-24133 traffic; listening on a few extra
|
||||||
/// well-known relays costs nothing and makes pairing robust whichever one
|
/// well-known relays costs nothing and makes pairing robust whichever one
|
||||||
/// the signer happens to choose.
|
/// the signer happens to choose.
|
||||||
|
///
|
||||||
|
/// This set was curated with a live write+readback canary (Sep 22, 2026):
|
||||||
|
/// - wss://purplepag.es REJECTS kind 24133 ("blocked: kind 24133 is not
|
||||||
|
/// allowed") — a signer that picks it reports "connected" while its
|
||||||
|
/// connect event is thrown away, so it must never be in the pairing URI.
|
||||||
|
/// - wss://relay.nostr.band currently hangs the WebSocket handshake; it is
|
||||||
|
/// also pay-to-read. Dropped from the pairing set.
|
||||||
|
/// - wss://nos.lol and wss://relay.snort.social accept ephemeral 24133 and
|
||||||
|
/// serve it live (snort does not persist ephemeral kinds, which is fine —
|
||||||
|
/// pairing only needs the live push).
|
||||||
pub fn pairing_relays() -> Vec<String> {
|
pub fn pairing_relays() -> Vec<String> {
|
||||||
vec![
|
vec![
|
||||||
"wss://relay.damus.io".to_string(),
|
"wss://relay.damus.io".to_string(),
|
||||||
"wss://relay.primal.net".to_string(),
|
"wss://relay.primal.net".to_string(),
|
||||||
"wss://purplepag.es".to_string(),
|
"wss://nos.lol".to_string(),
|
||||||
"wss://relay.nostr.band".to_string(),
|
"wss://relay.snort.social".to_string(),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -195,6 +205,25 @@ mod tests {
|
||||||
assert!(relays.iter().all(|r| r.enabled));
|
assert!(relays.iter().all(|r| r.enabled));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn pairing_relays_exclude_24133_blockers() {
|
||||||
|
// purplepag.es returns "blocked: kind 24133 is not allowed" and
|
||||||
|
// relay.nostr.band hangs the handshake (canary, Sep 22 2026). A
|
||||||
|
// signer that picks a blocking relay says "connected" while its
|
||||||
|
// connect event is discarded, so neither may appear in the URI.
|
||||||
|
let relays = pairing_relays();
|
||||||
|
assert!(!relays.iter().any(|r| r.contains("purplepag")));
|
||||||
|
assert!(!relays.iter().any(|r| r.contains("nostr.band")));
|
||||||
|
// Every entry is a well-formed wss URL and the set is deduped.
|
||||||
|
for url in &relays {
|
||||||
|
validate_url(url).expect("pairing relay must be a valid wss URL");
|
||||||
|
}
|
||||||
|
let mut sorted = relays.clone();
|
||||||
|
sorted.sort();
|
||||||
|
sorted.dedup();
|
||||||
|
assert_eq!(sorted.len(), relays.len());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn validate_url_accepts_wss_and_ws() {
|
fn validate_url_accepts_wss_and_ws() {
|
||||||
assert!(validate_url("wss://relay.example.com").is_ok());
|
assert!(validate_url("wss://relay.example.com").is_ok());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue