Skip to content

eth/filters: reject GetLogs range with begin > 0 and end == 0#35070

Open
rayjun wants to merge 1 commit into
ethereum:masterfrom
rayjun:filters-reject-end-zero
Open

eth/filters: reject GetLogs range with begin > 0 and end == 0#35070
rayjun wants to merge 1 commit into
ethereum:masterfrom
rayjun:filters-reject-end-zero

Conversation

@rayjun

@rayjun rayjun commented May 29, 2026

Copy link
Copy Markdown
Contributor

The begin > 0 && end > 0 guard skips validation when toBlock == 0 (genesis); switch both bounds to >= 0 so the API rejects ranges like fromBlock=5, toBlock=0 directly instead of relying on the deeper rangeLogs check.

@rayjun rayjun requested a review from rjl493456442 as a code owner May 29, 2026 07:22

@MariusVanDerWijden MariusVanDerWijden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, in the case of begin = 5 end = 0 we wouldn't reject, this fixes it

@MariusVanDerWijden

Copy link
Copy Markdown
Member

@rayjun please write a short PR description

@rayjun

rayjun commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

@rayjun please write a short PR description
done

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.

2 participants