nosflare icon indicating copy to clipboard operation
nosflare copied to clipboard

Update to support NIPs listed below

Open outlaw-dame opened this issue 1 year ago • 7 comments

Please consider supporting NIP-42authentication NIP-50full-text search NIP-65 – Relay lists

outlaw-dame avatar Aug 28 '24 16:08 outlaw-dame

Thanks for the feedback! NIP-42 is on the roadmap. I tried integrating NIP-50 in some earlier iterations and it did not perform as well as I'd had hoped, so I removed support. I believe due to the way events are stored and the limited number of events that we're able to fetch/query. Though, I have some ideas for how to potentially resolve it. Including supporting replaceable events like NIP-65. We'll see how it goes in the future.

Spl0itable avatar Aug 30 '24 23:08 Spl0itable

Thanks for your response I do hope it gets solved. I look forward to the updates

outlaw-dame avatar Nov 07 '24 23:11 outlaw-dame

Is there a roadmap somewhere to track progress? I'm also interested in NIP-42 as well as NIP-26 and would like to help if there is some good way for me to get started.

tionis avatar Mar 30 '25 01:03 tionis

@tionis At this moment, both NIPs 42 and 50 appear to be unachievable. I had extensively tested both and neither function properly due to the stateless nature of Cloudflare Workers and due to the data structure in R2 bucket.

As for NIP-26, this appears to publish a note that adds tags for the delegation. By default, all tags and REQs for any tag is supported by default on Nosflare. I have not yet tested, but in theory NIP-26 should work already.

Spl0itable avatar Mar 31 '25 05:03 Spl0itable

Regarding NIPs 42 and 50: that's really unfortunate, they would would really have been nice to have.

NIP-26 would maybe be interesting in combination with authentication, if I understood it correctly.

What exactly blocks NIP-42 (Authentication) I can understand full-text-search being blocked, but why auth?

tionis avatar Mar 31 '25 07:03 tionis

What exactly blocks NIP-42 (Authentication) I can understand full-text-search being blocked, but why auth?

@tionis due to the stateless nature of Nosflare (since it runs on Workers) each connection to the relay uses a new Worker, which is impossible to track the authentication <challenge-string> for each request.

So, it effectively just writes a bunch of data to the R2 bucket that cannot be retrieved for the same user. It could possibly be solved through IP tracking, but not sure I want the relay implementation to track people.

Since it's FOSS, someone could fork and build that into it if they'd like. But, for now it seems that NIPs 42 and 50 aren't possible with a serverless style relay.

Spl0itable avatar Apr 05 '25 05:04 Spl0itable

I've reopened this issue as these NIPs can now be included since the relay code has been refactored and updated to utilising a SQL database. I'll investigate including them soon.

Spl0itable avatar Jun 09 '25 07:06 Spl0itable

All three NIP-42 and NIP-50 and NIP-65 have been added to the latest version

Spl0itable avatar Nov 30 '25 23:11 Spl0itable