!5330perf/evm-receipts-logsbloom-gate-avax-base → developa02e9022ea

Extend the logsBloom filter to BASE and stop fetching for known contracts

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.

6commits
2files
613lines changed
34lines to read
20 of 20BASE blooms match receipts (this review)
6 of 100AVAX blooms match (author)
14 of 49BSC fetches dropped (author)

Where the diff is

Tests1 files · 579 lines

…/chainclients/evm/receipts_gate_test.go+539 −40
1known contract skips2router log fetches3random blocks match receipts4all-zero bloom fetches5AVAX never skips

Which chains try the filter

BASE joins BSC; POL and AVAX keep fetching every block.

newchanged

2-minute explainer

What changed

The filter

No router in the bloom and no vault in the txs: skip receipts.

bloomtx fieldsskip

BASE deposit priced 0

Matches the receipt, where base fee + tip would give the base fee.

Known contracts stop fetching

The parser reads router logs only, so no router log means no observation.

All-zero bloom fetches

A block with txs can't show whether its empty bloom is real.

AVAX stays out

Its header bloom covers settled blocks, not the block's own logs.

What tests cover

Five mutations all caught; one vault test no longer exercises the sender check.

Line by line · every changed logic line, narrated

3:10runtime
5code chapters
100%logic lines narrated (31/31)
5flagged 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

ACP-194
Avalanche's streaming asynchronous execution. Blocks execute after acceptance, and a later block carries settled results, including logsBloom. ACP-194 ↗
Deposit tx
An OP Stack transaction type (0x7e) sent from L1. It names its sender instead of signing, and every BASE block has one.
EVMDisableContractWhitelist
Mimir that, when 1, lets the scanner parse deposits arriving through any contract, so tx.To can't find them. evm_block_scanner.go ↗
Gas rate
The scanner's rolling median of block medians, rounded up to GasPriceResolution, and reported to THORChain.
logsBloom
A 2048-bit block header filter of log addresses and topics. It has no false negatives only for the logs it was built from. evm_block_scanner.go ↗
Mimir
Network parameters that node operators can vote to override. docs/mimir.md ↗
Router
THORChain's vault contract on an EVM chain. Its logs are what the scanner parses into deposits.
Whitelisted contract
A contract, such as an aggregator, whose transactions the scanner passes to the log parser. Its own logs are ignored; only router logs count.