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

Fix activationEpoch=FarFutureEpoch in validator client logging #5608

Merged
merged 3 commits into from
Apr 24, 2020
Merged
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
13 changes: 9 additions & 4 deletions validator/client/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,15 @@ func (v *validator) checkAndLogValidatorStatus(validatorStatuses []*ethpb.Valida
).Info("Deposit processed, entering activation queue after finalization")
}
case ethpb.ValidatorStatus_PENDING:
log.WithFields(logrus.Fields{
"positionInActivationQueue": status.Status.PositionInActivationQueue,
"activationEpoch": status.Status.ActivationEpoch,
}).Info("Waiting to be activated")
if status.Status.ActivationEpoch == params.BeaconConfig().FarFutureEpoch {
log.WithFields(logrus.Fields{
"positionInActivationQueue": status.Status.PositionInActivationQueue,
}).Info("Waiting to be assigned activation epoch")
} else {
log.WithFields(logrus.Fields{
"activationEpoch": status.Status.ActivationEpoch,
}).Info("Waiting for activation")
}
case ethpb.ValidatorStatus_ACTIVE:
activatedKeys = append(activatedKeys, status.PublicKey)
case ethpb.ValidatorStatus_EXITED:
Expand Down
14 changes: 13 additions & 1 deletion validator/client/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,18 @@ func TestCheckAndLogValidatorStatus_OK(t *testing.T) {
},
log: "Deposit processed, entering activation queue after finalization\" positionInActivationQueue=30",
},
{
name: "PENDING",
status: &ethpb.ValidatorActivationResponse_Status{
PublicKey: pubKeys[0],
Status: &ethpb.ValidatorStatusResponse{
Status: ethpb.ValidatorStatus_PENDING,
ActivationEpoch: params.BeaconConfig().FarFutureEpoch,
PositionInActivationQueue: 6,
},
},
log: "Waiting to be assigned activation epoch\" positionInActivationQueue=6",
},
{
name: "PENDING",
status: &ethpb.ValidatorActivationResponse_Status{
Expand All @@ -869,7 +881,7 @@ func TestCheckAndLogValidatorStatus_OK(t *testing.T) {
PositionInActivationQueue: 5,
},
},
log: "Waiting to be activated\" activationEpoch=60 positionInActivationQueue=5",
log: "Waiting for activation\" activationEpoch=60",
},
{
name: "EXITED",
Expand Down