Joining a testnet
In order to join the test network you will need to have the correct version of the fetchd ledger available on your system.
Using a local version
Assuming that you have followed the installation guide. You should now have
fetchd successfully installed in your path. You can check this with the following command:
This should print a version number that must be compatible with the network you're connecting to (see the network page for the list of supported versions per network).
Configuring the client fetchd
In general to configure the CLI to point at a given network it needs as a minimum the following configuration values
In the case of the Capricorn network this would be as follows:
Configuring the server
Initialize fetchd by running command. This setups a default / empty genesis configuration.
This will initialize default configuration files under the
FETCHD_HOMEfolder, which default to
Execute the following command to download the latest genesis file:
Finally connect fetchd to the network by getting it to connect to a seed node for the given network.
Less abstractly then, if you wants to connect to the Capricorn test net for example, you would need to run the following steps:
# init fetchd init my-first-fetch-node --chain-id capricorn-1 # genesis curl https://rpc-capricorn.fetch.ai:443 | jq '.result.genesis' > ~/.fetchd/config/genesis.json # start fetchd start --p2p.seeds=[email protected].ai:36956
Your local node will then start to synchronise itself with the network, replaying all blocks and transactions up to the current block. Depending on the age of the network and your hard disk speed, this could take a while. Consider using chain snapshots to speed up this process.
To know when your node as finished syncing, you can query it's status from its RPC API: