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

Expose local_gas_limit to inspector #1688

Open
bernard-wagner opened this issue Aug 8, 2024 · 1 comment
Open

Expose local_gas_limit to inspector #1688

bernard-wagner opened this issue Aug 8, 2024 · 1 comment

Comments

@bernard-wagner
Copy link

bernard-wagner commented Aug 8, 2024

It would be useful within the inspector hooks to know whether the gas_limit for a call was calculated or specified. Simply including gas_limit does not make this possible.

I recently encountered an issue when debugging a transaction that underspecified the gas limit for a nested call. Using foundry it was not possible to see this hardcoded gas limit in the traces.

By adding a flag or the original value to the CallInputs, it would be possible to optionally include the gas_limit in revm-inspectors traces. Always including the gas limit pollutes the traces with too much gas information.

For example:

[2348]  Counter::number{gas: 10000}()
└─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000000
@DaniPopes
Copy link
Collaborator

this should probably be in revm-inspectors, maybe set gas limit to None if >= gas*63/64, otherwise Some to display it. Not really worth tracking in revm because there is no distinction between "user specified" or not, as gas limit is a required argument to CALL

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