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

Extend estimateGas to take block overrides #472

Open
lightclient opened this issue Sep 21, 2023 · 2 comments
Open

Extend estimateGas to take block overrides #472

lightclient opened this issue Sep 21, 2023 · 2 comments

Comments

@lightclient
Copy link
Member

It isn't clear from the spec whether estimateGas should run in the context of the block hash/num provided, or if it should treat it as its parent. By accepting block overrides, we can remove the ambiguity and allow callers to choose exactly what the environment their call executes in.

@lightclient
Copy link
Member Author

alternative idea, maybe in addition: support a "next" block tag for calls which execute calls

@nlordell
Copy link

nlordell commented Nov 13, 2023

“next” is a cool idea, especially if (at least from what I’ve heard) “pending” may be retired soon.

It would also be useful for other methods such as eth_call et al. as a way to simulate something as “what if this transaction were executed as the first transaction in the upcoming block” (which is semantically distinct from “latest”).

A use-case that came up regarding ☝️ was in the context of linear vesting where I wanted to query how much vesting was available in the upcoming block (which is the earliest block in which a transaction would execute) instead of how much is available on the “latest” block. With some execution nodes, this worked with “pending” (but not all - notably not Nethermind).

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