Skip to main content

Joining a Network

Cleaning up#

Let's first cleanup our network. This is needed if you already have a genesis file.

rm -rf ~/.archway

This command will remove all data and configs you already set.

Initialize the node#

Run the following command to initialize the genesis file which is required to establish a network.

docker run --rm -it -v ~/.archway:/root/.archway archwaynetwork/archwayd:$NETWORK_NAME \  init my-validator --chain-id my-chain

Retrieve the Genesis file#

Download the genesis file from a validator node:

curl -s "$RPC_ENDPOINT/genesis" | jq '.result.genesis' > ~/.archway/config/genesis.json

Initialize account#

Create a key to hold your account. Once you run this command, your may be prompted with a password dialogue. Please enter a new password for your account.

docker run --rm -it -v ~/.archway:/root/.archway archwaynetwork/archwayd:$NETWORK_NAME \  keys add my-validator-account

Join the network#

Start the archway and join the network

docker run --rm -it -v ~/.archway:/root/.archway archwaynetwork/archwayd:$NETWORK_NAME \  start \  --x-crisis-skip-assert-invariants  --p2p.seeds [email protected]_Name_OR_IP1:PORT1, ..[email protected]_Name_OR_IPN:PORTN \

Joining a testnet#

To initialize a node for existing testnets, you'll need the parameters for the Chain ID, RPC Endpoint and P2P Seeds. See the Networks page to find parameters for all networks currently available.