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

Introduce execution payload builder #6518

Merged
merged 3 commits into from
Nov 29, 2022
Merged

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Nov 28, 2022

PR Description

Introduces a builder for execution payload in the same vein as for BeaconBlockBody and removes the milestone specific create methods from schemas.

Also removes toVersionX() methods from ExecutionPayloadSchema as their behaviour didn't match those of ExecutionPayload.toVersionX methods (ExecutionPayloadSchema.toVersionCapella would fail for EIP4844 but ExecutionPayload.toVersionCapella would succeed for EIP4844). They are no longer used except in fuzzing which specifically needs the bellatrix schema.

Avoids the need to branch by milestone everywhere we create an ExecutionPayload.

Part of #6418

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Removes toVersionX() methods from ExecutionPayloadSchema as their behaviour didn't match those of ExecutionPayload.toVersionX methods (ExecutionPayloadSchema.toVersionCapella would fail for EIP4844 but ExecutionPayload.toVersionCapella would succeed for EIP4844).

Avoids the need to branch by milestone everywhere we create an ExecutionPayload.
# Conflicts:
#	data/serializer/src/main/java/tech/pegasys/teku/api/schema/eip4844/BeaconBlockBodyEip4844.java
#	data/serializer/src/main/java/tech/pegasys/teku/api/schema/eip4844/ExecutionPayloadEip4844.java
#	ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/versions/eip4844/ExecutionPayloadSchemaEip4844.java
#	ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/generator/BlockProposalTestUtil.java
#	ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java
Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM

@ajsutton ajsutton merged commit 2d60d6a into Consensys:master Nov 29, 2022
@ajsutton ajsutton deleted the payload-build branch November 29, 2022 09:02
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