Hello #nostrdev s, I think nostr network should has methods for recovering events.

For now, the only way to send event to relay is ["EVENT", {eventdata}]. But this method only can send one event. If i want to backup and recover. I need to send many events to relay, so i need to send many times EVENT message whick usually notice me that i need to slow down. Is there a method for client to send many event to relay by one times?

nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z nostr:npub1acg6thl5psv62405rljzkj8spesceyfz2c32udakc2ak0dmvfeyse9p35c nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6

Reply to this note

Please Login to reply.

Discussion

There is not. We could invent one.

Without one, you either don't wait for the OK (in which case you may get a slow-down response as you mention), or if you do wait then the roundtrip time really slows down the transfer.

Sending a single [BATCH, ...a million events] message would be no different than sending a million [EVENT] message. No optimizations possible. You would at best save 7 bytes.

With that said, some relays support Negentropy and that could be a better way to sync big amounts of events: https://github.com/hoytech/negentropy