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 |
* 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
| coalesce, | ||
| true, | ||
| in_vote_only_mode.clone(), | ||
| false, // unstaked connections |
There was a problem hiding this comment.
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.
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.
| PACKET_COALESCE_DURATION, | ||
| true, // use_pinned_memory | ||
| None, // in_vote_only_mode | ||
| false, |
There was a problem hiding this comment.
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.
| packet_batch | ||
| .iter_mut() | ||
| .for_each(|p| p.meta_mut().set_from_staked_node(is_staked_service)); |
There was a problem hiding this comment.
There was a problem hiding this comment.
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).