Skip to content

Commit

Permalink
Updated presets for EIP-6110
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassaldanha committed Oct 5, 2024
1 parent 234f711 commit 46563eb
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static SpecConfigElectra required(final SpecConfig specConfig) {

UInt64 getMaxEffectiveBalanceElectra();

int getPendingBalanceDepositsLimit();
int getPendingDepositsLimit();

int getPendingPartialWithdrawalsLimit();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class SpecConfigElectraImpl extends DelegatingSpecConfigDeneb implements

private final UInt64 minActivationBalance;
private final UInt64 maxEffectiveBalanceElectra;
private final int pendingBalanceDepositsLimit;
private final int pendingDepositsLimit;
private final int pendingPartialWithdrawalsLimit;
private final int pendingConsolidationsLimit;
private final int minSlashingPenaltyQuotientElectra;
Expand All @@ -46,7 +46,7 @@ public SpecConfigElectraImpl(
final UInt64 minPerEpochChurnLimitElectra,
final UInt64 minActivationBalance,
final UInt64 maxEffectiveBalanceElectra,
final int pendingBalanceDepositsLimit,
final int pendingDepositsLimit,
final int pendingPartialWithdrawalsLimit,
final int pendingConsolidationsLimit,
final int minSlashingPenaltyQuotientElectra,
Expand All @@ -63,7 +63,7 @@ public SpecConfigElectraImpl(
this.minPerEpochChurnLimitElectra = minPerEpochChurnLimitElectra;
this.minActivationBalance = minActivationBalance;
this.maxEffectiveBalanceElectra = maxEffectiveBalanceElectra;
this.pendingBalanceDepositsLimit = pendingBalanceDepositsLimit;
this.pendingDepositsLimit = pendingDepositsLimit;
this.pendingPartialWithdrawalsLimit = pendingPartialWithdrawalsLimit;
this.pendingConsolidationsLimit = pendingConsolidationsLimit;
this.minSlashingPenaltyQuotientElectra = minSlashingPenaltyQuotientElectra;
Expand Down Expand Up @@ -102,8 +102,8 @@ public UInt64 getMaxEffectiveBalanceElectra() {
}

@Override
public int getPendingBalanceDepositsLimit() {
return pendingBalanceDepositsLimit;
public int getPendingDepositsLimit() {
return pendingDepositsLimit;
}

@Override
Expand Down Expand Up @@ -176,7 +176,7 @@ public boolean equals(final Object o) {
&& Objects.equals(minPerEpochChurnLimitElectra, that.minPerEpochChurnLimitElectra)
&& Objects.equals(minActivationBalance, that.minActivationBalance)
&& Objects.equals(maxEffectiveBalanceElectra, that.maxEffectiveBalanceElectra)
&& pendingBalanceDepositsLimit == that.pendingBalanceDepositsLimit
&& pendingDepositsLimit == that.pendingDepositsLimit
&& pendingPartialWithdrawalsLimit == that.pendingPartialWithdrawalsLimit
&& pendingConsolidationsLimit == that.pendingConsolidationsLimit
&& minSlashingPenaltyQuotientElectra == that.minSlashingPenaltyQuotientElectra
Expand All @@ -198,7 +198,7 @@ public int hashCode() {
minPerEpochChurnLimitElectra,
minActivationBalance,
maxEffectiveBalanceElectra,
pendingBalanceDepositsLimit,
pendingDepositsLimit,
pendingPartialWithdrawalsLimit,
pendingConsolidationsLimit,
minSlashingPenaltyQuotientElectra,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ElectraBuilder implements ForkConfigBuilder<SpecConfigDeneb, SpecCo
private UInt64 minPerEpochChurnLimitElectra;
private UInt64 minActivationBalance;
private UInt64 maxEffectiveBalanceElectra;
private Integer pendingBalanceDepositsLimit;
private Integer pendingDepositsLimit;
private Integer pendingPartialWithdrawalsLimit;
private Integer pendingConsolidationsLimit;
private Integer minSlashingPenaltyQuotientElectra;
Expand All @@ -57,7 +57,7 @@ public SpecConfigElectra build(final SpecConfigDeneb specConfig) {
minPerEpochChurnLimitElectra,
minActivationBalance,
maxEffectiveBalanceElectra,
pendingBalanceDepositsLimit,
pendingDepositsLimit,
pendingPartialWithdrawalsLimit,
pendingConsolidationsLimit,
minSlashingPenaltyQuotientElectra,
Expand Down Expand Up @@ -100,9 +100,9 @@ public ElectraBuilder maxEffectiveBalanceElectra(final UInt64 maxEffectiveBalanc
return this;
}

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

Expand Down Expand Up @@ -196,7 +196,7 @@ public Map<String, Object> getValidationMap() {
constants.put("minPerEpochChurnLimitElectra", minPerEpochChurnLimitElectra);
constants.put("minActivationBalance", minActivationBalance);
constants.put("maxEffectiveBalanceElectra", maxEffectiveBalanceElectra);
constants.put("pendingBalanceDepositsLimit", pendingBalanceDepositsLimit);
constants.put("pendingDepositsLimit", pendingDepositsLimit);
constants.put("pendingPartialWithdrawalsLimit", pendingPartialWithdrawalsLimit);
constants.put("pendingConsolidationsLimit", pendingConsolidationsLimit);
constants.put("minSlashingPenaltyQuotientElectra", minSlashingPenaltyQuotientElectra);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ private static List<SszField> getUniqueFields(final SpecConfig specConfig) {
BeaconStateFields.PENDING_BALANCE_DEPOSITS,
() ->
SszListSchema.create(
pendingBalanceDepositSchema,
specConfigElectra.getPendingBalanceDepositsLimit()));
pendingBalanceDepositSchema, specConfigElectra.getPendingDepositsLimit()));
final SszField pendingPartialWithdrawalsField =
new SszField(
PENDING_PARTIAL_WITHDRAWALS_INDEX,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MAX_EFFECTIVE_BALANCE_ELECTRA: 2048000000000
# State list lengths
# ---------------------------------------------------------------
# `uint64(2**27)` (= 134,217,728)
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728
PENDING_DEPOSITS_LIMIT: 134217728
# `uint64(2**27)` (= 134,217,728)
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 134217728
# `uint64(2**18)` (= 262,144)
Expand Down Expand Up @@ -42,4 +42,9 @@ MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16
# Withdrawals processing
# ---------------------------------------------------------------
# 2**3 ( = 8) pending withdrawals
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 8
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 8

# Pending deposits processing
# ---------------------------------------------------------------
# 2**4 ( = 4) pending deposits
MAX_PENDING_DEPOSITS_PER_EPOCH: 16
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MAX_EFFECTIVE_BALANCE_ELECTRA: 2048000000000
# State list lengths
# ---------------------------------------------------------------
# `uint64(2**27)` (= 134,217,728)
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728
PENDING_DEPOSITS_LIMIT: 134217728
# [customized] `uint64(2**6)` (= 64)
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 64
# [customized] `uint64(2**6)` (= 64)
Expand Down Expand Up @@ -42,4 +42,9 @@ MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 2
# Withdrawals processing
# ---------------------------------------------------------------
# 2**0 ( = 1) pending withdrawals
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 1
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 1

# Pending deposits processing
# ---------------------------------------------------------------
# 2**4 ( = 4) pending deposits
MAX_PENDING_DEPOSITS_PER_EPOCH: 16
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MAX_EFFECTIVE_BALANCE_ELECTRA: 2048000000000
# State list lengths
# ---------------------------------------------------------------
# `uint64(2**27)` (= 134,217,728)
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728
PENDING_DEPOSITS_LIMIT: 134217728
# [customized] `uint64(2**6)` (= 64)
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 64
# [customized] `uint64(2**6)` (= 64)
Expand Down Expand Up @@ -42,4 +42,9 @@ MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 2
# Withdrawals processing
# ---------------------------------------------------------------
# 2**0 ( = 1) pending withdrawals
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 1
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 1

# Pending deposits processing
# ---------------------------------------------------------------
# 2**4 ( = 4) pending deposits
MAX_PENDING_DEPOSITS_PER_EPOCH: 16

0 comments on commit 46563eb

Please sign in to comment.