Skip to content

feat: suggest gas price based on latest block's transactions #220

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

Merged
merged 9 commits into from
Jul 31, 2025

Conversation

yiweichi
Copy link
Member

@yiweichi yiweichi commented Jul 27, 2025

Corresponding Reth PR: scroll-tech/reth#291

This PR focus on implementing a simplified version of the GPO without needing to look at the tx pool, however look at the status of latest block. Suggest gas price base on if the latest block is at capacity. this will help to:

reduce node configuration complexity by removing congestion threshold parameter
reduce RPC node overhead by removing expensive query of tx pool size
enable private mempool while any RPC node is still able to provide reasonable gas price estimate

Two JSON_RPC methods are effected.

  1. eth_gasPrice, if the latest block is not at capacity, this will return a minimal suggest gas price.
  2. eth_feeHistory, if the latest block is not at capacity, the reward field of return will be the minimal suggest gas price.

@yiweichi yiweichi requested review from frisitano, greged93 and jonastheis and removed request for frisitano July 27, 2025 17:39
Base automatically changed from feat-add-max-da-block-size to main July 28, 2025 14:29
greged93
greged93 previously approved these changes Jul 31, 2025
Copy link
Collaborator

@greged93 greged93 left a comment

Choose a reason for hiding this comment

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

One typo, otherwise lgtm!

Copy link
Collaborator

@greged93 greged93 left a comment

Choose a reason for hiding this comment

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

lgtm!

@yiweichi yiweichi merged commit ee349a7 into main Jul 31, 2025
13 checks passed
@yiweichi yiweichi deleted the feat-simplify-gas-price-oracle branch July 31, 2025 08:03
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.

3 participants