No, it's mostly just the core structures that I use. I could migrate to go-nostr, but nostrlib is genuinely better in this area.
I attempted to switch to rely this morning and decided against it for now due to the lack of negentropy and blossom support. I get not wanting to include that stuff, but examples or external libraries would make the process easier (I do think negentropy should be table stakes for relays nowadays).
Login to reply
Replies (7)
Thanks for the feedback.
To me, blossom is an orthogonal thing, which can be added in this way:
- create an http server (there are many many frameworks in go, even the standard library is fine).
- create a relay
- use the relay handlers in the http server (relay.ServeWS, relay.ServeNip11)
- add the blossom handlers to the server
and voilà, server is now relay + blossom.
For negentropy, that is another story since it used the websocket protocol.
It would be a nice addition to rely, so I'll add it to the roadmap. I am just conscious about complexity in general, since I want to maintain rely long term, not leave it rotting.
How about a new library that has only data structures, no dependencies, minimal utilities like a relay pool, Query, Subscribe, and very performant JSON marshalling / unmarshalling?
Man I am so tempted to build this
I would entirely skip the networking code, but yes
Absolutely, I think that breakdown is the right call. A blossom library could be built separately
my relay #orly has a blossom server built into it now. the library has the fastest event codecs for both the database binary version and the json, i just finished adding a feature where it can now load the libsecp256k1 library as a dynamic linkable without the cgo complications (you just need a version of the library with schnorrsig extension on). it doesn't have negentropy but i have built a sync protocol that lets you build a cluster that stays in sync, and using the new policy engine you can specialise nodes to only replicate some specific criteria of events.
i probably should put negentropy in there. easy enough to copy it out of khatru.
oh yeah, i forgot, the orly repo libraries also have an NWC client implementation, and it's used in a subscription whitelist system.
users pay for subscription by zapping the relay's npub btw.