Repository navigation
fix: delay indexing by configured confirmations - #115
Merged
Merged
Conversation
…s for batch address checks
anhthii
approved these changes
Sep 24, 2026
engboustani
added a commit
to engboustani/multichain-indexer
that referenced
this pull request
Oct 21, 2026
ContainsBatch only accepted int64 items. go-redis v9 speaks RESP3 by default, where RedisBloom answers BF.MEXISTS with booleans, so every address read as unmonitored and the EVM indexer matched no ERC-20 transfer (and no native transfer to a watched address) since the batch check replaced per-address lookups (fystack#115). Accept both reply shapes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
confirmationsso BSC blocks aren't queried for logs before the node has finished indexing them. Fixes BSC: ERC20 deposits silently missed when eth_getLogs returns incomplete logs at chain head #114 — a race whereeth_getLogssilently returned partial/empty results at the chain head, causing missed ERC20 deposits.Contains/Existcall — on the Redis-backed bloom filter that's oneBF.EXISTSround trip per lookup, which on BSC (hundreds of Transfer events per block) dominated per-range processing time. Now all addresses in a range are deduplicated and checked in a singleBF.MEXISTS/ContainsBatchcall.Changes
BaseWorker.processingHead/RegularWorker/CatchupWorker: compute and uselatest - confirmationsinstead of the raw chain head for range boundaries, starting position, and lag detection. Never rewinds past an already-persisted checkpoint.WalletAddressBloomFilter/pubkeystore.Store: newContainsBatch/ExistBatchmethods, implemented for both the Redis (BF.MEXISTS) and in-memory backends.EVMIndexer.queryERC20TransfersToMonitoredAddresses: collects uniquefrom/toaddresses across all Transfer logs in a range, then resolves monitored status via a single batched lookup instead of one lookup per log.EVMIndexer.extractReceiptTxHashes: same batching applied to the native-transfer and Gnosis Safe exec-transaction matching paths — address resolution for a whole block batch is deferred and done in one lookup instead of per-candidate-transaction.