Skip to content

rpc: add a rpc.rangelimit flag#33163

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

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

Conversation

@MqllR
Copy link
Copy Markdown
Contributor

@MqllR MqllR commented Nov 12, 2025

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
Copy link
Copy Markdown
Contributor

s1na commented Dec 18, 2025

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

@MqllR
Copy link
Copy Markdown
Contributor Author

MqllR commented Dec 18, 2025

@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
Copy link
Copy Markdown
Contributor Author

MqllR commented Dec 19, 2025

@jrhea @s1na comments have been addressed :)

@MqllR MqllR requested a review from jrhea December 19, 2025 08:51
Copy link
Copy Markdown
Contributor

@jrhea jrhea left a comment

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
Copy link
Copy Markdown
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

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
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