Skip to content

Fix pagination#2407

Open
vitorpamplona wants to merge 3 commits into
nostr-protocol:masterfrom
vitorpamplona:solve-pagination
Open

Fix pagination#2407
vitorpamplona wants to merge 3 commits into
nostr-protocol:masterfrom
vitorpamplona:solve-pagination

Conversation

@vitorpamplona

Copy link
Copy Markdown
Collaborator

Describes a foolproof way of doing this without extra commands or information.

@staab

staab commented Jul 3, 2026

Copy link
Copy Markdown
Member

Couldn't I just send a bunch of events with the same created_at to fill relay pages and force them to implement a default limit of a million? Dynamically setting this limit seems complex too.

Here's another idea: what about just adding a cursor: event_id property to filters so relays could drop anything before/after that if since was ambiguous (and do nothing otherwise)?

@vitorpamplona

Copy link
Copy Markdown
Collaborator Author

Relays are free to delete those events if people abuse. My take is that we don't actually need to change anything... We just need relay operators to know their limits might be making it impossible for clients to get their complete data.

@staab

staab commented Jul 3, 2026

Copy link
Copy Markdown
Member

Even so, this could negatively impact scaling. Let's say a big relay reaches 10k tps without any abuse. Now pages have to be 10k minimum. It's a weird thing to couple.

@vitorpamplona

Copy link
Copy Markdown
Collaborator Author

They can do dynamic limits too. If the req happens to go over the dense created at, that page returns over the limit, the rest is fine.

Sharper language
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.

2 participants