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

feat: EIP-7742 #1600

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: EIP-7742 #1600

wants to merge 5 commits into from

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Oct 31, 2024

Motivation

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7742.md
ethereum/execution-apis#574
ethereum/EIPs#8994

  • Added new mod to alloy-eips with utilities for blob fee calculation.
  • Block::next_block_blob_fee is updated to accept optional next_block_target_blob_count parameter. If provided, we are using EIP-7742 to calculate the blob fee
  • Extended PayloadAttributes with target_blobs_per_block and max_blobs_per_block.

Some PRs are not merged and field names are different per different specs for now, but besides that this should be complete

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

cool, the integration in reth will be slightly more tricky because we now ran out of bits

https://github.com/paradigmxyz/reth/blob/eaac2aa2cfb6ea5a61eea2d9a36a8b66b7854ce4/crates/storage/codecs/src/alloy/header.rs#L58-L58

/// Similar to [crate::eip4844::calc_excess_blob_gas], but derives the target blob gas from
/// `parent_target_blob_count`.
#[inline]
pub const fn calc_excess_blob_gas(
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit concerned that this will be easy to misuse if the functions have the same name, but since this takes an additional param this is okay imo

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