Module pd::testnet::join

source ·
Expand description

Logic for onboarding a new pd node onto an existing testnet. Handles generation of config files for pd and tendermint.

Functions§

  • Query the Tendermint node’s RPC endpoint at tm_url and return the listener address for the P2P endpoint. Returns an Option because it’s possible that no p2p listener is configured.
  • Query the Tendermint node’s RPC endpoint at tm_url and return a list of all known peers by their external_addresses. Omits private/special addresses like localhost or 0.0.0.0.
  • Extract a TendermintAddress obtained from the RPC /net_info endpoint. The raw value is a String formatted as:
  • Bootstrap a connection to a testnet, via a node on that testnet. Look up network peer info from the target node, and seed the tendermint p2p settings with that peer info.
  • Download a gzipped tarball from a URL, and extract its contents as the starting state config for the fullnode. Allows bootstrapping from archived state, which is useful for nodes joining after a chain upgrade has been performed.