-
Notifications
You must be signed in to change notification settings - Fork 4.6k
validator: add set-public-tpu-address
command
#30452
Conversation
c606c72
to
9348da9
Compare
This overall seems reasonable to me, but to be honest, I'm not an expert in this area. The one issue I see is the invalidation of the previous TLS certificate created at startup at Line 61 in d2fc2e5
|
The QUIC connection cache currently fills in the IP address, but it is unused for connection lookup on the server side. That being said, it'll be best to update the client cert to make it future proof. This new argument will be available for a non RPC (full) node as well. But looks like it will not actually set the TPU address. I find it a bit confusing. |
This argument isn't new. There's a This TPU address is only used to broadcast it through gossip. Other nodes use it to send packets to, kind of like a balancer before the node. A listen service on this address has to forward those packets to the node, possibly after performing some work on them. I didn't think it needs a cert for this purpose. |
The node binds to the address provided via I agree that the QUIC cert doesn't need to be updated for the balancer case. But, the option name, description and details must be updated to prevent someone from accidentally misconfiguring their node. |
I was surprised to read this, but the node doesn't actually bind to the Here's where the socket is bound to solana/gossip/src/cluster_info.rs Lines 3010 to 3011 in d2fc2e5
solana/gossip/src/cluster_info.rs Line 3053 in d2fc2e5
Either way, I agree that we should be consistent, and probably change the command to |
Thanks @joncinque for looking into it, looks like I misread the code regarding this. |
@diman-io, @joncinque and I had a quick sync up on this. So, the issue is that the IP address in the QUIC server cert uses the TPU IP address from the gossip record. Since this option changes the IP in gossip, the value in the cert will not match the IP to with the TPU is actually binding. Currently the IP field in the cert is unused. But it could change in future. So for consistency sake, we should fill the correct IP in the cert. I'll file an issue and we can handle it in a separate PR. This PR should be good to go, but let's rename the CLI argument and description with more details. An uninformed node operator could use the option incorrectly and misconfigure their node (for example, when there is no balancer). |
fix style nits
set-tpu
commandset-tpu-host-addr
command
Codecov Report
@@ Coverage Diff @@
## master #30452 +/- ##
=========================================
- Coverage 81.5% 81.5% -0.1%
=========================================
Files 729 729
Lines 206185 206212 +27
=========================================
- Hits 168235 168188 -47
- Misses 37950 38024 +74 |
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 looking close, just a few bits to clean up
I am confused what this actually do. |
set-tpu-host-addr
commandset-tpu-host-address
command
The validator always listens on its "default" TPU port. However, by using the This pull request adds the capability to change the TPU address while the validator is running, without needing to restart it. |
Ok, then this is going to be pretty confusing. Can you put above as comments where needed in the code. |
I looked and found that the validator has the following address-related arguments:
Early in this PR I already changed As for the explanations, I think the ones in the validator's help are informative enough:
and
@behzadnouri Could you please review? |
set-tpu-host-address
commandset-public-tpu-address
command
(cherry picked from commit 9136f80)
Problem
Only one way to change this now is to restart a validator.
Also it could prove useful for the watchdog in the event of a remote service failure.
Also I have a question about tpu-forward #30451
Summary of Changes
Add
set-public-tpu-address
subcommand tosolana-validator
.