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 #12957

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

feat: EIP-7742 #12957

wants to merge 14 commits into from

Conversation

klkvr
Copy link
Collaborator

@klkvr klkvr commented Nov 28, 2024

Implements EIP-7742

Changes include:

  • forkchoiceUpdatedV4 endpoint and validation for V4-specific fields
  • target/max blobs per block fields are added and respected when building Ethereum payloads
  • consensus validation of block header having targetBlobsPerBlock field and correctly calculated excess blob gas
  • feeHistory keeps track of target blob count, and accounts for it when computing blob fee for pending block

@klkvr klkvr force-pushed the klkvr/eip7742 branch 2 times, most recently from f08d4cc to 09fbac0 Compare November 28, 2024 13:14
@klkvr klkvr mentioned this pull request Nov 28, 2024
@onbjerg onbjerg linked an issue Nov 29, 2024 that may be closed by this pull request
Base automatically changed from klkvr/bump-alloy to main December 2, 2024 01:18
@klkvr klkvr marked this pull request as ready for review December 6, 2024 21:02
@klkvr klkvr requested a review from joshieDo as a code owner December 6, 2024 23:26
@mattsse mattsse added the E-prague Related to the prague network upgrade label Dec 9, 2024
Copy link
Collaborator

@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.

all of this looks correct to me

one q about U256 argument

ptal @onbjerg

Comment on lines +336 to +346
let expected_excess_blob_gas = if chain_spec.is_prague_active_at_timestamp(parent.timestamp()) {
let parent_target_blobs_per_block =
parent.target_blobs_per_block().ok_or(ConsensusError::TargetBlobsPerBlockMissing)?;
eip7742::calc_excess_blob_gas(
parent_excess_blob_gas,
parent_blob_gas_used,
parent_target_blobs_per_block,
)
} else {
eip4844::calc_excess_blob_gas(parent_excess_blob_gas, parent_blob_gas_used)
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

this looks correct

crates/rpc/rpc-api/src/engine.rs Outdated Show resolved Hide resolved
Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

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

this looks correct. unfortunately need to hold off on merging again because of last minute change/possible retraction of most of this eip -.-

@onbjerg onbjerg added the S-blocked This cannot more forward until something else changes label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-prague Related to the prague network upgrade S-blocked This cannot more forward until something else changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate EIP-7742 into payload building
3 participants