mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Implement "Do not change creds type on consolidation"
This commit is contained in:
@@ -746,8 +746,8 @@ pub fn process_consolidation_request<E: EthSpec>(
|
||||
}
|
||||
|
||||
let target_validator = state.get_validator(target_index)?;
|
||||
// Verify the target has execution withdrawal credentials
|
||||
if !target_validator.has_execution_withdrawal_credential(spec) {
|
||||
// Verify the target has compounding withdrawal credentials
|
||||
if !target_validator.has_compounding_withdrawal_credential(spec) {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@@ -791,10 +791,5 @@ pub fn process_consolidation_request<E: EthSpec>(
|
||||
target_index: target_index as u64,
|
||||
})?;
|
||||
|
||||
let target_validator = state.get_validator(target_index)?;
|
||||
// Churn any target excess active balance of target and raise its max
|
||||
if target_validator.has_eth1_withdrawal_credential(spec) {
|
||||
state.switch_to_compounding_validator(target_index, spec)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1
|
||||
# `uint64(2**3)` (= 8)
|
||||
MAX_ATTESTATIONS_ELECTRA: 8
|
||||
# `uint64(2**0)` (= 1)
|
||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1
|
||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2
|
||||
|
||||
# Execution
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
@@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1
|
||||
# `uint64(2**3)` (= 8)
|
||||
MAX_ATTESTATIONS_ELECTRA: 8
|
||||
# `uint64(2**0)` (= 1)
|
||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1
|
||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2
|
||||
|
||||
# Execution
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
@@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1
|
||||
# `uint64(2**3)` (= 8)
|
||||
MAX_ATTESTATIONS_ELECTRA: 8
|
||||
# `uint64(2**0)` (= 1)
|
||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1
|
||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2
|
||||
|
||||
# Execution
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
@@ -439,7 +439,7 @@ impl EthSpec for MainnetEthSpec {
|
||||
type PendingDepositsLimit = U134217728;
|
||||
type PendingPartialWithdrawalsLimit = U134217728;
|
||||
type PendingConsolidationsLimit = U262144;
|
||||
type MaxConsolidationRequestsPerPayload = U1;
|
||||
type MaxConsolidationRequestsPerPayload = U2;
|
||||
type MaxDepositRequestsPerPayload = U8192;
|
||||
type MaxAttesterSlashingsElectra = U1;
|
||||
type MaxAttestationsElectra = U8;
|
||||
@@ -568,7 +568,7 @@ impl EthSpec for GnosisEthSpec {
|
||||
type PendingDepositsLimit = U134217728;
|
||||
type PendingPartialWithdrawalsLimit = U134217728;
|
||||
type PendingConsolidationsLimit = U262144;
|
||||
type MaxConsolidationRequestsPerPayload = U1;
|
||||
type MaxConsolidationRequestsPerPayload = U2;
|
||||
type MaxDepositRequestsPerPayload = U8192;
|
||||
type MaxAttesterSlashingsElectra = U1;
|
||||
type MaxAttestationsElectra = U8;
|
||||
|
||||
Reference in New Issue
Block a user