Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to catch buggy or malicious relays #671

Open
dluvian opened this issue Dec 11, 2024 · 2 comments
Open

Add option to catch buggy or malicious relays #671

dluvian opened this issue Dec 11, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@dluvian
Copy link
Contributor

dluvian commented Dec 11, 2024

Describe the enhancement

Add an option to RelayOptions which will automatically disconnect/blacklist/mark a relay once we receive:

  • too many events in a subscription (x more than the sum of all limit in the subscription filter array)
  • or an event that does not match the subscription filter

Use case

I trust the relays that the user specified in their nip65, but sometimes we need to connect to unknown relays which we should treat with caution because they might be malicious or buggy and sending us too many or even wrong events. It would be nice if we could easily close the connection once one of these cases are detected.

Additional context

I'm using your nostr-relay-pool crate

@dluvian dluvian added the enhancement New feature or request label Dec 11, 2024
@yukibtc
Copy link
Member

yukibtc commented Dec 11, 2024

Thanks for suggestion, I'll try to check how to implement this.

I'm using your nostr-relay-pool crate

In what project? I'm always curious to see how devs use Client or RelayPool in their app, to know how I can improve/fix the SDK (I usually don't work on frontends).

@dluvian
Copy link
Contributor Author

dluvian commented Dec 11, 2024

In what project? I'm always curious to see how devs use Client or RelayPool in their app, to know how I can improve/fix the SDK (I usually don't work on frontends).

It's a GUI for nostr git issues but it's still very early, only started it a few days ago. I will tag you on nostr once I release the first version.

@yukibtc yukibtc added this to the Release v0.38 milestone Dec 12, 2024
@yukibtc yukibtc modified the milestones: Release v0.38, Release v0.39 Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants