Add quic-client module (#23166)

* Add quic-client module to send transactions via quic, abstracted behind the TpuConnection trait (along with a legacy UDP implementation of TpuConnection) and change thin-client to use TpuConnection
This commit is contained in:
ryleung-solana
2022-03-09 21:33:05 -05:00
committed by GitHub
parent 1fe0d6eeeb
commit 17b00ad3a4
18 changed files with 568 additions and 65 deletions

View File

@ -175,6 +175,8 @@ pub trait AsyncClient {
/// Send a signed transaction, but don't wait to see if the server accepted it.
fn async_send_transaction(&self, transaction: transaction::Transaction) -> Result<Signature>;
fn async_send_batch(&self, transactions: Vec<transaction::Transaction>) -> Result<()>;
/// Create a transaction from the given message, and send it to the
/// server, but don't wait for to see if the server accepted it.
fn async_send_message<T: Signers>(

View File

@ -1 +1,5 @@
pub const QUIC_PORT_OFFSET: u16 = 6;
// Empirically found max number of concurrent streams
// that seems to maximize TPS on GCE (higher values don't seem to
// give significant improvement or seem to impact stability)
pub const QUIC_MAX_CONCURRENT_STREAMS: usize = 2048;