Skip to content

Commit

Permalink
Merge branch 'master' into more-experimental-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassaldanha authored Oct 21, 2024
2 parents 35d76c6 + 3bb201d commit 890bd76
Show file tree
Hide file tree
Showing 25 changed files with 1,336 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import tech.pegasys.teku.api.schema.bellatrix.SignedBlindedBeaconBlockBellatrix;
import tech.pegasys.teku.api.schema.capella.SignedBlindedBeaconBlockCapella;
import tech.pegasys.teku.api.schema.deneb.SignedBlindedBeaconBlockDeneb;
import tech.pegasys.teku.api.schema.electra.SignedBlindedBeaconBlockElectra;
import tech.pegasys.teku.api.schema.phase0.SignedBeaconBlockPhase0;

@Schema(
Expand All @@ -26,6 +27,7 @@
SignedBeaconBlockAltair.class,
SignedBlindedBeaconBlockBellatrix.class,
SignedBlindedBeaconBlockCapella.class,
SignedBlindedBeaconBlockDeneb.class
SignedBlindedBeaconBlockDeneb.class,
SignedBlindedBeaconBlockElectra.class
})
public interface SignedBlindedBlock {}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import tech.pegasys.teku.api.schema.bellatrix.SignedBeaconBlockBellatrix;
import tech.pegasys.teku.api.schema.capella.SignedBeaconBlockCapella;
import tech.pegasys.teku.api.schema.deneb.SignedBeaconBlockDeneb;
import tech.pegasys.teku.api.schema.electra.SignedBeaconBlockElectra;
import tech.pegasys.teku.api.schema.phase0.SignedBeaconBlockPhase0;

@Schema(
Expand All @@ -26,6 +27,7 @@
SignedBeaconBlockAltair.class,
SignedBeaconBlockBellatrix.class,
SignedBeaconBlockCapella.class,
SignedBeaconBlockDeneb.class
SignedBeaconBlockDeneb.class,
SignedBeaconBlockElectra.class
})
public interface SignedBlock {}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import tech.pegasys.teku.api.schema.bellatrix.BeaconStateBellatrix;
import tech.pegasys.teku.api.schema.capella.BeaconStateCapella;
import tech.pegasys.teku.api.schema.deneb.BeaconStateDeneb;
import tech.pegasys.teku.api.schema.electra.BeaconStateElectra;
import tech.pegasys.teku.api.schema.phase0.BeaconStatePhase0;

@Schema(
Expand All @@ -26,6 +27,7 @@
BeaconStateAltair.class,
BeaconStateBellatrix.class,
BeaconStateCapella.class,
BeaconStateDeneb.class
BeaconStateDeneb.class,
BeaconStateElectra.class
})
public interface State {}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import tech.pegasys.teku.api.schema.bellatrix.BlindedBlockBellatrix;
import tech.pegasys.teku.api.schema.capella.BlindedBlockCapella;
import tech.pegasys.teku.api.schema.deneb.BlindedBlockDeneb;
import tech.pegasys.teku.api.schema.electra.BlindedBlockElectra;
import tech.pegasys.teku.api.schema.phase0.BeaconBlockPhase0;

@Schema(
Expand All @@ -26,6 +27,7 @@
BeaconBlockAltair.class,
BlindedBlockBellatrix.class,
BlindedBlockCapella.class,
BlindedBlockDeneb.class
BlindedBlockDeneb.class,
BlindedBlockElectra.class
})
public interface UnsignedBlindedBlock {}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import tech.pegasys.teku.api.schema.bellatrix.BeaconBlockBellatrix;
import tech.pegasys.teku.api.schema.capella.BeaconBlockCapella;
import tech.pegasys.teku.api.schema.deneb.BeaconBlockDeneb;
import tech.pegasys.teku.api.schema.electra.BeaconBlockElectra;
import tech.pegasys.teku.api.schema.phase0.BeaconBlockPhase0;

@Schema(
Expand All @@ -26,6 +27,7 @@
BeaconBlockAltair.class,
BeaconBlockBellatrix.class,
BeaconBlockCapella.class,
BeaconBlockDeneb.class
BeaconBlockDeneb.class,
BeaconBlockElectra.class
})
public interface UnsignedBlock {}
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ public class SpecConfigElectraImpl extends DelegatingSpecConfigDeneb implements

