onflow / flow-go

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.
GNU Affero General Public License v3.0
532 stars 175 forks source link

[Flow EVM] move the gas estimate adjustments to Gateway instead of dryrun #6301

Open ramtinms opened 1 month ago

ramtinms commented 1 month ago

Ideally dry run should report the actual amount of gas used and adjustments be made off-chain given adjustments logic will change from time to time and updating Gateway is easier

m-Peter commented 1 month ago

The adjustment logic that we currently do is here: https://github.com/onflow/flow-go/blob/master/fvm/evm/emulator/emulator.go#L291-L308. The EIP-150 is something that is relevant only for contract deployments: