-
Notifications
You must be signed in to change notification settings - Fork 254
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
Add tpu-client-next to SendTransactionService
#3444
Add tpu-client-next to SendTransactionService
#3444
Conversation
Also introduce TransactionClient, but don't use it in this commit.
It still uses ConnectionCacheClient everywhere
If this PR represents a change to the public RPC API:
Thank you for keeping the RPC clients in sync with the server API @KirillLykov. |
@@ -68,7 +68,7 @@ impl AsyncTaskSemaphore { | |||
lazy_static! { | |||
static ref ASYNC_TASK_SEMAPHORE: AsyncTaskSemaphore = | |||
AsyncTaskSemaphore::new(MAX_OUTSTANDING_TASK); | |||
static ref RUNTIME: Runtime = tokio::runtime::Builder::new_multi_thread() | |||
pub static ref RUNTIME: Runtime = tokio::runtime::Builder::new_multi_thread() |
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 idea is to use the same runtime in ConnectionCache
as in the tpu-client-next
. Since blocking ConnectionCache
uses this RUNTIME
static, the less invasive was to make it pub
and use where needed.
@@ -1508,7 +1568,11 @@ impl Validator { | |||
); | |||
|
|||
*start_progress.write().unwrap() = ValidatorStartProgress::Running; | |||
key_notifies.push(connection_cache); | |||
if config.use_tpu_client_next { | |||
unimplemented!(); |
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.
This is something I need to implement still
.tpu(Protocol::QUIC) | ||
.map_err(|err| ValidatorError::Other(format!("{err}")))?; | ||
let client = spawn_tpu_client_send_txs( | ||
&*RUNTIME, // use the same runtime as ConnectionCache |
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.
runtime is passed here
closed in favor of #3515 |
Problem
This PR is based on #3423
It adds a new client type to the SendTransactionService and instruments tests to use both.
Summary of Changes