mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-03 04:44:28 +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)?;
|
let target_validator = state.get_validator(target_index)?;
|
||||||
// Verify the target has execution withdrawal credentials
|
// Verify the target has compounding withdrawal credentials
|
||||||
if !target_validator.has_execution_withdrawal_credential(spec) {
|
if !target_validator.has_compounding_withdrawal_credential(spec) {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -791,10 +791,5 @@ pub fn process_consolidation_request<E: EthSpec>(
|
|||||||
target_index: target_index as u64,
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1
|
|||||||
# `uint64(2**3)` (= 8)
|
# `uint64(2**3)` (= 8)
|
||||||
MAX_ATTESTATIONS_ELECTRA: 8
|
MAX_ATTESTATIONS_ELECTRA: 8
|
||||||
# `uint64(2**0)` (= 1)
|
# `uint64(2**0)` (= 1)
|
||||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1
|
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2
|
||||||
|
|
||||||
# Execution
|
# Execution
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1
|
|||||||
# `uint64(2**3)` (= 8)
|
# `uint64(2**3)` (= 8)
|
||||||
MAX_ATTESTATIONS_ELECTRA: 8
|
MAX_ATTESTATIONS_ELECTRA: 8
|
||||||
# `uint64(2**0)` (= 1)
|
# `uint64(2**0)` (= 1)
|
||||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1
|
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2
|
||||||
|
|
||||||
# Execution
|
# Execution
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ MAX_ATTESTER_SLASHINGS_ELECTRA: 1
|
|||||||
# `uint64(2**3)` (= 8)
|
# `uint64(2**3)` (= 8)
|
||||||
MAX_ATTESTATIONS_ELECTRA: 8
|
MAX_ATTESTATIONS_ELECTRA: 8
|
||||||
# `uint64(2**0)` (= 1)
|
# `uint64(2**0)` (= 1)
|
||||||
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1
|
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2
|
||||||
|
|
||||||
# Execution
|
# Execution
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ impl EthSpec for MainnetEthSpec {
|
|||||||
type PendingDepositsLimit = U134217728;
|
type PendingDepositsLimit = U134217728;
|
||||||
type PendingPartialWithdrawalsLimit = U134217728;
|
type PendingPartialWithdrawalsLimit = U134217728;
|
||||||
type PendingConsolidationsLimit = U262144;
|
type PendingConsolidationsLimit = U262144;
|
||||||
type MaxConsolidationRequestsPerPayload = U1;
|
type MaxConsolidationRequestsPerPayload = U2;
|
||||||
type MaxDepositRequestsPerPayload = U8192;
|
type MaxDepositRequestsPerPayload = U8192;
|
||||||
type MaxAttesterSlashingsElectra = U1;
|
type MaxAttesterSlashingsElectra = U1;
|
||||||
type MaxAttestationsElectra = U8;
|
type MaxAttestationsElectra = U8;
|
||||||
@@ -568,7 +568,7 @@ impl EthSpec for GnosisEthSpec {
|
|||||||
type PendingDepositsLimit = U134217728;
|
type PendingDepositsLimit = U134217728;
|
||||||
type PendingPartialWithdrawalsLimit = U134217728;
|
type PendingPartialWithdrawalsLimit = U134217728;
|
||||||
type PendingConsolidationsLimit = U262144;
|
type PendingConsolidationsLimit = U262144;
|
||||||
type MaxConsolidationRequestsPerPayload = U1;
|
type MaxConsolidationRequestsPerPayload = U2;
|
||||||
type MaxDepositRequestsPerPayload = U8192;
|
type MaxDepositRequestsPerPayload = U8192;
|
||||||
type MaxAttesterSlashingsElectra = U1;
|
type MaxAttesterSlashingsElectra = U1;
|
||||||
type MaxAttestationsElectra = U8;
|
type MaxAttestationsElectra = U8;
|
||||||
|
|||||||
Reference in New Issue
Block a user