`--miner.callGasLimit` implementation is wrong
See original GitHub issueThe purpose of the miner.callGasLimit
option is to set a cap on gas that is used in an eth_call
/eth_estimateGas
RPC call (as in geth’s --rpc.gascap
option). The purpose of this option is to prevent a DOS attack wherein a contract is uploaded with an infinite loop and eth_call
is used on that contract, causing miners to work very very hard.
Currently, it’s used as a default gas limit for a transaction that is calling eth_call
/eth_estimateGas
.
Fix it!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Understand the potential issue of miner controlled gaslimit
However, my question is that, what could go wrong, if a malicious miner intentionally control the "block.gaslimit" property used by Solidity ...
Read more >Ganache CLI options - Truffle Suite
When false , only one request is processed at a time. The default is true . ... The block time (in seconds) for...
Read more >Ganache Fork Avalanche - HackMD
[string] [default: 0x1] --miner.callGasLimit Sets the transaction gas limit in WEI for eth_call and eth_estimateGas calls.
Read more >ganache - npm
[string] [default: 0x1] --miner.callGasLimit Sets the transaction gas limit in WEI for eth_call and eth_estimateGas calls.
Read more >github.com-trufflesuite-ganache_-_2022-01-23_22-09-54
--miner.callGasLimit Sets the transaction gas limit in WEI for ethcall and ethestimateGas calls. [string] [default: 0x1fffffffffffff] ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the additional information, we’ll look into it! I’ve opened https://github.com/trufflesuite/ganache/pull/3322 to correct the documentation issue.
Is there an update on this? I believe this is causing differential behavior b/w the latest release of ganache and the deprecated
ganache-cli@6.12.2
eth_estimateGas
is throwing an out-of-gas error when extremely large contracts are being deployed with the latest release (v7.3.2). This does not occur with the old ganache-cli. My working assumption is that it is becauseminer.callGasLimit
is not being correctly used.To reproduce, you can try to deploy
ComptrollerHarness
using hardhat (instead of saddle) + ganache.This is the
ganache-cli
command:ganache-cli --deterministic --gasLimit 10000000000000000 --allowUnlimitedContractSize
This is the ganache command:
ganache --deterministic --gasLimit 10000000000000000 --chain.allowUnlimitedContractSize
The ganache command returns the following error in hardhat:
The current working solution is to specify a
gasLimit
directly to the call forawait ComptrollerHarness.deploy({gasLimit: some_limit})
; however, this seems to hint at a larger problem.