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

EIP-7251 Add missed exit checks to consolidation processing #8860

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import com.github.jk1.license.filter.LicenseBundleNormalizer
import groovy.json.JsonSlurper
import tech.pegasys.internal.license.reporter.GroupedLicenseHtmlRenderer
import tech.pegasys.teku.depcheck.DepCheckPlugin

import java.text.SimpleDateFormat

import groovy.json.JsonSlurper

import static tech.pegasys.teku.repackage.Repackage.repackage

buildscript {
Expand Down Expand Up @@ -325,7 +324,7 @@ allprojects {
}

def nightly = System.getenv("NIGHTLY") != null
def refTestVersion = nightly ? "nightly" : "v1.5.0-alpha.8"
def refTestVersion = nightly ? "nightly" : "v1.5.0-alpha.9"
def blsRefTestVersion = 'v0.1.2'
def slashingProtectionInterchangeRefTestVersion = 'v5.3.0'
def refTestBaseUrl = 'https://github.com/ethereum/consensus-spec-tests/releases/download'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,19 @@ private void processConsolidationRequest(
"process_consolidation_request: target validator {} is exiting", targetValidatorIndex);
return;
}
// Verify the source has been active long enough
if (currentEpoch.isLessThan(
sourceValidator.getActivationEpoch().plus(specConfig.getShardCommitteePeriod()))) {
LOG.debug("process_consolidation_request: source has not been active long enough");
return;
}
// Verify the source has no pending withdrawals in the queue
if (beaconStateAccessorsElectra
.getPendingBalanceToWithdraw(state, sourceValidatorIndex)
.isGreaterThan(ZERO)) {
LOG.debug("process_consolidation_request: source has pending withdrawals in the queue");
return;
}

// Initiate source validator exit and append pending consolidation
final UInt64 exitEpoch =
Expand Down
Loading