Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP7251: Add missed exit checks to consolidation processing #67

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions transition_functions/src/electra/block_processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,16 @@ pub fn process_consolidation_request<P: Preset>(
return Ok(());
}

// > Verify the source has been active long enough
if current_epoch < source_validator.activation_epoch + config.shard_committee_period {
return Ok(());
}

// > Verify the source has no pending withdrawals in the queue
if get_pending_balance_to_withdraw(state, source_index) > 0 {
return Ok(());
}

// > Initiate source validator exit and append pending consolidation
let exit_epoch = compute_consolidation_epoch_and_update_churn(
config,
Expand Down