!5331perf/eth-receipts-logsbloom-gate → develop6a4b5b43d9

ETH scanner skips receipts the bloom rules out

AI-generatedEverything on this page was written by an AI agent from the diff: the summaries, the narration, the diagrams, the flags and the glossary. It can be wrong or incomplete, so check it against the code before you rely on it.

1commits
2files
806lines changed
110lines to read
39-53%receipt calls skipped (author)
0 / 364missed observations (author)

Where the diff is

Where the filter sits

One new decision before the receipts call; nothing changes after it.

new

3-minute explainer

What changed

The filter

Skip only if bloom and every tx rule out an observation.

router in bloom?to vault?from vault?transfer to vault?

Known contracts don't fetch

Unlike BSC: parsers only read router logs, already ruled out.

57 of 161 no-hit blocksaggregator onlynow skipped

Fail open

Whatever the filter can't settle fetches as before.

empty bloomno routersunknown sendershort calldata

Senders without a call

RPC-reported sender first, then signature; cancelled context blocks network calls.

reported 0.2 mscancelled callrecovered 17 ms

Live comparison

Author's two 600-block mainnet windows, about four hours; not re-run here.

318 skipped234 skipped0 missed

Where to look

Filter reads calldata recipient; receipts path reads the Transfer log.

data[4:36]≠ possibleTopics[2]

Line by line · every changed logic line, narrated

4:37runtime
9code chapters
100%logic lines narrated (79/79)
7flagged spots
speed

Chapters

What to check

Ask an AI about this change

Chat assistantClaude, ChatGPT, … (reads a link)

Coding agentClaude Code, Cursor, … (reads the repo)

The context file is context.md. Use Copy with context for an AI that can't open links; it pastes the whole file in.

Glossary

Bifrost
The THORNode service that watches external chains and signs outbounds.
Direct ERC20 inbound
A plain token transfer(...) to a vault, observed from its Transfer log, behind a per-chain mimir. direct_erc20_transfer.go ↗
eth_getBlockReceipts
RPC returning every receipt of a block in one call; the call this MR avoids.
logsBloom
A 2048-bit filter in each block header over log addresses and topics. It can report false positives but never false negatives. scanner ↗
Observation
A TxInItem a bifrost reports to THORChain about an external-chain transaction. scanner ↗
Router
THORChain's vault contract on an EVM chain; its Deposit and TransferOut logs drive observations.
Signer cache
Local record of transactions this node has signed; a failed tx is removed so it can be retried.
Vault
A THORChain-controlled address holding funds. Active and inactive vaults both count in this filter. pubkey_manager.go ↗
Whitelisted aggregator
A known contract that forwards deposits to a router. The deposit log still comes from the router. whitelist_smartcontract.go ↗