Skip to content

More subs and less filters / sub#146

Merged
hoytech merged 1 commit intohoytech:masterfrom
vitorpamplona:allow-more-subs-less-filters
Feb 28, 2026
Merged

More subs and less filters / sub#146
hoytech merged 1 commit intohoytech:masterfrom
vitorpamplona:allow-more-subs-less-filters

Conversation

@vitorpamplona
Copy link
Copy Markdown
Contributor

@vitorpamplona vitorpamplona commented May 8, 2025

This is in support of and to prepare for nostr-protocol/nips#1645

@vitorpamplona vitorpamplona changed the title inverts the previous configuration to allow for more subs and less reqs More subs and less filters / sub May 8, 2025
@hoytech
Copy link
Copy Markdown
Owner

hoytech commented Feb 27, 2026

Sorry, I haven't been tracking all the NIP progress. Is this still the way forward? Looks like @fiatjaf closed the NIP above.

@fiatjaf
Copy link
Copy Markdown
Contributor

fiatjaf commented Feb 27, 2026

After too much drama I decided to end my quest to support a single filter per REQ.

I still think the way forward is to limit REQs by filter, not by REQ. Or, better, by query cost (i.e. a query with two pubkeys costs twice more than a query with a single). That would probably move us closer to a fairer and better world regardless of protocol changes.

@hoytech
Copy link
Copy Markdown
Owner

hoytech commented Feb 27, 2026

Makes sense. This probably will impact some clients, but I don't really know what the blast radius would be.

I'll hold off on merging this for now, but let me know if I should before the next release.

@fiatjaf
Copy link
Copy Markdown
Contributor

fiatjaf commented Feb 27, 2026

I think merging this PR is probably a good thing, but not super important either way.

@vitorpamplona
Copy link
Copy Markdown
Contributor Author

This is important to make the client's life easier. Nobody changes default settings, and because StrFry is so well used, this becomes the way nostr works. And because the current defaults only allow 20 subs, clients have to make additional logic to merge multiple subs into one REQ, which turns pagination/EOSE management into a mess.

Please consider it.

@hoytech hoytech merged commit 9530d4a into hoytech:master Feb 28, 2026
@hoytech
Copy link
Copy Markdown
Owner

hoytech commented Feb 28, 2026

Merged. Thanks!

@vitorpamplona
Copy link
Copy Markdown
Contributor Author

Quick add-on here. From my side, we don't need to reduce the Maximum number of filters allowed in a REQ to 20 if you are concerned about breaking some clients. We can keep both values at 200. That shouldn't break anything.

@hoytech
Copy link
Copy Markdown
Owner

hoytech commented Feb 28, 2026

OK sounds good, I put it back to 200 to minimise disruption: 1a8e7ff

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.

3 participants