Conversation
|
We might want a |
|
Added |
|
Thanks for this! I'm looking into it. My first impression is that negentropy would be a more optimal solution. |
|
Negentropy is better for past data, but doesn't work for ongoing subscriptions. Both can be used, but this is a lot easier to implement in all clients. |
|
I think this is a pretty good idea. Did you try starting a discussion on this in the NIPs repo? I'm a bit hesitant to add non-standard protocol extensions unless there is some consensus. |
|
Found it: nostr-protocol/nips#1027 Yes I agree, this solves an issue that negentropy does not, and is in fact complementary to it. You could do an initial sync with negentropy and then stream new IDs down as they come in, without duplicating the download of full events. In fact, this may be quite useful for a nostr multiplexer I am working on. Let me think about this a bit more, but I'm leaning towards merging this. Thank you! |
|
I left some comments in the NIP above. In short, I think the I also think |
|
Thank you, good points. I can help if needed, but you're more familiar with the code and can probably implement it better. |
|
Currently I'm thinking this is better handled with negentropy. |
When a subscription has a filter with
ids_only: true, the relay responds with[HAVE, subId, eventID]messages. The client can then request the full event from only one relay instead of receiving it from all subscribed relays. If the event is already in a local database, the full event request can be skipped altogether.I have not implemented this for the
streamcommand yet, but this could save a lot of bandwidth if you're connecting to many other relays and subscribing to everything.