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: Eth JSON-RPC api: handle messages with gasFeeCap less than baseFee #10614

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

ychiaoli18
Copy link
Contributor

@ychiaoli18 ychiaoli18 commented Apr 3, 2023

Related Issues

#10604

Proposed Changes

Use 0 as reward if gasFeeCap is less than baseFee

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@ychiaoli18 ychiaoli18 requested a review from a team as a code owner April 3, 2023 21:54
Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

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

I'd push the filtering logic into the calculate* function so we still return the correct gas utilisation ratio, and only disregard the negative data point for reward percentile calculation.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Can we update the comment to note that this value is clamped at 0 as well?

@Stebalien
Copy link
Member

Also note, we don't use this method anywhere except the Eth API.

@maciejwitowski
Copy link
Contributor

@ychiaoli18 @Stebalien Can we merge this PR?

@raulk
Copy link
Member

raulk commented Apr 24, 2023

This has been running successfully on Glif's nodes for a few weeks now.

@raulk raulk merged commit 9ae4802 into master Apr 24, 2023
@raulk raulk deleted the fix/fee-history-neg-reward branch April 24, 2023 15: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.

None yet

4 participants