Snort v0.2.0 was tagged.

This release contains a full nostr relay in the browser (the worker relay). It works like any other relay on nostr, and allows us to cache content efficiently.

This also means that all reactions, replies, and posts are cached in your browser and are always available, even when you are offline.

Most of the caching strategies that have been developed thus far have been scrapped and replaced by the worker relay.

Additionally, I've added Negentropy support to allow for really efficient synchronization with the worker relay, meaning that very little data is required to stay in sync.

This opens the door for a lot of really cool things.

As always there are many many many changes so if you're interested in the summarised list you can see them on https://snort.social/about

Reply to this note

Please Login to reply.

Discussion

This is amazing πŸ‘

Great and Amazing!

I bet on this client and I don't regret it, I recommend it to everyone.

Indeed, as soon as possible, I will purchase an address and subscribe professionally, the only thing holding me back is finances.

I really like the transparency of the project, being open-source, and the coding live streams.

I'm curious, is the worker relay using IndexedDB? Really cool!

It’d be cool if we made the relay replication protocol in strfry in to a nip, or some updated version of it’s not quite right. That would let you do offline first and gossip nostr like scuttlebutt and willow do.

Yes this is a good idea! I was just thinking about this today

Not all relays need to do it, but since some can, and it seems to work, it would be worth documenting it in to a nip so it can get broader support and more folks will know about it.

Big news, I've never attempted either. What sort of storage/performance limits are you seeing with OPFS? My past attempts at general caching with IndexedDB were useless because I didn't want to use too much storage. Also, I was not aware of OPFS. How much of this is in snort/system?

Negentropy is part of snort/system, the worker relay is standalone with no dependency on snort/system, its here: https://git.v0l.io/Kieran/snort/src/branch/main/packages/worker-relay/src/sqlite-relay.ts

What percentage of your bundle is sqlite-wasm?

OPFS definitely doesn't have native disk perf, if you use the default DELETE journal mode it can get really slow when inserting events, sometimes 5 or more seconds to write a single event.

Query performance is really good, its far better than indexedDB thats for sure

smart!

That's awesome! πŸ”₯

I know it’s more complicated, but at the end of the day, Monero makes so much more sense than bitcoin for the Noster protocol on all clients

that's awesome, I just built something similar for noStrudel but it only runs off of the IndexedDB https://github.com/hzrd149/nostr-idb

I was just about to look into sqlite-wasm for this exact reason. but you already built it 😁

Is the `@snort/worker-relay` package on npm? I looked and couldn't find it anywhere

No didn't publish it yet. I want to make the interface more relay like, right now it's async rpc pattern but I want to change it to work exactly like a relay

cool, cant wait to test it out.

also here is the code I wrote to make my worker relay talk like a normal relay https://github.com/hzrd149/nostr-idb/blob/master/src/relay/relay-message-bus.ts

When you say you have a full relay does that mean I can connect to it via a websocket? Just kidding.

Yes you can actually with P2P webrtc data channel. This is nostr:npub1g53mukxnjkcmr94fhryzkqutdz2ukq4ks0gvy5af25rgmwsl4ngq43drvk dream goal, now its almost a reality