Does any relay store a per-session state of what events have already been sent. May be an relay anti-pattern, but a cuckoo filter or similar could limit data usage by filtering events already sent.

Is this a problem in reality? I don’t know. However a set or cuckoo filter per connection to filter friends and friends of friends only (if desired) is a similar problem space.

Reply to this note

Please Login to reply.

Discussion

A good example is profiles. It’s poor UX seeing some alpha-numeric name and robot icon before it updates with a name and profile pic. Why not send it (or the basics) at the same time.

Another thing is embedding or attaching metadata into events. Like perhaps the first session event for pubkey X, also send the metadata for the profile. Could be opt-in as a relay setting.

And obviously, embedding other metadata like reactions, same as how OTP is merged into an event post being signed can help reduce data (if you trust a relay to aggregate counts). As new data comes in it can still send them as individual events - and clients can still request old aggregated data on demand.

Example of the embedding. Embedding author name/profile icon is possible too. https://api.nostrgraph.net/beta/events/note1l43cfzr4umnv4f6qld2qgj3gvaspfjne8lnaz3xxgl4m9kfn6pwqcyduwy.json?pretty=true