Skip to content
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
gregcusack:rm-coverage-reporting-on-pull-reqs
Aug 7, 2023
Merged

report received message signatures only on PUSH requests#32708
gregcusack merged 4 commits intosolana-labs:masterfrom
gregcusack:rm-coverage-reporting-on-pull-reqs

Conversation

@gregcusack
Copy link
Copy Markdown
Contributor

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 GossipRoute enum. If GossipRoute is of variant GossipRoute::PushMessage, then check if we need to report this message to metrics

Fixes #

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 4, 2023

Codecov Report

Merging #32708 (9c784bc) into master (20fc3a5) will decrease coverage by 0.1%.
Report is 10 commits behind head on master.
The diff coverage is 100.0%.

@@            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     

@gregcusack gregcusack requested a review from behzadnouri August 4, 2023 16:28
Comment thread gossip/src/crds.rs Outdated
Comment on lines +681 to +682
if let GossipRoute::PushMessage = route {
if should_report_message_signature(&entry.value.signature) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why if let here?
This could be

if matches!(route, GossipRout::PushMessage) 
    && should_report_message_signature(&entry.value.signature) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. will update

@gregcusack gregcusack merged commit 8495257 into solana-labs:master Aug 7, 2023
@gregcusack gregcusack deleted the rm-coverage-reporting-on-pull-reqs branch August 7, 2023 04:10
@gregcusack gregcusack added the v1.16 PRs that should be backported to v1.16 label Aug 9, 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

v1.16 PRs that should be backported to v1.16

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants