-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
DNM: logging ux changes based on new logging policy #5457
Conversation
@@ -110,7 +110,7 @@ export async function processBlocks( | |||
if (!(err instanceof BlockError)) { | |||
this.logger.error("Non BlockError received", {}, err); | |||
} else if (!opts.disableOnBlockError) { | |||
this.logger.error("Block error", {slot: err.signedBlock.message.slot}, err); | |||
this.logger.warn("Block error", {slot: err.signedBlock.message.slot}, 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.
Reference: #3062
Block errors are sometimes expected, especially for unstable/testnet networks and error
doesn't feel like the correct verbosity as the user cannot be expected to do something about it. As mentioned in the issue, warn
or info
may be more appropriate. Should we also consider removing the stacktrace?
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 log here does not make much sense to be above debug level IF ONLY the consumers handle the error properly. Invalid blocks can be submitted via:
- gossip: a peer is free to submit and invalid block. That's an uncontrolled event the user can't do much about, so we may want to not log it at all. However, if there's a consensus bug the node will just freeze without warning
- sync: same as above
- API: this should never happen as long as the API is trusted. The API also logs errors so this will probably be a duplicate
For now, let's manually review every caller of this path and check if they already log the error and at what level
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 log has been moved to debug
Performance Report✔️ no performance regression detected Full benchmark results
|
Can this be closed? |
Closing. Stale and it probably makes better sense to discuss specific UX logging issues as its own issues for better tracking. |
Motivation
This PR is a collection of changes committed by the team, dedicated to discussion and refactoring based on our newly implemented logging policy #5299. Lodestar is implementing a better logging policy to improve our UX for continued adoption by the community.
Meant to track and discuss specific portions of the code that require log UX improvements. Do not merge.
Description
Contributors are asked to submit commits to this PR with potential changes and motivation for why a specific change is being proposed.
Closes #5359
Partially closes #4400