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

fix: estimate gas #7133

Merged
merged 4 commits into from
Mar 14, 2024
Merged

fix: estimate gas #7133

merged 4 commits into from
Mar 14, 2024

Conversation

greged93
Copy link
Contributor

Updates the estimate gas logic:

  • Early break if the binary search range has been reduced to 1.5% of the highest gas limit.
  • Pre binary search gas estimation using gas_used + gas_refunded.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this is great! tysm

I could follow along here, only have doc/style nits and noticed an optimization when do that is not done on main

crates/rpc/rpc/src/eth/api/call.rs Outdated Show resolved Hide resolved
crates/rpc/rpc/src/eth/api/call.rs Outdated Show resolved Hide resolved
crates/rpc/rpc/src/eth/api/call.rs Outdated Show resolved Hide resolved
crates/rpc/rpc/src/eth/api/call.rs Outdated Show resolved Hide resolved
crates/rpc/rpc/src/eth/api/call.rs Show resolved Hide resolved
crates/rpc/rpc/src/eth/api/call.rs Outdated Show resolved Hide resolved
@mattsse mattsse added C-bug An unexpected or incorrect behavior A-rpc Related to the RPC implementation labels Mar 13, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

ty!

@mattsse mattsse enabled auto-merge March 14, 2024 12:14
@mattsse mattsse added this pull request to the merge queue Mar 14, 2024
Merged via the queue into paradigmxyz:main with commit b032120 Mar 14, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants