Skip to content

fix: when holders > 10k & query fails, show > 10,000#792

Merged
o-az merged 1 commit intomainfrom
o-az/fix-holders
Mar 28, 2026
Merged

fix: when holders > 10k & query fails, show > 10,000#792
o-az merged 1 commit intomainfrom
o-az/fix-holders

Conversation

@o-az
Copy link
Copy Markdown
Member

@o-az o-az commented Mar 28, 2026

The tidx server silently caps query results at 10,000 rows and returns 422 for extremely large aggregation queries. Both cases caused the /tokens page to show incorrect holder counts:

  • pathUSD (422 error): showed 0 → now > 10,000
  • USDC.e (10k row truncation): showed 3,260 from incomplete data → now > 10,000

Changes

  • Catch 422 errors in fetchTokenHoldersCount and return capped count
  • Detect when raw transfer pair rows hit the 10k server ceiling and treat as capped instead of aggregating incomplete data
  • Add .catch() for fetchTokenTransferAggregate so a single failed query doesn't reject the entire per-token promise

Permanent indexer fix tracked in tidx#152.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 28, 2026

Bundle Size Report

Metric Size Δ Change
Total 4.1 MB -673.7 KB (-13.8%)
Gzip 1.2 MB -110.2 KB (-8.3%)
Brotli 1.0 MB -88.5 KB (-7.7%)
Chunk changes (>1KB)
Chunk Change
assets/KeyManager.js (removed) -477.4 KB
assets/QueryBuilder.js (removed) -423.4 KB
assets/router.js -303.0 KB
assets/wagmi.config.js -166.8 KB
assets/_hash.js -128.9 KB
assets/BaseTanStackRouterDevtoolsPanel-Bmws3ikM.js (removed) -99.5 KB
assets/Intro.js (removed) -66.0 KB
assets/createSsrRpc.js (removed) -43.8 KB
assets/isAddressEqual.js -32.5 KB
assets/path.js (removed) -30.6 KB
assets/FloatingTanStackRouterDevtools-B7vy70jP.js (removed) -24.4 KB
assets/_layout.js -21.4 KB
assets/stringify.js (removed) -19.7 KB
assets/Hash.js -16.4 KB
assets/address.js -14.1 KB
assets/getAction.js -13.0 KB
assets/base.js (removed) -12.8 KB
assets/utils.js -10.1 KB
assets/token.server.js (removed) -9.8 KB
assets/Address.js -9.7 KB
...and 36 more

Compared against main branch (baseline from 2/4/2026, 5:13:51 PM)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 28, 2026

Cloudflare Deployments

App Environment Status Preview
explorer devnet [OK] Deployed View Preview
explorer mainnet [OK] Deployed View Preview
explorer testnet [OK] Deployed View Preview
fee-payer devnet [>>] Skipped No changes
fee-payer moderato [>>] Skipped No changes
fee-payer privy [>>] Skipped No changes
og - [>>] Skipped No changes
tokenlist - [OK] Deployed View Preview

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a009f1c647

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@o-az

This comment was marked as resolved.

@o-az o-az changed the title fix: show '> 10,000' for token holders when indexer query fails fix: when holders > 10k & query fails, show > 10,000 Mar 28, 2026
The tidx server silently caps query results at 10,000 rows and returns
422 for extremely large aggregation queries. Both cases caused the
/tokens page to show incorrect holder counts:

- pathUSD (422 error): showed '0' instead of '> 10,000'
- USDC.e (10k row truncation): showed '3,260' from incomplete data

Changes:
- Catch 422 errors in fetchTokenHoldersCount and return capped count
- Detect when raw transfer pair rows hit the 10k server ceiling and
  treat the result as capped instead of aggregating incomplete data
- Add .catch() for fetchTokenTransferAggregate so a single failed query
  doesn't reject the entire per-token promise
@o-az o-az force-pushed the o-az/fix-holders branch from b4b1eaf to 6bf723a Compare March 28, 2026 13:36
@o-az o-az merged commit da460ad into main Mar 28, 2026
14 checks passed
@o-az o-az deleted the o-az/fix-holders branch March 28, 2026 18:16
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