-
Notifications
You must be signed in to change notification settings - Fork 240
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
ATTACK-REWARD-Excessive batch RPC request #181
Comments
|
you can set the transaction fee as high as you want, but that won't fix the issue because you're not actually including any transaction in any block -- you're just estimating the amount of gas required per tx |
Tried it on my side – my node was stuck 👍🏻 |
For private node, should not be an issue, for public node, one should limit batch size and apply rate limit in the reverse proxy server. |
closing now, public json-rpc service is protect with rate-limiting. |
TL;DR
Send multiple batch requests that contains thousands of eth_estimateGas calls to RPC server. RPC server will be desynced.
Impact
RPC server will be desynced (not catching up with latest block height). In a load balanced server, users will see inconsistent block height.
Details
As far as I know, currently there is no configuration parameter to limit maximum calls per batch request. The only limit is request size. So, we can send a batch request that contains a lot of calls, such as eth_estimateGas, to RPC server (as long as total request size is below limit). RPC server will happily process all calls.
Currently, request size is limited to ~5MB. With that limit, I can craft a batch of ~8000 calls (PoC included). Each call is an eth_estimateGas of simple contract creation with high gas usage.
Steps to Reproduce
Resulting bytecode:
Screenshots
Gateway timed out
Block height is lagging (checks every 5s)
Suggestions
Add configuration parameter to:
The text was updated successfully, but these errors were encountered: