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

Moving requests out of ExecutionPayload #8600

Merged
merged 25 commits into from
Sep 25, 2024

Conversation

lucassaldanha
Copy link
Member

@lucassaldanha lucassaldanha commented Sep 16, 2024

PR Description

  • Removes withdrawal_requests, deposit_requests and consolidation_requests from Execution Payload (execution payload is exactly like Deneb, removed all Electra classes for it);
  • Added execution_requests into Beacon Block Body (Electra)
  • Kept ExecutionPayloadV4 classes around as we will soon add some Electra-specific logic into them.
  • Updating reference tests to v1.5.0-alpha.6
  • Temporarily disabling slashing tests (will be re-enabled as part of Update Electra penalty computation. EIP7125 #8612)

Also added some TODOs that are going to be addressed on:

Reference spec PR: https://github.com/ethereum/consensus-specs/pull/3875/files

Fixed Issue(s)

fixes #8593

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.

@lucassaldanha lucassaldanha added the DO NOT MERGE Not ready to merge label Sep 16, 2024
@lucassaldanha lucassaldanha changed the title [DO NOT MERGE] Moving requests out of ExecutionPayload Moving requests out of ExecutionPayload Sep 19, 2024
@lucassaldanha lucassaldanha removed the DO NOT MERGE Not ready to merge label Sep 19, 2024
@lucassaldanha lucassaldanha marked this pull request as ready for review September 19, 2024 22:20

public class BeaconBlockBodyElectra extends BeaconBlockBodyAltair {

@JsonProperty("execution_payload")
public final ExecutionPayloadElectra executionPayload;
public final ExecutionPayloadDeneb executionPayload;
Copy link
Contributor

Choose a reason for hiding this comment

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

is it worth a comment here explaining that we use ExecutionPayloadDeneb because no changes have been introduced in Electra? It's is clear now but it might be confusing in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

its really common, i'd prefer no comment as its just noise.

@@ -88,7 +91,8 @@ class BlindedBeaconBlockBodyElectraImpl
syncAggregate,
executionPayloadHeader,
blsToExecutionChanges,
blobKzgCommitments);
blobKzgCommitments,
executionRequests);
Copy link
Contributor

Choose a reason for hiding this comment

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

is this missing its correspondent get method?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe, but I did the bare minimum on blinded block. This is likely going to be addressed on #8624

Comment on lines 166 to 167
spec.getBlockProcessor(state.getSlot())
.processConsolidationRequests(state, consolidationRequests);
.processConsolidationRequests(state, List.of(consolidationRequest));
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems like we've hard coded the configuration of needing 1 consolidation request half way through, this could be fun when we need to now handle 2 consolidations, i wonder why we bothered going half way with a list?
If we're hard coding 1 anyway, why do we bother taking a list into the spec function?

Copy link
Member Author

Choose a reason for hiding this comment

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

All EL request operation tests in the reference-tests have two parameters: a pre state and a single operation (ssz encoded) as input.

With the new ExecutionRequests container, the alternative would be to update the reference-tests to use that containers ssz as input (instead of a single EL request). This approach is similar to how some operation tests have the ExecutionPayload container ssz as an input. However the current reference-tests are still using the individual operations.

TLDR: reference-tests need to change first, before we can change anything here.

Copy link
Member Author

@lucassaldanha lucassaldanha Sep 24, 2024

Choose a reason for hiding this comment

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

If we're hard coding 1 anyway, why do we bother taking a list into the spec function?

On the spec, each block can have a list of each EL request type, so the spec function does require a list. It is only on the reference-tests that the input is a single operation.

Copy link
Member Author

@lucassaldanha lucassaldanha Sep 24, 2024

Choose a reason for hiding this comment

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

I'll follow up with the ref-tests to see if we need to change anything there.

Copy link
Contributor

Choose a reason for hiding this comment

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

the list does make sense it just seems weird to have a single up to a point hten a list, so it'd almost be a better idea to have the list all the way through imo so that when we decide 1 consolidation wasnt enough it's less crazy to fix
but either or, just looked weird.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, did the change it is better :)

@lucassaldanha lucassaldanha enabled auto-merge (squash) September 25, 2024 03:08
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

@lucassaldanha lucassaldanha merged commit ea74160 into Consensys:master Sep 25, 2024
17 checks passed
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.

Move requests out of execution_payload into beacon_block.body
3 participants