diff --git a/transition_functions/src/electra/block_processing.rs b/transition_functions/src/electra/block_processing.rs index 620ebef0..4fa841d4 100644 --- a/transition_functions/src/electra/block_processing.rs +++ b/transition_functions/src/electra/block_processing.rs @@ -933,6 +933,7 @@ fn process_withdrawal_request( .as_bytes() .index(H256::len_bytes() - ExecutionAddress::len_bytes()..) .pipe(ExecutionAddress::from_slice); + let is_correct_source_address = source_address == withdrawal_request.source_address; if !(has_correct_credential && is_correct_source_address) { @@ -1031,6 +1032,7 @@ fn process_deposit_request( Ok(()) } + #[allow(clippy::too_many_lines)] pub fn process_consolidation_request( config: &Config, @@ -1074,6 +1076,7 @@ pub fn process_consolidation_request( let prefix_len = H256::len_bytes() - ExecutionAddress::len_bytes(); let computed_source_address = ExecutionAddress::from_slice(&source_validator.withdrawal_credentials[prefix_len..]); + if !(has_correct_credential && computed_source_address == source_address) { return Ok(()); } diff --git a/transition_functions/src/electra/epoch_processing.rs b/transition_functions/src/electra/epoch_processing.rs index 5dcf40b3..b79875d9 100644 --- a/transition_functions/src/electra/epoch_processing.rs +++ b/transition_functions/src/electra/epoch_processing.rs @@ -21,6 +21,7 @@ use types::{ phase0::consts::FAR_FUTURE_EPOCH, preset::Preset, traits::{BeaconState as _, PostElectraBeaconState}, + phase0::consts::FAR_FUTURE_EPOCH, }; use super::epoch_intermediates; @@ -227,7 +228,6 @@ fn process_pending_balance_deposits( } } else { // > Validator is not exiting, attempt to process deposit - // > Deposit does not fit in the churn, no more deposit processing in this epoch. if processed_amount + deposit.amount > available_for_processing { break;