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_feeHistory gasUsedRatio #313

Merged
merged 2 commits into from
May 2, 2024
Merged

Fix eth_feeHistory gasUsedRatio #313

merged 2 commits into from
May 2, 2024

Commits on May 2, 2024

  1. Fix eth_feeHistory gasUsedRatio

    The intent for eth_feeHistory for Arbitrum is to return the ratio of gas
    used per second / the target gas per second. The logic for calculating
    this gets the receipts for each tx in a block and gets the cumulative
    gas used, but it was using the wrong hash to look up the receipts (it
    should be the block hash and not the receipts hash).
    
    Note: the current implementation returns 1.0 for gasUsedRatio for the
    blocks at the beginning of the window specified by eth_feeHistory's
    blockCount and newestBlock if the prior block has the same timestamp as
    the first block in the window (ie time has not ticked over).
    Tristan-Wilson committed May 2, 2024
    Configuration menu
    Copy the full SHA
    ec50381 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    291b34f View commit details
    Browse the repository at this point in the history