Become a Full Node Operator
This tutorial helps full node operators quickly synchronize with the Oraichain mainnet by downloading a storage snapshot prepared by the team. The downloading speed is much faster than synchronizing from the first block, which allows fast set up to join the network in no time!
curl -OL https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/docker-compose.yml && curl -OL https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/orai.env
With docker, your node can run on any platforms. As a result, it is a must to install and download Docker & docker-compose. Afterward, please type:
docker-compose pull && docker-compose up -d --force-recreate
Please enter the container and type:
oraid init "$MONIKER" --home /workspace/.oraid
then, you need to download the network's genesis file by using the following command inside your container:
wget -O /workspace/.oraid/config/genesis.json https://raw.githubusercontent.com/oraichain/oraichain-static-files/master/genesis.json
Download the latest chain data from a snapshot provider. Select the tab to the desired node type (Default or Pruned). A Pruned node will have the smallest disk size possible, but it will only keep the latest network state, which is recommended for sentry, seed nodes & light clients. Meanwhile, a Default node will store more network state history, but it will have larger size, which is suitable for validators.
docker-compose exec orai bash -c 'wget -O - <chain-dara-url> | tar -zxvf -'
After extracting the chain data, you need to move such data into the .oraid/ directory:
docker-compose exec orai bash -c 'mv /workspace/data/* /workspace/.oraid/data && mv /workspace/wasm/ /workspace/.oraid && rmdir /workspace/data'
Please exit the container and follow the below steps to start the nodes
docker-compose restart orai && docker-compose exec -d orai bash -c 'oraivisor start --p2p.pex false --p2p.persistent_peers "<node-id1>@<pubclic-ip1>:26656,<node-id2>@<public-ip2>:26656"'
If you do not specify the --p2p.persistent_peers flags, you must add at least a persistent peer connection in the .oraid/config/config.toml file before running the below command, otherwise your node will not be able to connect to the Oraichain network.
The above commands run as the background process so when you turn off your Terminal, it is still running. You can always run them in the foreground process by removing the "-d" flag.