Replying to Avatar Carman

Do people have a good strategy for syncing content through nostr?

For Mutiny when we sync nwc, dm, etc we save the highest timestamp of the event we last synced, however this doesn't work the best because relays send us them in descending order so if the app is closed before we process all the events, we do not fully sync all the events.

Have been thinking of switching it to instead have it save the last timestamp of the last EOSE we received. To try to better ensure we sync every message first.

Does anyone else have a better strategy?

Avatar
Nice and Kind Vic 1y ago

I do since/until filters. If traversing back (newest first), I track oldest timestamp of event seen, and then use that as the until on next call, end if no new event ids seen before starting again at the head. If going forward (oldest to newest), I just reverse this with the newest timestamp of event seen.

Reply to this note

Please Login to reply.

Discussion

No replies yet.