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

Add estimate optmisation that geth added #1776

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

BedrockSquirrel
Copy link
Collaborator

Why this change is needed

Our gas estimation method is lifted (copy-paste) from geth code. They added an optimisation to their binary search that means in average case it goes way quicker (e.g. 4 iterations instead of 37 in my testing).

https://github.com/ethereum/go-ethereum/blob/16ce7bf50fa71c907d1dc6504ed32a9161e71351/eth/gasestimator/gasestimator.go#L162 <-- is the code on their codebase.

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Copy link
Collaborator

@tudor-malene tudor-malene left a comment

Choose a reason for hiding this comment

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

lgtm
(I think..)

@BedrockSquirrel BedrockSquirrel merged commit 9ae2825 into main Feb 6, 2024
2 checks passed
@BedrockSquirrel BedrockSquirrel deleted the matt/estimation-optimization branch February 6, 2024 14:51
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

Successfully merging this pull request may close these issues.

2 participants