-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Implement forwarding via TpuConnection #23817
Implement forwarding via TpuConnection #23817
Conversation
3333024
to
4f1bc56
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.
i think the nominal changes are looking pretty good. just a couple nits there. this PR got a little out of hand with the extraneous stuff again. PR numbers are cheap, use them! 😉
client/src/connection_cache.rs
Outdated
@@ -13,9 +14,15 @@ use { | |||
// Should be non-zero | |||
static MAX_CONNECTIONS: usize = 64; | |||
|
|||
#[derive(Clone)] | |||
enum Connection { |
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.
try to avoid doing these refactors in unrelated change sets. it makes review unnecessarily time consuming
client/src/tpu_connection.rs
Outdated
|
||
fn par_serialize_and_send_transaction_batch( | ||
&self, | ||
transaction_batch: &[VersionedTransaction], | ||
transactions: &[VersionedTransaction], |
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.
renames, also separate
core/src/voting_service.rs
Outdated
@@ -90,7 +90,7 @@ impl VotingService { | |||
|
|||
let mut measure = Measure::start("vote_tx_send-ms"); | |||
let target_address = target_address.unwrap_or_else(|| cluster_info.my_contact_info().tpu); | |||
let _ = get_connection(&target_address).serialize_and_send_transaction(vote_op.tx()); | |||
let _ = serialize_and_send_transaction(vote_op.tx(), &target_address); |
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 a merge conflict here against changes that Pankaj and Justin put in yesterday
1000 | ||
); | ||
|
||
if let Err(err) = res { |
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.
could res.is_err()
here and avoid de/restructuring
|
||
measure.stop(); | ||
inc_new_counter_info!( | ||
"banking_stage-forward-us", |
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.
"banking_stage-forward-us", | |
"banking_stage-forward-send-us", |
e2f566e
to
084c4ab
Compare
084c4ab
to
29496c1
Compare
(cherry picked from commit 6b85c21)
Problem
We want to forward transactions using Quic.
Summary of Changes
Changes packet forwarding to use the TpuConnection and the connection cache, so it can be switched between UDP and Quic.
Fixes #