diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/BeaconBlockBody.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/BeaconBlockBody.java index 2240f7549e7..369bafe934e 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/BeaconBlockBody.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/BeaconBlockBody.java @@ -33,6 +33,7 @@ import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadSummary; +import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequests; import tech.pegasys.teku.spec.datastructures.operations.Attestation; import tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing; import tech.pegasys.teku.spec.datastructures.operations.Deposit; @@ -87,6 +88,10 @@ default Optional> getOptionalBlobKzgCommitments() { return Optional.empty(); } + default Optional getOptionalExecutionRequests() { + return Optional.empty(); + } + default boolean isBlinded() { return false; } diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/common/BlockBodyFields.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/common/BlockBodyFields.java index 9cccaf129bb..95608eabd54 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/common/BlockBodyFields.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/common/BlockBodyFields.java @@ -30,7 +30,6 @@ public enum BlockBodyFields implements SszFieldName { EXECUTION_PAYLOAD_HEADER, BLS_TO_EXECUTION_CHANGES, BLOB_KZG_COMMITMENTS, - CONSOLIDATIONS, EXECUTION_REQUESTS; private final String sszFieldName; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BeaconBlockBodySchemaElectraImpl.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BeaconBlockBodySchemaElectraImpl.java index 0fb52b91539..e769e2a1884 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BeaconBlockBodySchemaElectraImpl.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BeaconBlockBodySchemaElectraImpl.java @@ -223,6 +223,12 @@ public ExecutionPayloadSchema getExecutionPayloadSchema() { getChildSchema(getFieldIndex(BlockBodyFields.BLOB_KZG_COMMITMENTS)); } + @Override + public ExecutionRequestsSchema getExecutionRequestsSchema() { + return (ExecutionRequestsSchema) + getChildSchema(getFieldIndex(BlockBodyFields.EXECUTION_REQUESTS)); + } + @Override public long getBlobKzgCommitmentsGeneralizedIndex() { return getChildGeneralizedIndex(getFieldIndex(BlockBodyFields.BLOB_KZG_COMMITMENTS)); @@ -234,9 +240,4 @@ public LongList getBlindedNodeGeneralizedIndices() { getChildGeneralizedIndex(getFieldIndex(BlockBodyFields.EXECUTION_PAYLOAD)), getExecutionPayloadSchema().getBlindedNodeGeneralizedIndices()); } - - @Override - public ExecutionRequestsSchema getExecutionRequestsSchema() { - return (ExecutionRequestsSchema) getFieldSchema12(); - } } diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodyElectra.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodyElectra.java index e4118f7a27e..c97c7916b36 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodyElectra.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodyElectra.java @@ -16,6 +16,7 @@ import java.util.Optional; import tech.pegasys.teku.spec.datastructures.blocks.blockbody.BeaconBlockBody; import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.deneb.BlindedBeaconBlockBodyDeneb; +import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequests; public interface BlindedBeaconBlockBodyElectra extends BlindedBeaconBlockBodyDeneb { static BlindedBeaconBlockBodyElectra required(final BeaconBlockBody body) { @@ -27,6 +28,13 @@ static BlindedBeaconBlockBodyElectra required(final BeaconBlockBody body) { + body.getClass().getSimpleName())); } + ExecutionRequests getExecutionRequests(); + + @Override + default Optional getOptionalExecutionRequests() { + return Optional.of(getExecutionRequests()); + } + @Override default Optional toBlindedVersionElectra() { return Optional.of(this); diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodyElectraImpl.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodyElectraImpl.java index 36d58dc096e..55348da1584 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodyElectraImpl.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodyElectraImpl.java @@ -173,6 +173,11 @@ public SszList getBlobKzgCommitments() { return getField11(); } + @Override + public ExecutionRequests getExecutionRequests() { + return getField12(); + } + @Override public BlindedBeaconBlockBodySchemaElectraImpl getSchema() { return (BlindedBeaconBlockBodySchemaElectraImpl) super.getSchema();