-
Notifications
You must be signed in to change notification settings - Fork 995
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
Improve vc logs #13573
Improve vc logs #13573
Changes from 1 commit
4b78dd8
407bb2f
aede437
3b5256d
6806ca9
af89707
df8da78
f9f30eb
2b66988
e538cc0
b198f1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -360,11 +360,11 @@ func (v *validator) checkAndLogValidatorStatus(statuses []*validatorStatus, acti | |
var validatorActivated bool | ||
for _, status := range statuses { | ||
fields := logrus.Fields{ | ||
"pubKey": fmt.Sprintf("%#x", bytesutil.Trunc(status.publicKey)), | ||
"pubkey": fmt.Sprintf("%#x", bytesutil.Trunc(status.publicKey)), | ||
"status": status.status.Status.String(), | ||
} | ||
if status.index != nonexistentIndex { | ||
fields["index"] = status.index | ||
fields["validatorIndex"] = status.index | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have |
||
} | ||
log := log.WithFields(fields) | ||
if v.emitAccountMetrics { | ||
|
@@ -447,7 +447,7 @@ func (v *validator) CheckDoppelGanger(ctx context.Context) error { | |
if err != nil { | ||
return err | ||
} | ||
log.WithField("keys", len(pubkeys)).Info("Running doppelganger check") | ||
log.WithField("keyCount", len(pubkeys)).Info("Running doppelganger check") | ||
// Exit early if no validating pub keys are found. | ||
if len(pubkeys) == 0 { | ||
return nil | ||
|
@@ -562,7 +562,7 @@ func (v *validator) UpdateDuties(ctx context.Context, slot primitives.Slot) erro | |
filteredKeys = append(filteredKeys, pubKey) | ||
} else { | ||
log.WithField( | ||
"publicKey", fmt.Sprintf("%#x", bytesutil.Trunc(pubKey[:])), | ||
"pubkey", fmt.Sprintf("%#x", bytesutil.Trunc(pubKey[:])), | ||
).Warn("Not including slashable public key from slashing protection import " + | ||
"in request to update validator duties") | ||
} | ||
|
@@ -967,14 +967,14 @@ func (v *validator) logDuties(slot primitives.Slot, currentEpochDuties []*ethpb. | |
isAttester := len(attesterKeys[i]) > 0 | ||
if isAttester { | ||
slotLog = slotLog.WithFields(logrus.Fields{ | ||
"slot": epochStartSlot + i, | ||
"slotInEpoch": (epochStartSlot + i) % params.BeaconConfig().SlotsPerEpoch, | ||
"attesterCount": len(attesterKeys[i]), | ||
"pubkeys": attesterKeys[i], | ||
"slot": epochStartSlot + i, | ||
"slotInEpoch": (epochStartSlot + i) % params.BeaconConfig().SlotsPerEpoch, | ||
"attesterCount": len(attesterKeys[i]), | ||
"attesterPubkeys": attesterKeys[i], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have a |
||
}) | ||
} | ||
if durationTillDuty > 0 { | ||
slotLog = slotLog.WithField("timeTillDuty", durationTillDuty) | ||
slotLog = slotLog.WithField("timeUntilDuty", durationTillDuty) | ||
} | ||
if isProposer || isAttester { | ||
slotLog.Infof("Duties schedule") | ||
|
@@ -1030,8 +1030,8 @@ func (v *validator) PushProposerSettings(ctx context.Context, km keymanager.IKey | |
} | ||
if len(proposerReqs) != len(pubkeys) { | ||
log.WithFields(logrus.Fields{ | ||
"pubkeysCount": len(pubkeys), | ||
"proposerSettingsReqCount": len(proposerReqs), | ||
"pubkeysCount": len(pubkeys), | ||
"proposerSettingsRequestCount": len(proposerReqs), | ||
}).Debugln("Request count did not match included validator count. Only keys that have been activated will be included in the request.") | ||
} | ||
if _, err := v.validatorClient.PrepareBeaconProposer(ctx, ðpb.PrepareBeaconProposerRequest{ | ||
|
@@ -1095,9 +1095,9 @@ func (v *validator) filterAndCacheActiveKeys(ctx context.Context, pubkeys [][fie | |
filteredKeys = append(filteredKeys, bytesutil.ToBytes48(resp.PublicKeys[i])) | ||
} else { | ||
log.WithFields(logrus.Fields{ | ||
"publickey": hexutil.Encode(resp.PublicKeys[i]), | ||
"status": status.Status.String(), | ||
}).Debugf("skipping non active status key.") | ||
"pubkey": hexutil.Encode(resp.PublicKeys[i]), | ||
"status": status.Status.String(), | ||
}).Debugf("Skipping non-active status key.") | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't use
WithError
becauseerr
is of typeany