mikedilger / gossip

Gossip is a nostr client
Other
627 stars 74 forks source link

Persist the penalty box on relays #791

Closed mikedilger closed 1 week ago

mikedilger commented 1 week ago

When a relay can't be connected to and the error is signficant such as "operation timed out" or "502 Bad Gateway" or faiure in name resolution, we put the relay into a "penalty box" and don't reconnect for a while, in the worst case this is until a gossip restart (i64::MAX seconds). But we don't save that into the relay record so it doesn't persist across restarts. So every time you start gossip it tries connecting to relays it should have long ago noticed cannot be contacted.

We need to put this ban timeout penaltybox thing into the relay record in storage.

mikedilger commented 1 week ago

I've got this on unstable, haven't pushed it but will soon.