-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
f6dcc91
to
aede437
Compare
validator/client/attest.go
Outdated
h, err := hash.Proto(data) | ||
r, err := data.HashTreeRoot() |
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.
Have we benchmarked against the two?
What's the point of
|
Also, I'm wondering if the
|
This reverts commit 0820c870d2627950179b0edf7ce62ee4fa4a03a3.
Also:
We have both |
Sometimes, it's
|
@@ -258,7 +258,7 @@ func performRoles(slotCtx context.Context, allRoles map[[48]byte][]iface.Validat | |||
defer span.End() | |||
defer func() { | |||
if err := recover(); err != nil { // catch any panic in logging | |||
log.WithField("err", err). | |||
log.WithField("error", err). |
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
because err
is of type any
"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 comment
The reason will be displayed to describe this comment to others. Learn more.
we have a proposerPubkey
field too, so can't use pubkeys
"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 comment
The reason will be displayed to describe this comment to others. Learn more.
We have validatorIndex
in other places. I prefer this way rather than index
because it might be unclear what kind of index it is (maybe not in this exact place, but somewhere else).
validator/client/aggregate.go
Outdated
for _, log := range v.attLogs { | ||
if duty.CommitteeIndex == log.data.CommitteeIndex { | ||
log.aggregatorIndices = append(log.aggregatorIndices, duty.ValidatorIndex) | ||
for _, l := range v.submittedAtts { |
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.
Why using l
as a variable name?
(the letter l
is not in submittedAtts
).
Why not using something like att
?
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.
this is outdated
What type of PR is this?
Other
What does this PR do? Why is it needed?
The purpose of this PR is to make validator logs more clean/consistent/useful:
Schedule for epoch
log before logs for individual slot duties, which allows to extract thetotalAttestersInEpoch
log that was repeated for every slot. The new log also displays the proposer count.timeTillDuty
because I don't think it's useful.Attestation schedule
andProposal schedule
into a singleDuties schedule
log.