Closed dontonka closed 1 month ago
@dontonka this seems to be in line with how our foundry implementation works:
2 ^ 32 -1
. However, there's a system constant that caps the actual gas limit used to 80M
. The gas limit above that is paid for by the caller, but then refunded. The 78M that you see is that cap minus the overhead gas which is deducted before executing the transaction.block-gas-limit
will allways apply on the root evm transaction of the tests, it won't cascade down to Era VM txs due to the difference in environments (Although if the Era VM tx consumes more gas than the block gas limit, the evm will fail with out of gas). Modifying the system constant in any way is out of scope for now and maybe not desirable.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.0.2 (df011e0 2024-09-17T00:19:22.777559581Z)
What command(s) is the bug in?
forge test --block-gas-limit=30000000000 --chain-id=324 --zksync --zk-force-evmla
Operating System
Windows
Describe the bug
Hello, I'm doing some test with
--zksync
and get few failures due to theblock gas limit
being too small. Overriding--block-gas-limit
works properly on non-ZkSync Era EVM (so when not providing --zksync, but not otherwise).Be aware that forge still seems to at least ingest the parameter properly as forcing a wrong value will make it complain right away and not even execute the command, but somehow it doesn't seem to apply it during execution and seems to be always hardcoded to ~78M (at least in my environment).