-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add debug log when downscoring a peer for bad response. #14742
base: develop
Are you sure you want to change the base?
Conversation
d2aa446
to
d24ecf6
Compare
d24ecf6
to
7e71977
Compare
score := s.Peers().Scorers().BadResponsesScorer().Increment(info.ID) | ||
return errors.Wrapf(err, "connect to peer %s - new bad responses score: %d", info.ID, score) |
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.
Since we are using score only once would it not be better to just use the value?
score := s.Peers().Scorers().BadResponsesScorer().Increment(info.ID) | |
return errors.Wrapf(err, "connect to peer %s - new bad responses score: %d", info.ID, score) | |
return errors.Wrapf(err, "connect to peer %s - new bad responses score: %d", info.ID, s.Peers().Scorers().BadResponsesScorer().Increment(info.ID)) |
score := s.p2p.Peers().Scorers().BadResponsesScorer().Increment(ib.blockPid) | ||
log.WithError(err).WithFields(ib.logFields()).WithField("newBlockPidBadResponsesScore", score).Debug("Backfill batch failed to import") |
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.
Same comment as above
score := q.blocksFetcher.p2p.Peers().Scorers().BadResponsesScorer().Increment(m.pid) | ||
log. | ||
WithFields(logrus.Fields{"pid": response.pid, "newBadResponsesScore": score}). | ||
Debug("Peer is penalized for invalid blocks") |
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.
Same as above, etc
What type of PR is this?
Other
What does this PR do? Why is it needed?
We need to know, when a peer is disconnected for a "too many bad responses" reason, what were these bad responses.
Which issues(s) does this PR fix?
Acknowledgements