forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Remove ThinClient
from LocalCluster
#977
Closed
gregcusack
wants to merge
10
commits into
anza-xyz:master
from
gregcusack:remove-thin-client-from-local-cluster-v5
Closed
Remove ThinClient
from LocalCluster
#977
gregcusack
wants to merge
10
commits into
anza-xyz:master
from
gregcusack:remove-thin-client-from-local-cluster-v5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gregcusack
force-pushed
the
remove-thin-client-from-local-cluster-v5
branch
from
April 22, 2024 22:38
f2911e4
to
9b74bf6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #977 +/- ##
=======================================
Coverage 82.1% 82.1%
=======================================
Files 893 893
Lines 236936 236931 -5
=======================================
+ Hits 194705 194720 +15
+ Misses 42231 42211 -20 |
gregcusack
changed the title
Remove thin client from local cluster v5
Remove thin client from local cluster
Apr 23, 2024
gregcusack
changed the title
Remove thin client from local cluster
Remove Apr 23, 2024
ThinClient
from LocalCluster
gregcusack
force-pushed
the
remove-thin-client-from-local-cluster-v5
branch
2 times, most recently
from
April 24, 2024 20:40
ed2cccf
to
c34a494
Compare
gregcusack
force-pushed
the
remove-thin-client-from-local-cluster-v5
branch
4 times, most recently
from
May 8, 2024 23:56
18b9bb8
to
dc53a97
Compare
…n cache and leader tpu service from nonblocking tpuclient
… transfer_with_client
gregcusack
force-pushed
the
remove-thin-client-from-local-cluster-v5
branch
2 times, most recently
from
May 9, 2024 23:30
f69dd31
to
c514d4a
Compare
…ction_with_retries
gregcusack
force-pushed
the
remove-thin-client-from-local-cluster-v5
branch
from
May 10, 2024 15:29
c514d4a
to
b86668f
Compare
closed in favor of: #1300 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A Followup PR to: #258.
This is the 10th PR on the way to remove ThinClient completely.
Problem
ThinClient
is deprecated. Replacing withTpuClient
Summary of Changes
Replace
ThinClient
withTpuClient
inLocalCluster
Specifically, we use a Quic TpuClient, not a UDP TpuClient
Notes
This works but I can't say for sure why it works.
I had initially replaced all of
ThinClient
withinLocalCluster
with the nonblocking version ofTpuClient
. I had made the switch such thattransfer_with_client()
callsTpuClient.try_send_transaction()
which callssend_wire_transaction_to_addr()
.send_wire_transaction_to_addr()
uses a non-blocking connection from the connection_cache to send the transaction.However, using the changes above, I consistently ran into an issue with any test that called
add_validator()
more than once. Under the hood,add_validator()
callstransfer_with_client()
.transfer_with_client()
transfers some amount of lamports to a destination account (aka the account associated with the validator we are trying to add). However in theLocalCluster
tests,transfer_with_client()
would consistently fail when adding the second validator withadd_validator()
. It would always fail with:transport custom error: "ConnectError(EndpointStopping)
.I noticed that
ThinClient
used a blocking connection when sending transactions withretry_transfer()
(which was used to send a transaction withintransfer_with_client()
. So, I switched over to using the blockingTpuClient
and that seems to work well. I had to make a few changes to expose the leader schedule, connection cache, and fanout slots from thenonblocking/tpu_client
up to the blockingtpu_client
.I am still working on investigating. But thinks its probably a good idea to get some eyes on this since it does work as expected now.