Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maxQueryLimit to feeHistory #11973

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

boyuan-chen
Copy link
Contributor

Added a maxQueryLimit constant to define the maximum number of requested percentiles (set to 100).

This implementation is the same as Geth: https://github.com/ethereum/go-ethereum/blob/a01e9742d997ea9e6cedfee41cba433433de9e10/eth/gasprice/feehistory.go#L245

Without this restriction, an attacker could submit a very large payload, causing Erigon to consume over 50GB of memory.

@AskAlexSharov AskAlexSharov merged commit f0c1740 into erigontech:main Sep 20, 2024
8 checks passed
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