Skip to content

rpc: add a rpc.rangelimit flag#33163

Merged
MariusVanDerWijden merged 4 commits into
ethereum:masterfrom
MqllR:filter_rangelimit
Jan 17, 2026
Merged

rpc: add a rpc.rangelimit flag#33163
MariusVanDerWijden merged 4 commits into
ethereum:masterfrom
MqllR:filter_rangelimit

Conversation

@MqllR

@MqllR MqllR commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

Adding an RPC flag to limit the block range size for eth_getLogs and eth_newFilter requests.

closing #24508

Comment thread eth/filters/filter_test.go Outdated
backend.startFilterMaps(0, false, filtermaps.DefaultParams)
defer backend.stopFilterMaps()

// Set rangeLimit to 5, but request 10 blocks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment refers to [0,9] as 10 blocks, but the implementation enforces the limit on end - begin (9 in this case). Might be worth clarifying this so it’s clear the limit applies to end - begin, not the inclusive block count.

Comment thread cmd/utils/flags.go Outdated
}
RPCGlobalRangeLimitFlag = &cli.Uint64Flag{
Name: "rpc.rangelimit",
Usage: "Maximum block range allowed for range queries (0 = unlimited)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe clarify that this limit applies to (end - begin), since block range can be interpreted as an inclusive count.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Simply added the (end - begin) information but if you have a better description or find it still unclear, let me know :)

@s1na

s1na commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

@MqllR are you still working on this? please address the review comments.

@MqllR

MqllR commented Dec 18, 2025

Copy link
Copy Markdown
Contributor Author

@MqllR are you still working on this? please address the review comments.

@s1na, I am :) I was waiting for your feedback and it you're aligned with @jrhea comments, I'll address them by tomorrow.

@MqllR

MqllR commented Dec 19, 2025

Copy link
Copy Markdown
Contributor Author

@jrhea @s1na comments have been addressed :)

@MqllR MqllR requested a review from jrhea December 19, 2025 08:51

@jrhea jrhea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm now. i yield to @s1na for final approval.

@MariusVanDerWijden MariusVanDerWijden changed the title rpc: add a rpc.rangelimit flag for limiting block range size for log … rpc: add a rpc.rangelimit flag Jan 17, 2026

@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

@MariusVanDerWijden MariusVanDerWijden merged commit 3d78da9 into ethereum:master Jan 17, 2026
5 of 6 checks passed
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Jan 17, 2026
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Jan 19, 2026
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Jan 20, 2026
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Jan 29, 2026
AnilChinchawale pushed a commit to XinFinOrg/XDPoSChain that referenced this pull request Jan 29, 2026
gballet pushed a commit to BZO95/go-ethereum that referenced this pull request May 21, 2026
Adding an RPC flag to limit the block range size for eth_getLogs and
eth_newFilter requests.

closing ethereum#24508

---------

Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de>
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.

4 participants