You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: detectBlockchain runs every non-EVM validator on every input #8
Every input runs the full Bech32 decode in all five Cosmos validators, plus Base58 decodes for Solana, TRON, Ripple, Cardano and the UTXO chains. Dispatching on the Bech32 HRP, or on the first character for Base58 formats, would skip most of that work. This matters less after the Keccak speed-up (see the Keccak performance issue), but it's still the slowest public API.
detectBlockchain now checks a cheap precondition before running each non-EVM validator, so results and their order are unchanged (commit 7f35b38). A new test compares it against exhaustive validation over ~1,000 inputs. Detection is 2.4-10x faster depending on input.
Confirmed that detection tries all five Cosmos validators even when the prefix rules out four or all five. The EVM aliases already share one validation, and NEAR already has an input filter. I’d defer broader changes until a mixed-input benchmark shows where detection spends its time after #1.
For a future optimization, please compare the complete ordered result against the current detector, including shared UTXO prefixes, Sui/Aptos overlap, uppercase Bech32 and network filters. Returning every valid candidate is the behavior callers depend on.
Activity
perf: gate detectBlockchain with cheap per-chain prechecks
Dhananjay-alt commentedon Nov 21, 2026
Fixed in #10.
detectBlockchain now checks a cheap precondition before running each non-EVM validator, so results and their order are unchanged (commit 7f35b38). A new test compares it against exhaustive validation over ~1,000 inputs. Detection is 2.4-10x faster depending on input.
Samarth208P commentedon Nov 21, 2026
Confirmed that detection tries all five Cosmos validators even when the prefix rules out four or all five. The EVM aliases already share one validation, and NEAR already has an input filter. I’d defer broader changes until a mixed-input benchmark shows where detection spends its time after #1.
For a future optimization, please compare the complete ordered result against the current detector, including shared UTXO prefixes, Sui/Aptos overlap, uppercase Bech32 and network filters. Returning every valid candidate is the behavior callers depend on.