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

Extract client code in send_transaction_service into a new structure #3423

Merged
merged 4 commits into from
Nov 5, 2024

Conversation

KirillLykov
Copy link

@KirillLykov KirillLykov commented Nov 1, 2024

Problem

In order to be able to use new client code in the SendTransactionService (see #3444), I need to wrap network-related code with the new structure ConnectionCacheClient.

Summary of Changes

To extract network code into a new structure, I had to move some auxiliary code into separate files.
Beside of that, changes are pretty minimal and I deliberately haven't tried to optimize existing code to keep changes minimal. It just does almost exactly the same as the old one.

@KirillLykov KirillLykov changed the title Klykov/extract client code Extract client code in send_transaction_service into a new structure Nov 1, 2024
Copy link

mergify bot commented Nov 1, 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.

@KirillLykov
Copy link
Author

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

1. Make sure it includes a complementary update to `rpc-client/` ([example](https://github.com/solana-labs/solana/pull/29558/files))

2. Open a follow-up PR to update the JavaScript client `@solana/web3.js` ([example](https://github.com/solana-labs/solana-web3.js/pull/2868/files))

Thank you for keeping the RPC clients in sync with the server API @KirillLykov.

Sounds wrong, I haven't changed any rpc calls. For rpc the only thing that has changed is probably passing connection_cache by value instead of reference.

@KirillLykov KirillLykov force-pushed the klykov/extract-client-code branch from 73778af to 213aa75 Compare November 4, 2024 07:05
@KirillLykov KirillLykov marked this pull request as ready for review November 4, 2024 07:07
@alessandrod alessandrod added the v2.1 Backport to v2.1 branch label Nov 4, 2024
Copy link

mergify bot commented Nov 4, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

@KirillLykov
Copy link
Author

@joncinque Do you think that this warning makes sense for these changes: #3423 (comment) ? This PR looks pretty innocent to me but would like to double check

@joncinque
Copy link

@joncinque Do you think that this warning makes sense for these changes: #3423 (comment) ? This PR looks pretty innocent to me but would like to double check

This is perfectly safe -- that rule is being triggered due to the change in rpc.rs, but the change here is not impacting the public API. Go for it!

@KirillLykov KirillLykov merged commit 144925e into anza-xyz:master Nov 5, 2024
52 checks passed
mergify bot pushed a commit that referenced this pull request Nov 5, 2024
…3423)

In order to be able to use new client code in the `SendTransactionService`, I need to wrap network-related code with the new structure ConnectionCacheClient.
To to that I also had to move some auxiliary code into separate files.

(cherry picked from commit 144925e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.1 Backport to v2.1 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants