-
Notifications
You must be signed in to change notification settings - Fork 231
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
TPU Vote using quic -- client side implementation #3473
base: master
Are you sure you want to change the base?
Conversation
2963099
to
c36b5a1
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.
few minor things, but looks good overall!
Vote using QUIC send vote packet using the rigth sender removed dup declared functions rebase with master QuicServerParams removed remove_tpu_vote first part of sending votes using quic use quic for vote on client side with connection cache add debug messages turn on quic for vote by default for testing
e474eff
to
b9e663d
Compare
@behzadnouri @bw-solana Can you please take another look at this PR? Thanks! |
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.
Probably better to do some stress tests that the UDP path has not become accidentally any slower before merging. thanks.
match client.send_data_async(buf) { | ||
Ok(_) => Ok(()), | ||
Err(err) => { | ||
trace!("Ran into an error when sending vote: {err:?} to {tpu:?}"); | ||
Err(GossipError::SendError) | ||
} | ||
} |
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.
probably better:
client.send_data_async(buf).map_err(|err| { /* ... */ })
let _ = send_vote_transaction( | ||
cluster_info, | ||
vote_op.tx(), | ||
Some(tpu_vote_socket), | ||
&connection_cache, | ||
); | ||
} | ||
} else { | ||
// Send to our own tpu vote socket if we cannot find a leader to send to | ||
let _ = cluster_info.send_transaction(vote_op.tx(), None); | ||
let _ = send_vote_transaction(cluster_info, vote_op.tx(), None, &connection_cache); |
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.
should we introduce a metric/counter for the errors here?
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 will address it in another PR: #3894
Will do. |
Problem
TPU vote using QUIC.
Summary of Changes
Use Connection cache to encapsulate sending TPU vote via either QUIC or UDP.
Introduced a validator flag to control if to send TPU vote via QUIC -- the default is false -- meaning using UDP. The default should have no impacts on TPU vote sending
Tests:
Tests have been done to turn DEFAULT_VOTE_USE_QUIC to true -- meaning sending TPU votes via QUIC only.
This is done in test PR: #3571. Showing CI results are okay.
Further I disabled votes in gossips -- to ensure only sending votes via TPU vote using QUIC. The GCE cluster launched with this configuration is still functioning as expected. Metrics in connection_cache_vote_quic and quic_streamer_tpu_vote shows votes streams sent and received on the client and server side respectively.
Fixes #