Skip to content

fix(relay): raise MAX_HISTORICAL_LIMIT from 500 to 10,000#486

Merged
tlongwell-block merged 1 commit intomainfrom
fix/raise-historical-limit
May 5, 2026
Merged

fix(relay): raise MAX_HISTORICAL_LIMIT from 500 to 10,000#486
tlongwell-block merged 1 commit intomainfrom
fix/raise-historical-limit

Conversation

@tlongwell-block
Copy link
Copy Markdown
Collaborator

Problem

The desktop client's "add member" search fetches all kind:0 profiles (limit: 2000) and filters client-side. The relay's MAX_HISTORICAL_LIMIT = 500 clamps this, so only 500 of ~1,700 profiles are returned — making ~1,200 users invisible to the search.

Fix

Raise MAX_HISTORICAL_LIMIT to 10,000. This is a corporate relay with a bounded user set — 10k rows of kind:0 events (~2-5MB) is trivial for Postgres.

Also updates the NIP-11 max_limit advertisement to match.

Context

The 500 cap was a conservative default appropriate for public relays protecting against abusive queries. For a private team relay with known scale, it's unnecessarily restrictive.

The 500-event cap was preventing the desktop client from fetching all
kind:0 profiles for user search (~1,700 users on staging). Corporate
relays have a bounded user set — 10k rows is trivial for Postgres.

Also updates the NIP-11 max_limit advertisement to match.
@tlongwell-block tlongwell-block enabled auto-merge (squash) May 5, 2026 20:35
@tlongwell-block tlongwell-block merged commit ceb5afd into main May 5, 2026
14 checks passed
@tlongwell-block tlongwell-block deleted the fix/raise-historical-limit branch May 5, 2026 20:44
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.

1 participant