Understanding gas limitations is crucial for developers interacting with Ethereum and EVM-compatible blockchains. This article explores the gas constraints of the eth_call
and eth_estimateGas
methods.
In brief
The gas parameter of eth_call and eth_estimateGas is limited to 500000000 Gwei for EVM elastic nodes.
The gas parameter limitation on EVM dedicated nodes can be customized on request.
Details
The following two functions are executed locally on an EVM node and require no actual gas:
- eth_call — used to execute a transaction call locally without broadcasting it to the network. It is commonly used for reading data from smart contracts. Although it does not consume gas, it has a gas limit that, if exceeded, can cause the call to fail.
- eth_estimateGas — used to estimate the gas required for a transaction. This estimation helps in setting an appropriate gas limit for transactions to avoid out-of-gas errors.
The purpose of eth_call and eth_estimateGas is to allow for the pre-production contract testing of real applications, various blockchain analytics, and so on.
Because these two functions are executed locally on a node, create no transaction on the blockchain, and require no gas, they are easy targets to create a denial of EVM node service at the RPC level.
To prevent the attack on a node through an RPC endpoint, the EVM nodes at Chainstack are deployed with the default rpc.gascap option set to 500000000 (or 0.5 of base currency—e.g. ether).
If you have a dedicated node, you can customize or remove the gas limitation by contacting us.
Comments
0 comments
Article is closed for comments.