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

eth/gasestimator, internal/ethapi: move gas estimator out of rpc #28600

Merged
merged 1 commit into from Nov 27, 2023

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Nov 24, 2023

The gas estimator when added was a very simple piece of code, so we just dumped it into the RPC APIs. Since then, we've made various tweaks to it, and it feels wrong to have logic code sit inside the RPC which should just convert data and call internal stuff.

This PR moves the gas estimator into it's own package. Code that is unrelated to gas estimation and just prepares the data (e.g. RPC overrides) are still kept in their original location. This should be fine because the gas estimator interface was also simplified a lot to allow running it without a live chain and similar crazy constructs.

Fixes #28570

@karalabe karalabe added this to the 1.13.6 milestone Nov 24, 2023
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 merged commit 1e28e0b into ethereum:master Nov 27, 2023
1 of 2 checks passed
@amirkhan7javi
Copy link

It should be checked

Dergarcon pushed a commit to specialmechanisms/mev-geth-0x2mev that referenced this pull request Jan 31, 2024
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.

rpc: move gas estimator into core, dedup in simulated backend
3 participants