-
Notifications
You must be signed in to change notification settings - Fork 389
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
v1.18: BankingStage Forwarding Filter (backport of #685) #697
Conversation
Cherry-pick of 1744e9e has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v1.18 #697 +/- ##
=======================================
Coverage 81.5% 81.6%
=======================================
Files 827 827
Lines 224833 224844 +11
=======================================
+ Hits 183440 183491 +51
+ Misses 41393 41353 -40 |
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.
lgtm
* add PacketFlags::FROM_STAKED_NODE * Only forward packets from staked node * fix local-cluster test forwarding * review comment * tpu_votes get marked as from_staked_node (cherry picked from commit 1744e9e) # Conflicts: # sdk/src/packet.rs
69dd216
to
91bbcbb
Compare
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.
r+ ci. only difference from previous approvals is removing test hacks in favor of a more appropriate fix in #724
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.
lgtm
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.
LGTM
@@ -190,6 +191,7 @@ impl FetchStage { | |||
coalesce, | |||
true, | |||
in_vote_only_mode.clone(), | |||
false, // unstaked connections |
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.
The convention is that the trailing comment should be the argument name; is_staked_service
here.
This is kind of "double negative" and confusing. Does "false unstaked" mean "staked"?
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.
there's already instances of both "explanation" style comments on bool arguments, as well as "name" style comments.
This is a backport, keep it the same as the original. If we feel strongly enough about the style we should be making modifications to master, not in a backport PR.
@@ -171,6 +171,7 @@ impl ShredFetchStage { | |||
PACKET_COALESCE_DURATION, | |||
true, // use_pinned_memory | |||
None, // in_vote_only_mode | |||
false, |
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.
Please follow the code style.
The comments makes the life of someone reading this code a lot easier and also makes bugs/mistakes less likely.
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.
see above.
packet_batch | ||
.iter_mut() | ||
.for_each(|p| p.meta_mut().set_from_staked_node(is_staked_service)); |
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.
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.
clippy didn't flag it, see above comment about style.
…a-xyz#697) * BankingStage Forwarding Filter (anza-xyz#685) * add PacketFlags::FROM_STAKED_NODE * Only forward packets from staked node * fix local-cluster test forwarding * review comment * tpu_votes get marked as from_staked_node (cherry picked from commit 1744e9e) # Conflicts: # sdk/src/packet.rs * resolve conflict * revert: local-cluster test changes --------- Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com> Co-authored-by: Trent Nelson <trent@solana.com>
Problem
Summary of Changes
Fixes #
This is an automatic backport of pull request #685 done by [Mergify](https://mergify.com).