mikedilger / gossip

Gossip is a nostr client
Other
692 stars 77 forks source link

person_relay records are wrong somehow #792

Closed mikedilger closed 3 months ago

mikedilger commented 3 months ago

Renee's kind=3 has relays:

{"wss://relay.damus.io":{"write":true,"read":true},"wss://nostr.wine":{"read":true,"write":true},"wss://nos.lol":{"read":true,"write":true},"wss://eden.nostr.land":{"read":true,"write":true}

But none of the person_relay records have read or write set to anything other than false

Somehow her Person page shows "OUTBOX RELAYS" as "a.nos.lol" and "e.nos.lol" and I have to find where it is getting that.

I'm connected to 44 relays including "e.nos.lol" and "a.nos.lol" and yet she is listed in the coverage report as only covered by one connected relay "a.nos.lol".

Unsure exactly where the bugs are causing this state of affairs but there is at least 1 possibly 2 or 3 bugs.

None of these relays has 'should_avoid' or allow_connect=false or rank=0

mikedilger commented 3 months ago

Well at least part of this (maybe all of it) is because of bad data. I reprocessed relay lists manually and then she had 4 relays. Turns out we did a reprocess relay lists operation, but it didn't previously consider kind 3 contents. I am reworking this and will set the flag that reprocesses them all again on startup.

mikedilger commented 3 months ago

So I reworked the reprocess relay list code to also handle kind3 events. I've set a flag to do this on start and then turn the flag off. This seems to have fixed this issue.