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

Understanding gas calculations: How is paymasterVerificationGasLimit estimated? #272

Closed
matthiasgeihs opened this issue Jul 26, 2024 · 1 comment

Comments

@matthiasgeihs
Copy link

Hey, I'm trying to understand how gas estimations work. In particular, looking at paymasterVerificationGasLimit.

What I do understand: EntryPointSimulations.sol is used to simulate operations and thereby measure gas.

What I don't understand: The return type struct ExecutionResult of simulateHandleOP does not include paymasterVerificationGasLimit, however, the EntryPointV07SimulationsAbi does have this field in the return value of this function (see here).

How is that possible? And how is that value calculated on the contract side?

@mouseless0x
Copy link
Member

Hey, I believe those contracts were out of date at the time, the contracts dir has since been deleted from Alto and moved to a seperate repo (entrypoint-estimations). The ExecutionResult struct does contain paymasterVerificationGasLimit, and this field is populated during simulation by calling the EntryPoint's _validatePrepayment method.

Let me know if you have any further questions:)

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