From 2418bf3c9f9b0f5380e725572738fe3510c54fa1 Mon Sep 17 00:00:00 2001 From: Tyler Longwell Date: Tue, 5 May 2026 16:34:23 -0400 Subject: [PATCH] fix(relay): raise MAX_HISTORICAL_LIMIT from 500 to 10,000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- crates/sprout-relay/src/handlers/req.rs | 2 +- crates/sprout-relay/src/nip11.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/sprout-relay/src/handlers/req.rs b/crates/sprout-relay/src/handlers/req.rs index 63301306..015ed351 100644 --- a/crates/sprout-relay/src/handlers/req.rs +++ b/crates/sprout-relay/src/handlers/req.rs @@ -20,7 +20,7 @@ use crate::connection::{AuthState, ConnectionState}; use crate::protocol::RelayMessage; use crate::state::AppState; -const MAX_HISTORICAL_LIMIT: i64 = 500; +const MAX_HISTORICAL_LIMIT: i64 = 10_000; const MAX_SUBSCRIPTIONS: usize = 1024; const P_GATED_KINDS: [u32; 4] = [ KIND_AGENT_OBSERVER_FRAME, diff --git a/crates/sprout-relay/src/nip11.rs b/crates/sprout-relay/src/nip11.rs index cba3ada9..1a1694c2 100644 --- a/crates/sprout-relay/src/nip11.rs +++ b/crates/sprout-relay/src/nip11.rs @@ -74,7 +74,7 @@ impl RelayInfo { max_message_length: Some(MAX_FRAME_BYTES as u64), max_subscriptions: Some(1024), max_filters: Some(10), - max_limit: Some(500), + max_limit: Some(10_000), max_subid_length: Some(256), min_pow_difficulty: None, auth_required: config.require_auth_token,