fix(scan): tight 2.5s timeout on cross-network detail probes#59
Merged
Conversation
V1 scan README + both env files referenced subdomains that no longer resolve (sentrixscan.sentriscloud.com, testnet-scan.sentriscloud.com, sentrix-rpc.sentriscloud.com, sentrix-api.sentriscloud.com — all 000 on probe). Same drift in apps/landing/.env.example. Canonical subdomains (per probe + memory project_chain_naming_canonical): V1 scan mainnet : scan.sentrixchain.com V1 scan testnet : scan-testnet.sentrixchain.com V2 scan mainnet : scan.sentriscloud.com V2 scan testnet : scan-testnet.sentriscloud.com RPC mainnet : rpc.sentrixchain.com (bare, no /rpc suffix) RPC testnet : testnet-rpc.sentrixchain.com (bare) REST mainnet : api.sentrixchain.com REST testnet : testnet-api.sentrixchain.com Also fixes the V1 README "Deploy" section: it claimed nginx + ports 3006/3007 (one process per network), reality is single Caddy upstream on port 3005 serving both subdomains.
Block / tx / token detail pages fire a parallel "is this same id also on the other chain?" side-probe so a user who pasted (e.g.) a testnet hash on the mainnet domain gets auto-switched. Pre-fix the side-probe inherited the apiFetch default 8s timeout, so when the peer network was unreachable (testnet outage 2026-05-11) the primary detail page sat on a not-found wall for 8s waiting on the dead peer. Plumbed an optional timeoutMs parameter through: fetchBlock(network, height, timeoutMs?) api.ts fetchTransaction(network, txId, timeoutMs?) api.ts fetchToken(network, address, timeoutMs?) api.ts useBlock(network, height, timeoutMs?) hooks.ts useTransaction(network, hash, timeoutMs?) hooks.ts Side-probe call sites updated: blocks/[height]/page.tsx → useBlock(other, h, 2500) tx/[hash]/page.tsx → useTransaction(other, h, 2500) tokens/[addr]/page.tsx → fetchToken(other, addr, 2500) Primary fetches keep the 8s default. Worst-case page render now 2.5s when peer is down vs. 8s. Typecheck clean.
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
Block / tx / token detail pages each fire a parallel cross-network side-probe so a user who pasted (say) a testnet hash on the mainnet domain gets auto-switched to the right network. Pre-fix the side-probe inherited the `apiFetch` default 8 s timeout, so when the peer network was unreachable (testnet outage on 2026-05-11) the primary detail page sat on a not-found wall for 8 s waiting on the dead peer.
Fix
Plumbed an optional `timeoutMs` through:
Side-probe call sites passed `2500`:
Primary fetches keep the 8 s default. Worst-case page render is now 2.5 s when the peer is down (was 8 s).
Verification
Test plan