Skip to content
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

Conversation

KirillLykov
Copy link

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

Copy link

mergify bot commented Nov 2, 2024

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/web3.js (example)

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()
Copy link
Author

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!();
Copy link
Author

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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtime is passed here

@KirillLykov
Copy link
Author

closed in favor of #3515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant