nostr-rs-relay icon indicating copy to clipboard operation
nostr-rs-relay copied to clipboard

About how to use nostr-rs-relay to customize the specific requirment?

Open VegeBun-csj opened this issue 2 years ago • 5 comments

I have just come into learning with the content of nostr protocol and built my own relay by nostr-relay. My understanding is that on the basis of the NIP implemented by rust-relay at present, we only need to add custom restrictions in the configuration file. Does my relay only need to do this, or does it need to be developed and designed? like: an external gRPC server to solve some spam and then broadcast the event to the relay ?

VegeBun-csj avatar Feb 23 '23 03:02 VegeBun-csj

There is gRPC client that can connect to your 'submission'/'validation' gRPC server, you got event and some parameters and can decide to deny this event. I'm implementing some external event processing where there is a gRPC server on relay side and you can send broadcast/notice event back to relay after processing (don't have to respond imediatelly with permit/deny etc.). You must implement your spam protection as gRPC is new in nostr-rs-relay and there is no already made software for it. Issue I've posted what was my idea: https://github.com/scsibug/nostr-rs-relay/issues/75 Not finished branch (based on my PR), wip, not cleaned, proto/example probably to refactor etc: https://github.com/otherlayer/nostr-rs-relay/tree/nostr_grpc_server Sending notice still to be implemented (just to have bare external processing, no extensions, plugins etc) as I need some identification of ws client when event coming back to relay, considering just pubkey and ahash for maping to client notice_tx Sender. Or I don't get something and can be done easier (new to Rust), any mentoring appreciated ;)

otherlayer avatar Feb 24 '23 03:02 otherlayer

Ok, thanks. So GRPC is a way to process some request of spam, and nostr NIP can implement some payment mechanism and pos to prevent it.

VegeBun-csj avatar Feb 25 '23 14:02 VegeBun-csj

Not only spam, you can do many things depending on event using gPRC. You can do spam deterrence using zaps I guess.

otherlayer avatar Feb 25 '23 17:02 otherlayer

what is zaps? 😄

VegeBun-csj avatar Feb 26 '23 06:02 VegeBun-csj

Nostr lightning payments, according your nip payment mechanism comment to prevent spam, probably in the future can be used as nostr native pay-to-relay mechanism, but I would like to see it first in nip protocol for what you pay to relay what.

otherlayer avatar Feb 26 '23 12:02 otherlayer