-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gossip storage and relays rank/score #570
Comments
I see a cons of current gossip method is the client is trying connect inbox/outbox relays before query event // Add outbox relays
for url in broken_down.outbox_urls.into_iter() {
if self.add_outbox_relay(&url).await? {
self.connect_relay(url).await?;
}
}
// Add inbox relays
for url in broken_down.inbox_urls.into_iter() {
if self.add_inbox_relay(&url).await? {
self.connect_relay(url).await?;
}
} If relay have some errors, client will try reconnect, the fetch events will become very slow. I wonder if when this issue is resolved (gossip storage and relays rank/score implemented). Will this problem be solved too? |
Yes, this is true but after few attempts the SDK will start skipping unresponsive relays (this in general, not only for gossip). This require some secs so if the relay was just added it will not be skipped.
Yeah, partially. I still have to study the best way to implement it. Using a relay score I can ignore the unresponsive relays but for new ones the issue could still persist (if the relays are new, never saw before). |
I wonder is there a way to clear the gossip graph?, I want after user update their NIP65 or NIP17 relays, the gossip graph will be refresh to use their latest relay list or mark their public key outdated, then gossip graph will use latest info. I think will be nice if we have a command to force refresh gossip graph for certain public key like this client.gossip_invalidate(public_key) |
What if the gossip data were updated automatically when sending or receiving a NIP17/NIP65 relay list event? |
I fear it will take too much concurrent subscriptions, some relays have limit max subscriptions per users. |
Or we can do same approach like |
If you "invalidate" the public key, a REQ will still be sent to relays, to update the relay lists. |
I think it will be fine if it is auto-closing |
Yeah, currently is auto-closing.
Yes, I was thinking to this. If |
The text was updated successfully, but these errors were encountered: