Closed
Conversation
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
Member
|
@jxom this fixes issue for tokens with more than 10k holders. Currently explorer shows pathUSD has 0 holders: https://explore.tempo.xyz/tokens |
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.
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_MAX10,000 → 100,000Context
Companion to tempo-apps#789 which fixes the query structure. Together they fully fix PathUSD holder counts on the explorer.
Prompted by: omar