Skip to content

Conversation

@MqllR
Copy link

@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

backend.startFilterMaps(0, false, filtermaps.DefaultParams)
defer backend.stopFilterMaps()

// Set rangeLimit to 5, but request 10 blocks
Copy link
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.

}
RPCGlobalRangeLimitFlag = &cli.Uint64Flag{
Name: "rpc.rangelimit",
Usage: "Maximum block range allowed for range queries (0 = unlimited)",
Copy link
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.

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.

3 participants