Replying to Avatar Blake

#[0] I’ve been looking into the ‘best relays’ problem given a set of pubkeys to follow.

There will never be an exact solution as followers change, events broadcast or sync between relays indeterminately, etc - however I think we can effectively make use of the Minimal Set Cover Problem. A few different algorithms exist each with trade offs.

I’m also prototyping a custom algorithm that can work pretty well, but likely falls short with 75-90% event coverage.. but often that’s with 15 relays (for ~80 pubkeys) which isn’t ideal. Adding another 5 relays likely boosts that by another 10%. Client apps not retrying failed send posts could be impacting it too - with less replication.

Another factor I’ve ignored for now is inbound DMs, which could be on different relays again. And the relay auth NIP could make it harder to understand where DMs are being relayed to.. perhaps it’s a client space problem.

I’m waiting for more event ‘seen by relay’ data after a code update, so perhaps it will improve when my data is more complete.

https://en.wikipedia.org/wiki/Set_cover_problem

Avatar
fiatjaf 2y ago

Interesting, I will investigate that for the libraries I can never finish that deal with these issues.

Reply to this note

Please Login to reply.

Discussion

No replies yet.