diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BeaconBlockBodyElectra.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BeaconBlockBodyElectra.java index 18c78d7a68c..f8dcdd2772c 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BeaconBlockBodyElectra.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BeaconBlockBodyElectra.java @@ -79,13 +79,13 @@ public BeaconBlockBodyElectra( deposits, voluntaryExits, syncAggregate); - checkNotNull(executionPayload, "Execution Payload is required for Electra blocks"); + checkNotNull(executionPayload, "ExecutionPayload is required for Electra blocks"); this.executionPayload = executionPayload; checkNotNull(blsToExecutionChanges, "BlsToExecutionChanges is required for Electra blocks"); this.blsToExecutionChanges = blsToExecutionChanges; - checkNotNull(blobKZGCommitments, "blobKZGCommitments is required for Electra blocks"); + checkNotNull(blobKZGCommitments, "BlobKZGCommitments is required for Electra blocks"); this.blobKZGCommitments = blobKZGCommitments; - checkNotNull(executionRequests, "Execution Requests is required for Electra blocks"); + checkNotNull(executionRequests, "ExecutionRequests is required for Electra blocks"); this.executionRequests = executionRequests; } @@ -94,33 +94,22 @@ public BeaconBlockBodyElectra( .BeaconBlockBodyElectra message) { super(message); - checkNotNull(message.getExecutionPayload(), "Execution Payload is required for Electra blocks"); + checkNotNull(message.getExecutionPayload(), "ExecutionPayload is required for Electra blocks"); this.executionPayload = new ExecutionPayloadDeneb(message.getExecutionPayload()); checkNotNull( - message.getBlsToExecutionChanges(), - "BlsToExecutionChanges are required for Electra blocks"); + message.getBlsToExecutionChanges(), "BlsToExecutionChanges is required for Electra blocks"); this.blsToExecutionChanges = message.getBlsToExecutionChanges().stream().map(SignedBlsToExecutionChange::new).toList(); checkNotNull( - message.getBlobKzgCommitments(), "BlobKzgCommitments are required for Electra blocks"); + message.getBlobKzgCommitments(), "BlobKzgCommitments is required for Electra blocks"); this.blobKZGCommitments = message.getBlobKzgCommitments().stream() .map(SszKZGCommitment::getKZGCommitment) .map(KZGCommitment::new) .toList(); - - final List depositRequests = - message.getExecutionRequests().getDeposits().stream().map(DepositRequest::new).toList(); - final List withdrawalRequests = - message.getExecutionRequests().getWithdrawals().stream() - .map(WithdrawalRequest::new) - .toList(); - final List consolidationRequests = - message.getExecutionRequests().getConsolidations().stream() - .map(ConsolidationRequest::new) - .toList(); - this.executionRequests = - new ExecutionRequests(depositRequests, withdrawalRequests, consolidationRequests); + checkNotNull( + message.getExecutionRequests(), "ExecutionRequests is required for Electra blocks"); + this.executionRequests = new ExecutionRequests(message.getExecutionRequests()); } @Override diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BlindedBeaconBlockBodyElectra.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BlindedBeaconBlockBodyElectra.java index f97d0e48caa..2e61c080721 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BlindedBeaconBlockBodyElectra.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BlindedBeaconBlockBodyElectra.java @@ -84,15 +84,15 @@ public BlindedBeaconBlockBodyElectra( voluntaryExits, syncAggregate); checkNotNull( - executionPayloadHeader, "Execution Payload Header is required for Electra blinded blocks"); + executionPayloadHeader, "ExecutionPayloadHeader is required for Electra blinded blocks"); this.executionPayloadHeader = executionPayloadHeader; checkNotNull( - blsToExecutionChanges, "blsToExecutionChanges is required for Electra blinded blocks"); + blsToExecutionChanges, "BlsToExecutionChanges is required for Electra blinded blocks"); this.blsToExecutionChanges = blsToExecutionChanges; - checkNotNull(blobKZGCommitments, "blobKZGCommitments is required for Electra blinded blocks"); + checkNotNull(blobKZGCommitments, "BlobKZGCommitments is required for Electra blinded blocks"); this.blobKZGCommitments = blobKZGCommitments; checkNotNull( - executionRequestsRoot, "execution_requests_root is required for Electra blinded blocks"); + executionRequestsRoot, "ExecutionRequestsRoot is required for Electra blinded blocks"); this.executionRequestsRoot = executionRequestsRoot; } diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/helpers/BeaconStateAccessorsElectra.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/helpers/BeaconStateAccessorsElectra.java index 49bf6eca7ea..9aa6cc60272 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/helpers/BeaconStateAccessorsElectra.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/electra/helpers/BeaconStateAccessorsElectra.java @@ -70,7 +70,7 @@ public UInt64 getActiveBalance(final BeaconState state, final int validatorIndex * * @param state The state * @param validatorIndex The index of the validator - * @return The sum of the withdrawal amounts for the validator in the partial withdrawal queue + * @return The sum of the withdrawal amounts for the validator in the partial withdrawal queue. */ public UInt64 getPendingBalanceToWithdraw( final BeaconStateElectra state, final int validatorIndex) {