private final UInt64 minActivationBalance;
private final UInt64 maxEffectiveBalanceElectra;
private final int minSlashingPenaltyQuotientElectra;
private final int whistleblowerRewardQuotientElectra;
private final int pendingDepositsLimit;
private final int pendingPartialWithdrawalsLimit;
private final int pendingConsolidationsLimit;
private final int minSlashingPenaltyQuotientElectra;
private final int whistleblowerRewardQuotientElectra;
private final int maxAttesterSlashingsElectra;
private final int maxAttestationsElectra;
private final int maxConsolidationRequestsPerPayload;
private final int maxDepositRequestsPerPayload;
private final int maxWithdrawalRequestsPerPayload;
private final int maxConsolidationRequestsPerPayload;
private final int maxPendingPartialsPerWithdrawalsSweep;
private final int maxPendingDepositsPerEpoch;

Expand All @@ -47,16 +47,16 @@ public SpecConfigElectraImpl(
final UInt64 minPerEpochChurnLimitElectra,
final UInt64 minActivationBalance,
final UInt64 maxEffectiveBalanceElectra,
final int minSlashingPenaltyQuotientElectra,
final int whistleblowerRewardQuotientElectra,
final int pendingDepositsLimit,
final int pendingPartialWithdrawalsLimit,
final int pendingConsolidationsLimit,
final int minSlashingPenaltyQuotientElectra,
final int whistleblowerRewardQuotientElectra,
final int maxAttesterSlashingsElectra,
final int maxAttestationsElectra,
final int maxConsolidationRequestsPerPayload,
final int maxDepositRequestsPerPayload,
final int maxWithdrawalRequestsPerPayload,
final int maxConsolidationRequestsPerPayload,
final int maxPendingPartialsPerWithdrawalsSweep,
final int maxPendingDepositsPerEpoch) {
super(specConfig);
Expand All @@ -65,16 +65,16 @@ public SpecConfigElectraImpl(
this.minPerEpochChurnLimitElectra = minPerEpochChurnLimitElectra;
this.minActivationBalance = minActivationBalance;
this.maxEffectiveBalanceElectra = maxEffectiveBalanceElectra;
this.minSlashingPenaltyQuotientElectra = minSlashingPenaltyQuotientElectra;
this.whistleblowerRewardQuotientElectra = whistleblowerRewardQuotientElectra;
this.pendingDepositsLimit = pendingDepositsLimit;
this.pendingPartialWithdrawalsLimit = pendingPartialWithdrawalsLimit;
this.pendingConsolidationsLimit = pendingConsolidationsLimit;
this.minSlashingPenaltyQuotientElectra = minSlashingPenaltyQuotientElectra;
this.whistleblowerRewardQuotientElectra = whistleblowerRewardQuotientElectra;
this.maxAttesterSlashingsElectra = maxAttesterSlashingsElectra;
this.maxAttestationsElectra = maxAttestationsElectra;
this.maxConsolidationRequestsPerPayload = maxConsolidationRequestsPerPayload;
this.maxDepositRequestsPerPayload = maxDepositRequestsPerPayload;
this.maxWithdrawalRequestsPerPayload = maxWithdrawalRequestsPerPayload;
this.maxConsolidationRequestsPerPayload = maxConsolidationRequestsPerPayload;
this.maxPendingPartialsPerWithdrawalsSweep = maxPendingPartialsPerWithdrawalsSweep;
this.maxPendingDepositsPerEpoch = maxPendingDepositsPerEpoch;
}
Expand Down Expand Up @@ -105,28 +105,28 @@ public UInt64 getMaxEffectiveBalanceElectra() {
}

@Override
public int getPendingDepositsLimit() {
return pendingDepositsLimit;
public int getMinSlashingPenaltyQuotientElectra() {
return minSlashingPenaltyQuotientElectra;
}

@Override
public int getPendingPartialWithdrawalsLimit() {
return pendingPartialWithdrawalsLimit;
public int getWhistleblowerRewardQuotientElectra() {
return whistleblowerRewardQuotientElectra;
}

@Override
public int getPendingConsolidationsLimit() {
return pendingConsolidationsLimit;
public int getPendingDepositsLimit() {
return pendingDepositsLimit;
}

@Override
public int getMinSlashingPenaltyQuotientElectra() {
return minSlashingPenaltyQuotientElectra;
public int getPendingPartialWithdrawalsLimit() {
return pendingPartialWithdrawalsLimit;
}

@Override
public int getWhistleblowerRewardQuotientElectra() {
return whistleblowerRewardQuotientElectra;
public int getPendingConsolidationsLimit() {
return pendingConsolidationsLimit;
}

@Override
Expand All @@ -139,11 +139,6 @@ public int getMaxAttestationsElectra() {
return maxAttestationsElectra;
}

@Override
public int getMaxConsolidationRequestsPerPayload() {
return maxConsolidationRequestsPerPayload;
}

@Override
public int getMaxDepositRequestsPerPayload() {
return maxDepositRequestsPerPayload;
Expand All @@ -154,6 +149,11 @@ public int getMaxWithdrawalRequestsPerPayload() {
return maxWithdrawalRequestsPerPayload;
}

@Override
public int getMaxConsolidationRequestsPerPayload() {
return maxConsolidationRequestsPerPayload;
}

@Override
public int getMaxPendingPartialsPerWithdrawalsSweep() {
return maxPendingPartialsPerWithdrawalsSweep;
Expand Down Expand Up @@ -184,16 +184,16 @@ public boolean equals(final Object o) {
&& Objects.equals(minPerEpochChurnLimitElectra, that.minPerEpochChurnLimitElectra)
&& Objects.equals(minActivationBalance, that.minActivationBalance)
&& Objects.equals(maxEffectiveBalanceElectra, that.maxEffectiveBalanceElectra)
&& minSlashingPenaltyQuotientElectra == that.minSlashingPenaltyQuotientElectra
&& whistleblowerRewardQuotientElectra == that.whistleblowerRewardQuotientElectra
&& pendingDepositsLimit == that.pendingDepositsLimit
&& pendingPartialWithdrawalsLimit == that.pendingPartialWithdrawalsLimit
&& pendingConsolidationsLimit == that.pendingConsolidationsLimit
&& minSlashingPenaltyQuotientElectra == that.minSlashingPenaltyQuotientElectra
&& whistleblowerRewardQuotientElectra == that.whistleblowerRewardQuotientElectra
&& maxAttesterSlashingsElectra == that.maxAttesterSlashingsElectra
&& maxAttestationsElectra == that.maxAttestationsElectra
&& maxConsolidationRequestsPerPayload == that.maxConsolidationRequestsPerPayload
&& maxDepositRequestsPerPayload == that.maxDepositRequestsPerPayload
&& maxWithdrawalRequestsPerPayload == that.maxWithdrawalRequestsPerPayload
&& maxConsolidationRequestsPerPayload == that.maxConsolidationRequestsPerPayload
&& maxPendingPartialsPerWithdrawalsSweep == that.maxPendingPartialsPerWithdrawalsSweep
&& maxPendingDepositsPerEpoch == that.maxPendingDepositsPerEpoch;
}
Expand All @@ -207,16 +207,16 @@ public int hashCode() {
minPerEpochChurnLimitElectra,
minActivationBalance,
maxEffectiveBalanceElectra,
minSlashingPenaltyQuotientElectra,
whistleblowerRewardQuotientElectra,
pendingDepositsLimit,
pendingPartialWithdrawalsLimit,
pendingConsolidationsLimit,
minSlashingPenaltyQuotientElectra,
whistleblowerRewardQuotientElectra,
maxAttesterSlashingsElectra,
maxAttestationsElectra,
maxConsolidationRequestsPerPayload,
maxDepositRequestsPerPayload,
maxWithdrawalRequestsPerPayload,
maxConsolidationRequestsPerPayload,
maxPendingPartialsPerWithdrawalsSweep,
maxPendingDepositsPerEpoch);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@ public class ElectraBuilder implements ForkConfigBuilder<SpecConfigDeneb, SpecCo
private UInt64 electraForkEpoch;

private UInt64 minPerEpochChurnLimitElectra;

private UInt64 minActivationBalance;
private UInt64 maxEffectiveBalanceElectra;
private Integer minSlashingPenaltyQuotientElectra;
private Integer whistleblowerRewardQuotientElectra;
private Integer pendingDepositsLimit;
private Integer pendingPartialWithdrawalsLimit;
private Integer pendingConsolidationsLimit;
private Integer minSlashingPenaltyQuotientElectra;
private Integer whistleblowerRewardQuotientElectra;
private Integer maxAttesterSlashingsElectra;
private Integer maxAttestationsElectra;
private Integer maxConsolidationRequestsPerPayload;
private Integer maxDepositRequestsPerPayload;
private Integer maxWithdrawalRequestsPerPayload;
private Integer maxConsolidationRequestsPerPayload;
private Integer maxPendingPartialsPerWithdrawalsSweep;
private Integer maxPendingDepositsPerEpoch;

Expand All @@ -58,32 +59,32 @@ public SpecConfigElectra build(final SpecConfigDeneb specConfig) {
minPerEpochChurnLimitElectra,
minActivationBalance,
maxEffectiveBalanceElectra,
minSlashingPenaltyQuotientElectra,
whistleblowerRewardQuotientElectra,
pendingDepositsLimit,
pendingPartialWithdrawalsLimit,
pendingConsolidationsLimit,
minSlashingPenaltyQuotientElectra,
whistleblowerRewardQuotientElectra,
maxAttesterSlashingsElectra,
maxAttestationsElectra,
maxConsolidationRequestsPerPayload,
maxDepositRequestsPerPayload,
maxWithdrawalRequestsPerPayload,
maxConsolidationRequestsPerPayload,
maxPendingPartialsPerWithdrawalsSweep,
maxPendingDepositsPerEpoch);
}

public ElectraBuilder electraForkEpoch(final UInt64 electraForkEpoch) {
checkNotNull(electraForkEpoch);
this.electraForkEpoch = electraForkEpoch;
return this;
}

public ElectraBuilder electraForkVersion(final Bytes4 electraForkVersion) {
checkNotNull(electraForkVersion);
this.electraForkVersion = electraForkVersion;
return this;
}

public ElectraBuilder electraForkEpoch(final UInt64 electraForkEpoch) {
checkNotNull(electraForkEpoch);
this.electraForkEpoch = electraForkEpoch;
return this;
}

public ElectraBuilder minPerEpochChurnLimitElectra(final UInt64 minPerEpochChurnLimitElectra) {
checkNotNull(minPerEpochChurnLimitElectra);
this.minPerEpochChurnLimitElectra = minPerEpochChurnLimitElectra;
Expand All @@ -102,6 +103,20 @@ public ElectraBuilder maxEffectiveBalanceElectra(final UInt64 maxEffectiveBalanc
return this;
}

public ElectraBuilder minSlashingPenaltyQuotientElectra(
final Integer minSlashingPenaltyQuotientElectra) {
checkNotNull(minSlashingPenaltyQuotientElectra);
this.minSlashingPenaltyQuotientElectra = minSlashingPenaltyQuotientElectra;
return this;
}

public ElectraBuilder whistleblowerRewardQuotientElectra(
final Integer whistleblowerRewardQuotientElectra) {
checkNotNull(whistleblowerRewardQuotientElectra);
this.whistleblowerRewardQuotientElectra = whistleblowerRewardQuotientElectra;
return this;
}

public ElectraBuilder pendingDepositsLimit(final Integer pendingDepositsLimit) {
checkNotNull(pendingDepositsLimit);
this.pendingDepositsLimit = pendingDepositsLimit;
Expand All @@ -121,20 +136,6 @@ public ElectraBuilder pendingConsolidationsLimit(final Integer pendingConsolidat
return this;
}

public ElectraBuilder minSlashingPenaltyQuotientElectra(
final Integer minSlashingPenaltyQuotientElectra) {
checkNotNull(minSlashingPenaltyQuotientElectra);
this.minSlashingPenaltyQuotientElectra = minSlashingPenaltyQuotientElectra;
return this;
}

public ElectraBuilder whistleblowerRewardQuotientElectra(
final Integer whistleblowerRewardQuotientElectra) {
checkNotNull(whistleblowerRewardQuotientElectra);
this.whistleblowerRewardQuotientElectra = whistleblowerRewardQuotientElectra;
return this;
}

public ElectraBuilder maxAttesterSlashingsElectra(final Integer maxAttesterSlashingsElectra) {
checkNotNull(maxAttesterSlashingsElectra);
this.maxAttesterSlashingsElectra = maxAttesterSlashingsElectra;
Expand All @@ -147,13 +148,6 @@ public ElectraBuilder maxAttestationsElectra(final Integer maxAttestationsElectr
return this;
}

public ElectraBuilder maxConsolidationRequestsPerPayload(
final Integer maxConsolidationsRequestPerPayload) {
checkNotNull(maxConsolidationsRequestPerPayload);
this.maxConsolidationRequestsPerPayload = maxConsolidationsRequestPerPayload;
return this;
}

public ElectraBuilder maxDepositRequestsPerPayload(final Integer maxDepositRequestsPerPayload) {
checkNotNull(maxDepositRequestsPerPayload);
this.maxDepositRequestsPerPayload = maxDepositRequestsPerPayload;
Expand All @@ -167,6 +161,13 @@ public ElectraBuilder maxWithdrawalRequestsPerPayload(
return this;
}

public ElectraBuilder maxConsolidationRequestsPerPayload(
final Integer maxConsolidationsRequestPerPayload) {
checkNotNull(maxConsolidationsRequestPerPayload);
this.maxConsolidationRequestsPerPayload = maxConsolidationsRequestPerPayload;
return this;
}

public ElectraBuilder maxPendingPartialsPerWithdrawalsSweep(
final Integer maxPendingPartialsPerWithdrawalsSweep) {
checkNotNull(maxPendingPartialsPerWithdrawalsSweep);
Expand Down
Loading

0 comments on commit 890bd76

Please sign in to comment.