From 45b073004b29a473e9ba6f0550b6592b43996be8 Mon Sep 17 00:00:00 2001 From: Lucas Saldanha Date: Tue, 18 Jun 2024 20:52:00 +1200 Subject: [PATCH] Rename MAX_CONSOLIDATIONS to MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD --- .../teku/spec/config/SpecConfigElectra.java | 2 +- .../teku/spec/config/SpecConfigElectraImpl.java | 14 +++++++------- .../teku/spec/config/builder/ElectraBuilder.java | 13 +++++++------ .../electra/BeaconBlockBodySchemaElectraImpl.java | 3 ++- .../BlindedBeaconBlockBodySchemaElectraImpl.java | 3 ++- .../teku/spec/config/presets/mainnet/electra.yaml | 2 +- .../teku/spec/config/presets/minimal/electra.yaml | 2 +- .../teku/spec/config/presets/swift/electra.yaml | 2 +- 8 files changed, 22 insertions(+), 19 deletions(-) diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigElectra.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigElectra.java index 3f8de59d9f3..48a09aac622 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigElectra.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigElectra.java @@ -56,7 +56,7 @@ static SpecConfigElectra required(final SpecConfig specConfig) { int getMaxAttestationsElectra(); - int getMaxConsolidations(); + int getMaxConsolidationRequestsPerPayload(); int getMaxDepositReceiptsPerPayload(); diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigElectraImpl.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigElectraImpl.java index ab8a571c4df..6294d969945 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigElectraImpl.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigElectraImpl.java @@ -34,7 +34,7 @@ public class SpecConfigElectraImpl extends DelegatingSpecConfigDeneb implements private final int whistleblowerRewardQuotientElectra; private final int maxAttesterSlashingsElectra; private final int maxAttestationsElectra; - private final int maxConsolidations; + private final int maxConsolidationRequestsPerPayload; private final int maxDepositReceiptsPerPayload; private final int maxWithdrawalRequestsPerPayload; private final int maxPendingPartialsPerWithdrawalsSweep; @@ -53,7 +53,7 @@ public SpecConfigElectraImpl( final int whistleblowerRewardQuotientElectra, final int maxAttesterSlashingsElectra, final int maxAttestationsElectra, - final int maxConsolidations, + final int maxConsolidationRequestsPerPayload, final int maxDepositReceiptsPerPayload, final int maxWithdrawalRequestsPerPayload, final int maxPendingPartialsPerWithdrawalsSweep) { @@ -70,7 +70,7 @@ public SpecConfigElectraImpl( this.whistleblowerRewardQuotientElectra = whistleblowerRewardQuotientElectra; this.maxAttesterSlashingsElectra = maxAttesterSlashingsElectra; this.maxAttestationsElectra = maxAttestationsElectra; - this.maxConsolidations = maxConsolidations; + this.maxConsolidationRequestsPerPayload = maxConsolidationRequestsPerPayload; this.maxDepositReceiptsPerPayload = maxDepositReceiptsPerPayload; this.maxWithdrawalRequestsPerPayload = maxWithdrawalRequestsPerPayload; this.maxPendingPartialsPerWithdrawalsSweep = maxPendingPartialsPerWithdrawalsSweep; @@ -137,8 +137,8 @@ public int getMaxAttestationsElectra() { } @Override - public int getMaxConsolidations() { - return maxConsolidations; + public int getMaxConsolidationRequestsPerPayload() { + return maxConsolidationRequestsPerPayload; } @Override @@ -183,7 +183,7 @@ public boolean equals(final Object o) { && whistleblowerRewardQuotientElectra == that.whistleblowerRewardQuotientElectra && maxAttesterSlashingsElectra == that.maxAttesterSlashingsElectra && maxAttestationsElectra == that.maxAttestationsElectra - && maxConsolidations == that.maxConsolidations + && maxConsolidationRequestsPerPayload == that.maxConsolidationRequestsPerPayload && maxDepositReceiptsPerPayload == that.maxDepositReceiptsPerPayload && maxWithdrawalRequestsPerPayload == that.maxWithdrawalRequestsPerPayload && maxPendingPartialsPerWithdrawalsSweep == that.maxPendingPartialsPerWithdrawalsSweep; @@ -205,7 +205,7 @@ public int hashCode() { whistleblowerRewardQuotientElectra, maxAttesterSlashingsElectra, maxAttestationsElectra, - maxConsolidations, + maxConsolidationRequestsPerPayload, maxDepositReceiptsPerPayload, maxWithdrawalRequestsPerPayload, maxPendingPartialsPerWithdrawalsSweep); diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/ElectraBuilder.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/ElectraBuilder.java index 412192bd96a..f60e8ffba4c 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/ElectraBuilder.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/ElectraBuilder.java @@ -41,7 +41,7 @@ public class ElectraBuilder implements ForkConfigBuilder getValidationMap() { constants.put("whistleblowerRewardQuotientElectra", whistleblowerRewardQuotientElectra); constants.put("maxAttesterSlashingsElectra", maxAttesterSlashingsElectra); constants.put("maxAttestationsElectra", maxAttestationsElectra); - constants.put("maxConsolidations", maxConsolidations); + constants.put("maxConsolidationRequestsPerPayload", maxConsolidationRequestsPerPayload); constants.put("maxDepositReceiptsPerPayload", maxDepositReceiptsPerPayload); constants.put("maxWithdrawalRequestsPerPayload", maxWithdrawalRequestsPerPayload); constants.put("maxPendingPartialsPerWithdrawalsSweep", maxPendingPartialsPerWithdrawalsSweep); 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 a95c8a56f9a..7e3c521f5b0 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 @@ -145,7 +145,8 @@ BlockBodyFields.EXECUTION_PAYLOAD, new ExecutionPayloadSchemaElectra(specConfig) namedSchema( BlockBodyFields.CONSOLIDATIONS, SszListSchema.create( - SignedConsolidation.SSZ_SCHEMA, specConfig.getMaxConsolidations()))); + SignedConsolidation.SSZ_SCHEMA, + specConfig.getMaxConsolidationRequestsPerPayload()))); } @Override diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodySchemaElectraImpl.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodySchemaElectraImpl.java index 1a78f0e5e81..bd49088d1dc 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodySchemaElectraImpl.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blocks/blockbody/versions/electra/BlindedBeaconBlockBodySchemaElectraImpl.java @@ -145,7 +145,8 @@ public static BlindedBeaconBlockBodySchemaElectraImpl create( namedSchema( BlockBodyFields.CONSOLIDATIONS, SszListSchema.create( - SignedConsolidation.SSZ_SCHEMA, specConfig.getMaxConsolidations()))); + SignedConsolidation.SSZ_SCHEMA, + specConfig.getMaxConsolidationRequestsPerPayload()))); } @Override diff --git a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/mainnet/electra.yaml b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/mainnet/electra.yaml index 504a03aca25..1b32190bd49 100644 --- a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/mainnet/electra.yaml +++ b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/mainnet/electra.yaml @@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1 # `uint64(2**3)` (= 8) MAX_ATTESTATIONS_ELECTRA: 8 # `uint64(2**0)` (= 1) -MAX_CONSOLIDATIONS: 1 +MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1 # Execution # --------------------------------------------------------------- diff --git a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/minimal/electra.yaml b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/minimal/electra.yaml index 78d7c406022..19c48c1675c 100644 --- a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/minimal/electra.yaml +++ b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/minimal/electra.yaml @@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1 # `uint64(2**3)` (= 8) MAX_ATTESTATIONS_ELECTRA: 8 # `uint64(2**0)` (= 1) -MAX_CONSOLIDATIONS: 1 +MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1 # Execution # --------------------------------------------------------------- diff --git a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/swift/electra.yaml b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/swift/electra.yaml index 78d7c406022..19c48c1675c 100644 --- a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/swift/electra.yaml +++ b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/presets/swift/electra.yaml @@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1 # `uint64(2**3)` (= 8) MAX_ATTESTATIONS_ELECTRA: 8 # `uint64(2**0)` (= 1) -MAX_CONSOLIDATIONS: 1 +MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1 # Execution # ---------------------------------------------------------------