-
-
Notifications
You must be signed in to change notification settings - Fork 311
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: Log validator index, status and pubkey each epoch #5161
Fix: Log validator index, status and pubkey each epoch #5161
Conversation
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.
looks good to me from a technical point of view, I am not really opinionated on how the log message should be displayed. Since this is a UX topic makes sense to get actual user feedback so we might just wanna push this out asap.
Would be good to get @g11tech opinion on this about log formatting |
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.
#4785 says
every epoch, we should log the pubkey count with the validator grouped by status
as lighthouse is doing
I don't think this is doing that. Also don't think this is necessarily the right place to add the log.
yes #4785 is meant to do as suggested by @wemeetagain 👍 |
Thanks for the feedback @nflaig :) made the updates! |
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.
Looks pretty clean now, great refactoring!
1dce24b
to
d8094a4
Compare
const pubkeyHex = toHexString(validatorState.validator.pubkey); | ||
if (!this.pubkey2index.has(pubkeyHex)) { | ||
this.logger.debug("Discovered validator", {pubkey: pubkeyHex, index: validatorState.index}); | ||
this.logger.info("Validator exists in beacon chain", { |
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.
@maschad running this on goerli with quite a lot of validators and this inital log is quite noisy in my opinion, we are printing out Validator exists in beacon chain
for each validator which seems bit redundant because these logs all happen after each other.
I think we should reconsider this and maybe only print out Validator exists in beacon chain
once and then just list all the validators, with index, pubkey and ideally also fee recipient (if possible)
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.
Good point, I've included that change in be5a7e4
🎉 This PR is included in v1.6.0 🎉 |
// The total number of validators | ||
const total = pubkeysHex.length; | ||
|
||
this.logger.info("Validator statuses", {...statuses, total}); |
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.
@maschad wondering here, wasn't this intended to be logged every epoch?
Once we discovered all pubkey we are not calling this due to this check
lodestar/packages/validator/src/services/indices.ts
Lines 102 to 106 in ddc58ce
const pubkeysHexToDiscover = pubkeysHex.filter((pubkey) => !this.pubkey2index.has(pubkey)); | |
if (pubkeysHexToDiscover.length === 0) { | |
return []; | |
} |
I guess this should be fixed by the other PR #5239
Closes #4785