`unlimitedContractSize` option is not applied to calls to `eth_estimateGas`
See original GitHub issueReporduction:
Clone https://github.com/anishnaik/ganache-bug and checkout the bug
branch.
The testing script is called deploy.js
.
Ganache@7.3.2 Terminal 1
npm uninstall -g ganache-cli (if applicable)
npm install -g ganache
ganache -d -l 100000000000 --chain.allowUnlimitedContractSize --miner.callGasLimit 0x1fffffffffffff
Terminal 2
npm install
npx hardhat test deploy.js
This should fail with the following error:
Deploy contracts for Echidna
1) Deploy
0 passing (110ms)
1 failing
1) Deploy contracts for Echidna
Deploy:
ProviderError: VM Exception while processing transaction: out of gas
at HttpProvider.request (node_modules/hardhat/src/internal/core/providers/http.ts:78:19)
at GanacheGasMultiplierProvider._getMultipliedGasEstimation (node_modules/hardhat/src/internal/core/providers/gas-providers.ts:72:59)
at GanacheGasMultiplierProvider.request (node_modules/hardhat/src/internal/core/providers/gas-providers.ts:309:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
You can try to set a gasLimit
for the deploy()
call and if it is large enough, the test will pass.
ganache-cli@6.12.2 Terminal 1
npm uninstall -g ganache
npm install -g ganache-cli
ganache-cli -d --gasLimit 100000000000 --allowUnlimitedContractSize
Terminal 2
npx hardhat test deploy.js
This test should pass
This could also be a dependency issue in the hardhat environment?
Environment MacBook Pro w/ Apple M1 Max Hardhat v2.9.9 Ganache@7.3.2 ganache-cli@6.12.2
_Originally posted by @anishnaik in https://github.com/trufflesuite/ganache/issues/1645#issuecomment-1171642018_
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
transaction may fail or may require manual gas limit - Contracts
This script is working fine and giving me the contract address after I run ... There is an option like allowUnlimitedContractSize: true, ...
Read more >Ganache CLI options - Truffle Suite
Ganache command line options¶. This reference describes the syntax of the Ganache command line interface (CLI) options for the Ethereum network.
Read more >Reference | Ethereum development environment for ... - Hardhat
This parameter behaves like gas . Default value: "auto" . Note that when using ethers this value will not be applied.
Read more >ganache-cli - npm
"allowUnlimitedContractSize" : boolean - Allows unlimited contract sizes while debugging (NOTE: this setting is often used in conjuction ...
Read more >ganache-cli - Fig.io
Options ; -m, --mnemonic, Use a bip39 mnemonic phrase for generating a PRNG seed, which is in turn used for hierarchical deterministic (HD)...
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
@anishnaik I’ve found the issue.
callGasLimit
is working ineth_estimateGas
, butallowUnlimitedContractSize
is not.estimateGas
makes a copy of the VM before running the transaction in order to estimate it. TheallowUnlimitedContractSize
property is not copied, as you can see here:There is currently no work around but I hope to get a fix in for this very soon.
There is no timeline; we are working now to improve stability.