fix(relay): raise MAX_HISTORICAL_LIMIT from 500 to 10,000#486
Merged
tlongwell-block merged 1 commit intomainfrom May 5, 2026
Merged
fix(relay): raise MAX_HISTORICAL_LIMIT from 500 to 10,000#486tlongwell-block merged 1 commit intomainfrom
tlongwell-block merged 1 commit intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The desktop client's "add member" search fetches all kind:0 profiles (
limit: 2000) and filters client-side. The relay'sMAX_HISTORICAL_LIMIT = 500clamps this, so only 500 of ~1,700 profiles are returned — making ~1,200 users invisible to the search.Fix
Raise
MAX_HISTORICAL_LIMITto 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_limitadvertisement 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.