You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
All sessions in resume share the same relay instead of randomizing independently #1391
while investigating #1385, I found that selected_relay in RelayManager is scoped to the entire process, not per-session or per-request. In resume_payjoins, all sessions share the same Arc<Mutex<RelayManager>> via self.clone(). The first session writes to the cache via set_selected_relay and every subsequent session finds Some(relay) and skips randomization entirely
// mod.rs:820
let selected_relay = self.relay_manager.lock()...get_selected_relay();
match selected_relay {
Some(relay) => relay, // sessions 2, 3... never randomize
None => unwrap_ohttp_keys_or_else_fetch(...).await?.relay_url, // only session 1 gets here
}
I understand the cache is for reliability, holding onto a working relay instead of retrying. But with multiple sessions in resume, this means all sessions use the same relay, which comes back to the fingerprinting concern
would it make sense to remove the relay cache entirely, ensuring each session randomizes relay selection independently and resulting in per-request selection? If the choice becomes per-session we could update later, but as is stands, the cache scope seems inconsistent with the randomization intent
I've reported it in #1380 and #1385 but decided to open this issue to be more specific
Activity