Skip to content

feat: raise HARD_LIMIT_MAX from 10k to 100k#152

Closed
decofe wants to merge 1 commit intomainfrom
omar/raise-hard-limit-max
Closed

feat: raise HARD_LIMIT_MAX from 10k to 100k#152
decofe wants to merge 1 commit intomainfrom
omar/raise-hard-limit-max

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented Mar 27, 2026

Summary

Raise the query result hard limit from 10,000 to 100,000 rows.

Motivation

The explorer's token holder count queries use GROUP BY holder + SUM(tokens) to aggregate Transfer events. For high-volume tokens like PathUSD (the native fee token, used by every transaction), unique senders exceed 10k — silently truncating grouped results and causing the explorer to show 0 holders.

Aggregate queries (GROUP BY + SUM) produce far fewer rows than raw event scans, so 10k is unnecessarily restrictive. 100k covers all current Tempo tokens with room to grow.

Changes

  • src/query/validator.rs: HARD_LIMIT_MAX 10,000 → 100,000
  • Updated validator and service tests to match

Context

Companion to tempo-apps#789 which fixes the query structure. Together they fully fix PathUSD holder counts on the explorer.

Prompted by: omar

The 10k row limit silently truncates aggregate queries (GROUP BY + SUM)
for high-volume tokens like PathUSD on the explorer. Aggregate queries
return far fewer rows than raw scans, so 10k is unnecessarily restrictive.

Co-authored-by: o-az <23618431+o-az@users.noreply.github.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d2c9a-d957-714c-add1-f823c928ddfe
@o-az o-az requested a review from jxom March 28, 2026 12:53
@o-az
Copy link
Copy Markdown
Member

o-az commented Mar 28, 2026

@jxom this fixes issue for tokens with more than 10k holders. Currently explorer shows pathUSD has 0 holders: https://explore.tempo.xyz/tokens

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