refactor(p2p)!: merge #4307 back into main#4643
Merged
Conversation
melekes
commented
Dec 10, 2024
jmalicevic
reviewed
Dec 10, 2024
jmalicevic
reviewed
Dec 10, 2024
Collaborator
jmalicevic
left a comment
There was a problem hiding this comment.
Changelog, especially if there are breaking changes (API or otherwise).
Collaborator
Author
done ✅ |
jmalicevic
reviewed
Dec 11, 2024
Comment on lines
+385
to
+388
| // c.Logger.Debug("Send", | ||
| // "streamID", chID, | ||
| // "msgBytes", log.NewLazySprintf("%X", msgBytes), | ||
| // "timeout", timeout) |
Collaborator
There was a problem hiding this comment.
Suggested change
| // c.Logger.Debug("Send", | |
| // "streamID", chID, | |
| // "msgBytes", log.NewLazySprintf("%X", msgBytes), | |
| // "timeout", timeout) | |
| // c.Logger.Debug("Send", | |
| // "streamID", chID, | |
| // "msgBytes", log.NewLazySprintf("%X", msgBytes), | |
| // "timeout", timeout) |
Do we want to keep this debug message?
Collaborator
Author
There was a problem hiding this comment.
It's only useful if you're a CometBFT dev debugging the P2P stack. Otherwise, the message we've received is logged in peer.go.
| c.Logger.Debug("Received bytes", "chID", channelID, "msgBytes", msgBytes) | ||
| // NOTE: This means the reactor.Receive runs in the same thread as the p2p recv routine | ||
| c.onReceive(channelID, msgBytes) | ||
| // c.Logger.Debug("Received", "streamID", channelID, "msgBytes", log.NewLazySprintf("%X", msgBytes)) |
Collaborator
There was a problem hiding this comment.
Suggested change
| // c.Logger.Debug("Received", "streamID", channelID, "msgBytes", log.NewLazySprintf("%X", msgBytes)) | |
| c.Logger.Debug("Received", "streamID", channelID, "msgBytes", log.NewLazySprintf("%X", msgBytes)) |
Restrore msg ?
| if err := p.mconn.Stop(); err != nil { // stop everything and close the conn | ||
| p.Logger.Debug("Error while stopping peer", "err", err) | ||
| if err := p.Close("stopping peer"); err != nil { | ||
| p.Logger.Error("Close", "err", err) |
Collaborator
There was a problem hiding this comment.
We are increasing log level here. Afraid it might create too much noise.
Collaborator
Author
There was a problem hiding this comment.
But it's only executed if closing underlying MConnection fails
jmalicevic
approved these changes
Dec 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4553
Refs #4307