This repository was archived by the owner on Jan 22, 2025. It is now read-only.
report received message signatures only on PUSH requests#32708
Merged
gregcusack merged 4 commits intosolana-labs:masterfrom Aug 7, 2023
Merged
report received message signatures only on PUSH requests#32708gregcusack merged 4 commits intosolana-labs:masterfrom
gregcusack merged 4 commits intosolana-labs:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32708 +/- ##
=========================================
- Coverage 82.0% 82.0% -0.1%
=========================================
Files 784 784
Lines 210979 210980 +1
=========================================
- Hits 173026 173011 -15
- Misses 37953 37969 +16 |
behzadnouri
reviewed
Aug 4, 2023
Comment on lines
+681
to
+682
| if let GossipRoute::PushMessage = route { | ||
| if should_report_message_signature(&entry.value.signature) { |
Contributor
There was a problem hiding this comment.
why if let here?
This could be
if matches!(route, GossipRout::PushMessage)
&& should_report_message_signature(&entry.value.signature) {
Contributor
Author
There was a problem hiding this comment.
good point. will update
behzadnouri
approved these changes
Aug 6, 2023
mergify Bot
pushed a commit
that referenced
this pull request
Aug 9, 2023
* we only want to report received message signatures on PUSH requests, not PULL requests * woops accidently had it has LocalMessage not PushMessage * switch from match to if let statement * convert if let to matches macro (cherry picked from commit 8495257)
gregcusack
pushed a commit
that referenced
this pull request
Aug 9, 2023
…port of #32708) (#32772) report received message signatures only on PUSH requests (#32708) * we only want to report received message signatures on PUSH requests, not PULL requests * woops accidently had it has LocalMessage not PushMessage * switch from match to if let statement * convert if let to matches macro (cherry picked from commit 8495257) Co-authored-by: Greg Cusack <greg.cusack@solana.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Slight modification to PR: 32504
Problem
we want to track message coverage for push messages, not messages received via pull requests. Fixes this issue which was created in: PR: 32504.
Summary of Changes
update CrdsDataStats.record_insert() to accept a
GossipRouteenum. If GossipRoute is of variant GossipRoute::PushMessage, then check if we need to report this message to metricsFixes #