Skip to content

api: support blockHash in eth_getLogs and read fromBlock 0x0 as the first block - #5039

Open
guo wants to merge 1 commit into
masterfrom
guo/eth-getlogs-blockhash
Open

guo wants to merge 1 commit into
masterfrom
guo/eth-getlogs-blockhash

Conversation

@guo

@guo guo commented Oct 2, 2026

Copy link
Copy Markdown
Member

eth_getLogs ignored a blockHash filter and returned logs from the latest
block, and a fromBlock of 0x0 was passed on as 0, which the range query
reads as the tip. Query the given block when blockHash is set (rejecting
it together with fromBlock/toBlock), and start log ranges at block 1 when
the start is 0.

Test: api/web3server_test.go covers the change and fails without it. go test -gcflags=all=-N -l -short passes for the touched packages.

…irst block

eth_getLogs ignored a blockHash filter and returned logs from the latest
block, and a fromBlock of 0x0 was passed on as 0, which the range query
reads as the tip. Query the given block when blockHash is set (rejecting
it together with fromBlock/toBlock), and start log ranges at block 1 when
the start is 0.
@guo
guo requested a review from a team as a code owner October 2, 2026 17:42
@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant