8000 remove bloat that no one cares about from nip11 by fiatjaf · Pull Request #1946 · nostr-protocol/nips · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

remove bloat that no one cares about from nip11 #1946

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fiatjaf
Copy link
Member
@fiatjaf fiatjaf commented May 30, 2025

Is anyone using any of these things?

Uh oh!

There was an error while loading. Please reload this page.

@staab
Copy link
Member
staab commented May 30, 2025

At least keep privacy policy and tos. @dskvr might have opinions.

@greenart7c3
Copy link
Contributor

i've seen people using payment_required and auth_required. No idea about the other fields

@staab
Copy link
Member
staab commented Jun 4, 2025

Also, flotilla uses auth_required, payment_required, and min_pow_difficulty (just to display to users).

@kehiy
Copy link
Contributor
kehiy commented Jun 6, 2025

Amethyst shows all of them to the user. And I believe all clients MUST do so.

cc @vitorpamplona

Copy link
Contributor
@kehiy kehiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NACK

@vitorpamplona
Copy link
Collaborator
vitorpamplona commented Jun 6, 2025

I really wish none of these limits existed. They just make clients more complex by requiring clients to go around them and break one thing down into multiple parts.

You only take 20 filters for a sub with 40? Ok, I will do 2 subs of 20 filters each.
You only take max 65,000Kb for a filter? Ok, I will break the size into two or more subs.
You only allow 500 limits? No worries, I will rotate my filter with since/until until no events are returned.
You only allow 20 subs? No worries, I will open as many connections as necessary and split the filter.
You only allow a maximum number of tags or content size? Too bad, my user doesn't care. He will just move to another relay.

In the end, the relay ends up doing more work than before. It's just more work for everybody.

@fiatjaf
Copy link
Member Author
fiatjaf commented Jun 7, 2025

What if the relay limits the number of connections by IP? You will use a VPN and use a different IP for each connection?

(This is an honest question on how this ends.)

@fiatjaf
Copy link
Member Author
fiatjaf commented Jun 7, 2025

I also wish none of these limits existed for the reasons you mention, but at least the default limit of events to be returned is necessary otherwise clients would inadvertently end up downloading a million events when they just wanted to display the first 10 just because they forgot to specify the "limit". Vibecoders won't even notice it ever.

Limits in the number of open requests are also useful sometimes to let the vibecoder know that they are leaking a ton of open subscriptions without even realizing.

@vitorpamplona
Copy link
Collaborator
vitorpamplona commented Jun 7, 2025

Let them load the 10000 or even millions of events. They will notice the mistake in the first time they test. If we hide it, we just make things worse.

11.md Outdated
Comment on lines 110 to 111
"auth_required": true,
"payment_required": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is being used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actively used.

11.md Outdated
Comment on lines 273 to 287
### Pay-to-Relay

Relays that require payments may want to expose their fee schedules.

```jsonc
{
"payments_url": "https://my-relay/payments",
"fees": {
"admission": [{ "amount": 1000000, "unit": "msats" }],
"subscription": [{ "amount": 5000000, "unit": "msats", "period": 2592000 }],
"publication": [{ "kinds": [4], "amount": 100, "unit": "msats" }],
},
// other fields...
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damus uses this to display payment information and other clients do too, I believe.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actively used.

11.md Outdated
@@ -100,270 +86,18 @@ are rejected or fail immediately.
```jsonc
{
"limitation": {
"max_message_length": 16384,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a web environment I do not think the WS bytes limit is not accessible. So this is useful.

@Semisol
Copy link
Contributor
Semisol commented Jun 7, 2025

I really wish none of these limits existed. They just make clients more complex by requiring clients to go around them and break one thing down into multiple parts.

I agree with this.

For NFDB I implemented a ratelimit policy based off of IP address, and based off of how much work is being done (how many events read from DB, and memory size of subscriptions) instead.

@vitorpamplona
Copy link
Collaborator

What if the relay limits the number of connections by IP? You will use a VPN and use a different IP for each connection?

I am already using an Embed Tor to create multiple exit node IPs that reach out to Relays.

@dskvr
Copy link
Contributor
dskvr commented Jun 13, 2025

I really wish none of these limits existed. They just make clients more complex by requiring clients to go around them and break one thing down into multiple parts.

Agree.

%s_required and writes_restricted limitations should likely stick around because they work well with inbox/outbox and give very useful insight at runtime.

@fiatjaf
Copy link
Member Author
fiatjaf commented Jul 7, 2025

Please take a look at this new commit. Mostly I've removed the "content" guidelines this time. I've kept the restriction numbers and the payments stuff.

Copy link
Contributor
@Semisol Semisol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The merging of the ToS/PP is a good idea, as the link should go to a page that contains easy-to-read sections, and the users can see separate legal versions if they wish easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0