Skip to content

Commit

Permalink
Rename maximumBlobCount to maxBlobsPerBlock
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Dudley <[email protected]>
  • Loading branch information
siladu committed Dec 10, 2024
1 parent 8d69fc5 commit 2b8fc09
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private String createForkChoiceRequest(final String parentBlockHash, final Long
+ " \"withdrawals\": [],"
+ " \"parentBeaconBlockRoot\": \"0x0000000000000000000000000000000000000000000000000000000000000000\","
+ " \"targetBlobsPerBlock\": \"0x3\","
+ " \"maximumBlobCount\": \"0x6\""
+ " \"maxBlobsPerBlock\": \"0x6\""
+ " }";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ protected ValidationResult<RpcErrorType> validateParameter(
return ValidationResult.invalid(
getInvalidPayloadAttributesError(), "Missing target blobs per block");
}
if (maybePayloadAttributes.get().getMaximumBlobCount() == null) {
if (maybePayloadAttributes.get().getMaxBlobsPerBlock() == null) {
return ValidationResult.invalid(
getInvalidPayloadAttributesError(), "Missing maximum blob count");
getInvalidPayloadAttributesError(), "Missing max blobs per block");
}
}
return ValidationResult.valid();
Expand All @@ -100,8 +100,8 @@ protected Optional<JsonRpcErrorResponse> isPayloadAttributesValid(
LOG.error("targetBlobsPerBlock not present in payload attributes after prague hardfork");
return Optional.of(new JsonRpcErrorResponse(requestId, getInvalidPayloadAttributesError()));
}
if (payloadAttributes.getMaximumBlobCount() == null) {
LOG.error("maximumBlobCount not present in payload attributes after prague hardfork");
if (payloadAttributes.getMaxBlobsPerBlock() == null) {
LOG.error("maxBlobsPerBlock not present in payload attributes after prague hardfork");
return Optional.of(new JsonRpcErrorResponse(requestId, getInvalidPayloadAttributesError()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class EnginePayloadAttributesParameter {
final List<WithdrawalParameter> withdrawals;
private final Bytes32 parentBeaconBlockRoot;
private final UInt64 targetBlobsPerBlock;
private final UInt64 maximumBlobCount;
private final UInt64 maxBlobsPerBlock;

@JsonCreator
public EnginePayloadAttributesParameter(
Expand All @@ -43,7 +43,7 @@ public EnginePayloadAttributesParameter(
@JsonProperty("withdrawals") final List<WithdrawalParameter> withdrawals,
@JsonProperty("parentBeaconBlockRoot") final String parentBeaconBlockRoot,
@JsonProperty("targetBlobsPerBlock") final String targetBlobsPerBlock,
@JsonProperty("maximumBlobCount") final String maximumBlobCount) {
@JsonProperty("maxBlobsPerBlock") final String maxBlobsPerBlock) {
this.timestamp = Long.decode(timestamp);
this.prevRandao = Bytes32.fromHexString(prevRandao);
this.suggestedFeeRecipient = Address.fromHexString(suggestedFeeRecipient);
Expand All @@ -52,8 +52,8 @@ public EnginePayloadAttributesParameter(
parentBeaconBlockRoot == null ? null : Bytes32.fromHexString(parentBeaconBlockRoot);
this.targetBlobsPerBlock =
targetBlobsPerBlock == null ? null : UInt64.fromHexString(targetBlobsPerBlock);
this.maximumBlobCount =
maximumBlobCount == null ? null : UInt64.fromHexString(maximumBlobCount);
this.maxBlobsPerBlock =
maxBlobsPerBlock == null ? null : UInt64.fromHexString(maxBlobsPerBlock);
}

public Long getTimestamp() {
Expand All @@ -76,8 +76,8 @@ public UInt64 getTargetBlobsPerBlock() {
return targetBlobsPerBlock;
}

public UInt64 getMaximumBlobCount() {
return maximumBlobCount;
public UInt64 getMaxBlobsPerBlock() {
return maxBlobsPerBlock;
}

public List<WithdrawalParameter> getWithdrawals() {
Expand All @@ -101,8 +101,8 @@ public String serialize() {
if (targetBlobsPerBlock != null) {
json.put("targetBlobsPerBlock", targetBlobsPerBlock.toHexString());
}
if (maximumBlobCount != null) {
json.put("maximumBlobCount", maximumBlobCount.toHexString());
if (maxBlobsPerBlock != null) {
json.put("maxBlobsPerBlock", maxBlobsPerBlock.toHexString());
}
return json.encode();
}
Expand Down

0 comments on commit 2b8fc09

Please sign in to comment.