Skip to content

add EIP-4788 feature#3319

Merged
djrtwo merged 1 commit intoethereum:devfrom
ralexstokes:feat/eip-4788
Apr 20, 2023
Merged

add EIP-4788 feature#3319
djrtwo merged 1 commit intoethereum:devfrom
ralexstokes:feat/eip-4788

Conversation

@ralexstokes
Copy link
Member

@ralexstokes ralexstokes commented Apr 11, 2023

Beacon block root in the EVM

also relevant: ethereum/EIPs#6859

block_hash: Hash32 # Hash of execution block
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
parent_beacon_block_root: Root # [New in EIP-4788]
Copy link
Contributor

Choose a reason for hiding this comment

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

I am curious if we can avoid extension of ExecutionPayload with parent_beacon_block_root on CL side and simply put its value into ExecutionPayloadV3 structure in the Engine API directly from a beacon block?

Copy link
Contributor

Choose a reason for hiding this comment

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

This would imply a synchronous CL<>EL processing which given the way EL sync works, we have to assume some modes EL is syncing on it's own with head-info from CL

Copy link
Contributor

Choose a reason for hiding this comment

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

This field should be a part of EL header, what we can try to do is to avoid this information to be duplicated on CL side, i.e. CL can read it from beacon_block.parent_root and pass to EL in Engine API calls

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

Looks good!

nice and simple. testing should be simple as well

block_hash: Hash32 # Hash of execution block
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
parent_beacon_block_root: Root # [New in EIP-4788]
Copy link
Contributor

Choose a reason for hiding this comment

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

This would imply a synchronous CL<>EL processing which given the way EL sync works, we have to assume some modes EL is syncing on it's own with head-info from CL

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

will add tests in a separate pr

@djrtwo djrtwo merged commit 3c8114c into ethereum:dev Apr 20, 2023
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.

4 participants