matter-labs / foundry-zksync

Fork of Foundry tailored for zkSync environment
Apache License 2.0
299 stars 130 forks source link

Evaluate capping the zkEVM gas limit to something different than 2^31-1 #645

Open Jrigada opened 2 weeks ago

Jrigada commented 2 weeks ago

https://github.com/matter-labs/foundry-zksync/blob/cc27c50a8932f9e97c8d2e3eff1d2e1f008a72b3/crates/zksync/core/src/utils.rs#L120,

For zkEVm transactions we set a super high gas limit but the zkEVM caps it anyways to "MAX_GAS_PER_TRANSACTION": 80000000, charging the original gas limit and then refunding at the end. Maybe just maxing it at 80_000_000 is tidier.