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

Remove latest_execution_payload_header from the beacon state #3612

Open
potuz opened this issue Feb 29, 2024 · 3 comments
Open

Remove latest_execution_payload_header from the beacon state #3612

potuz opened this issue Feb 29, 2024 · 3 comments
Labels
general:enhancement New feature or request

Comments

@potuz
Copy link
Contributor

potuz commented Feb 29, 2024

The Beacon State tracks the latest execution payload header in full, but the only thing that this is used for is to check that the parent hash is the right one. We should only track the latest block hash instead.

Every change in the execution header forces clients to keep these changes on the beacon state and track new structures. There have been numerous marshalling bugs because of endinannes, large number libraries need to be imported and maintained up to date on the CL without any need since these structures should be opaque as they are not used on the CL.

@hwwhww hwwhww added the general:enhancement New feature or request label Mar 14, 2024
@Nichebiche
Copy link

Nichebiche

@etan-status
Copy link
Contributor

In general, agree that it's not needed in the beacon state. However, the issue mentioned about tracking structures etc are still prevalent even after that, as the ExecutionPayload is also in the beacon block body.

If also targeting the beacon block body, this could be combined with transitioning the EL block header to SSZ. That also solves the repetitive effort associated with EL block header extensions that have spawned entire EL-only frameworks such as EIP-7685, and aligns the EL and CL block structures, removing the cited class of bugs such as endianness etc – CL and EL would both talk the same language then, and also unlock memory sharing across CL / EL components.

One aspect to keep in mind as well is that for optimistic sync it is required that the CL can self-validate the EL block hash. That leaves only two solutions:

  1. The CL knows how to merkleize the EL block header and transaction data. In this case, CL / EL forks need to be synced up whenever new fields are introduced (but EL can unilaterally introduce new combinations through EIP-7495 Profile).
  2. We put a commitment to the serialized block data into the EL, essentially doubling the number of hashes (one time we hash the serialized opaque data to a root, and one time we use the regular hash tree root). The overall block root is then the htr of the two roots, verifiable by both CL and EL and leaving the security properties of optimistic sync intact.

@Nichebiche
Copy link

The Beacon State tracks the latest execution payload header in full, but the only thing that this is used for is to check that the parent hash is the right one. We should only track the latest block hash instead.

Every change in the execution header forces clients to keep these changes on the beacon state and track new structures. There have been numerous marshalling bugs because of endinannes, large number libraries need to be imported and maintained up to date on the CL without any need since these structures should be opaque as they are not used on the CL.

Probable for positive outcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants