fix(pd): look up listenaddr from tm rpc #2602
Merged
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.
When joining a testnet,
pd
will inspect the RPC endpoint for the bootstrap node and copy its known peers into the generated Tendermint config. To date, since #1847, that logic has also interpolated an incorrect address for the bootstrap node (by default currentlytestnet.penumbra.zone:26657
): the RPC address shouldn't be used, the P2P address should be. This is particularly important when as we move toward updating our configs to default to HTTPS: we can no longer assume that the host portion of a service URL will be the same between the RPC and P2P endpoints. Instead, let's use the RPC to inspect what the correct ListenAddress is.Testing and review
First, verify the misbehavior on main branch:
Observe that the first host in there is
rpc.testnet.penumbra.zone:26656
, which won't work: 26656 isn't even open on that IP. Next, try it on this feature branch:Observe that the first host in there is no longer a DNS name, but an IP address. Critically, the IP address is not the same as that for the RPC service:
Instead, the first node in the TM config should be
35.226.255.25:26656
, which maps to the exposed p2p port for the tendermint service on fn-0 in the testnet deployment.