fix(scan): probe block-by-hash for 64-hex search queries#55
Merged
Conversation
V2 (scan.sentriscloud.com + scan-testnet.sentriscloud.com) was missing from the live audit surface. Both stay live alongside V1 per ops direction; the audit needs to monitor both. Renamed v1 entries with explicit `-v1` suffix for symmetry. Verified locally: clean across all 17 surface URLs.
Before: 64-hex regex matched but only ran probeTx() on both networks.
A user pasting a block hash → both probes fail → "Transaction not
found" error message even though the hash IS a valid block hash.
After: 4 parallel probes (tx + block on current + other network).
Block hits resolve through getBlock({blockHash}) and route to
/blocks/<resolved-height> since the block route is height-keyed.
Tx still wins precedence — they're disjoint hash spaces in practice
but the explicit ordering keeps semantics deterministic.
Cost: 4 RPC calls instead of 2, but they run concurrently → wall
time stays bounded by the slowest single probe (~50ms).
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
Surfaced via user report — pasting a 64-hex block hash into V1 scan search returned "Transaction not found" even though block hashes are a legitimate search input.
Root cause:
lib/search-validate.tsmatched 64-hex with regex but only ranprobeTx()on both networks. Block hashes were never probed — so any block-hash query dead-ended at the tx error.Fix: 4 parallel probes (tx + block on current + other network). Block hits resolve through
getBlock({blockHash})and route to/blocks/<resolved-height>since the block detail route is height-keyed. Tx still wins precedence on ambiguity.Cost
4 RPC calls instead of 2, but they run via
Promise.all→ wall time stays bounded by the slowest single probe (~50ms at typical chain RPC latency).Test plan
eth_getBlockByHash→ routes to/blocks/<height>/tx/<hash>(tx precedence preserved)?network=flip