Remove ThinClient from LocalCluster#977
Closed
gregcusack wants to merge 10 commits intoanza-xyz:masterfrom
Closed
Conversation
f2911e4 to
9b74bf6
Compare
Codecov Report✅ All 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 🚀 New features to boost your workflow:
|
ThinClient from LocalCluster
ed2cccf to
c34a494
Compare
18b9bb8 to
dc53a97
Compare
…n cache and leader tpu service from nonblocking tpuclient
… transfer_with_client
f69dd31 to
c514d4a
Compare
…ction_with_retries
c514d4a to
b86668f
Compare
Author
|
closed in favor of: #1300 |
This file contains hidden or 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
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
ThinClientis deprecated. Replacing withTpuClientSummary of Changes
Replace
ThinClientwithTpuClientinLocalClusterSpecifically, 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
ThinClientwithinLocalClusterwith 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 theLocalClustertests,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
ThinClientused 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 blockingTpuClientand 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_clientup 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.