nostr-protocol / nips

Nostr Implementation Possibilities
2.39k stars 582 forks source link

NIP-65 how to handle inconsistent data from different relays #1489

Closed raymonostr closed 2 months ago

raymonostr commented 2 months ago

What if we receive different sets of NIP-65 lists for one hexpub from different relays?

Suggested solution: Use the most recent event over all responses.

greenart7c3 commented 2 months ago

That is what most clients do. Use the one with greater created_at

cesardeazevedo commented 2 months ago

Suggested solution: Use the most recent event over all responses.

That's correct as suggested on the NIP-01, any kind 10000 <= n < 20000 || n == 0 || n == 3 is a replaceable event and you should use the newest one.

for kind n such that 10000 <= n < 20000 || n == 0 || n == 3, events are replaceable, which means that, for each combination of pubkey and kind, only the latest event MUST be stored by relays, older versions MAY be discarded.