Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVM instruction gas metrics + intrinsic gas table #1017

Open
winsvega opened this issue Dec 12, 2024 · 3 comments
Open

EVM instruction gas metrics + intrinsic gas table #1017

winsvega opened this issue Dec 12, 2024 · 3 comments

Comments

@winsvega
Copy link
Contributor

We need to define this tables for each fork like in evmone if not defined in eels already
https://github.com/ethereum/evmc/blob/a0090c7d20f92b04b57e2ee1602fda4dedd97dd5/lib/instructions/instruction_metrics.c

so we can calculate the gas usage of series of opcodes.
and intrinsic gas like cost of access list, warm touch, cold touch, storage touch, storage reset from x to y.

all this has gas costs that would be good to have defined so that in test we can define how much gas expected to be spent exactly and where it comes from.

@marioevz
Copy link
Member

Check gas_costs functions that are returned by each fork in https://github.com/ethereum/execution-spec-tests/blob/main/src/ethereum_test_forks/forks/forks.py, to see if this is what you had in mind.

@winsvega
Copy link
Contributor Author

Oh, I missed that. Let me check.

@winsvega
Copy link
Contributor Author

I see. it is not implemented. the only gas costs are for Frontier and only for a limited set of operations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants