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

accounts/abi/bind/backend: use requested header for gas prices and gas limits #28280

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Oct 8, 2023

The simulated backend had two quirks that PR addresses:

  • When doing a Call, we could specify the header to use as the call context. However, when the gas price was auto calculated for 1559, the target header was the chain HEAD, not the header we used as context. I don't expect people to specify gas prices for calls, but if they do, this is more accurate that the old code.
  • If no gas limit is given for a Call (e.g. the abigen generated stuff does not -and cannot - specify a gas limit), the simulated backend defaults to a 50M gas cap. The PR suggests making this dynamic at 10X the block gas limit for the header being ran at. This is consistent with what Infura for example runs their APIs with and would allow going a bit above the 50M cap. I'd also suggest raising the default cap in Geth, but that's a different story and PR.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@karalabe karalabe added this to the 1.13.3 milestone Oct 10, 2023
@karalabe karalabe merged commit 2c007cf into ethereum:master Oct 10, 2023
1 of 2 checks passed
tyler-smith pushed a commit to blocknative/go-ethereum that referenced this pull request Oct 12, 2023
tyler-smith pushed a commit to blocknative/go-ethereum that referenced this pull request Oct 16, 2023
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants