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: use feeHistory when estimating blob fee #1764

Merged
merged 1 commit into from
Dec 7, 2024
Merged

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Dec 6, 2024

With EIP-7691, we can no longer rely on BlockHeader::next_block_blob_fee as it will start producing invalid values once the update fraction changes.

This PR changes blob fee filler to use feeHistory instead to obtain those values from RPC.

I think we should also consider either deprecating BlockHeader::next_block_excess_blob_gas/BlockHeader::next_block_blob_fee methods or making them accept an update fraction parameter

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

.map(Into::into)
.ok_or(RpcError::UnsupportedFeature("eip4844"))
.base_fee_per_blob_gas
.last()
Copy link
Member

Choose a reason for hiding this comment

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

makes sense, the last entry should be the estimated next one

@mattsse mattsse merged commit bd6ee01 into main Dec 7, 2024
26 checks passed
@mattsse mattsse deleted the klkvr/fee-history-blob branch December 7, 2024 05:20
@mattsse
Copy link
Member

mattsse commented Dec 7, 2024

BlockHeader::next_block_excess_blob_gas/BlockHeader::next_block_blob_fee methods or making them accept an update fraction parameter

yeah let's mark them as deprecated and introduce one with the update fraction

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