Become a Validator

Step by step guide to participate in Oraichain as a full node:

  1. 1.
    It is necessary to install Oraichain before going further.
  2. 2.
    Remove files and directories from the previously configured node (if has):
1
rm -rf .oraid/
2
3
rm -rf .oraicli/
4
5
rm -rf .oraifiles/
6
7
# rm -rf .images/
8
9
rm -rf .websocket/
10
11
rm go.sum
12
13
go get ./...
14
15
make install
Copied!
3. Initiate your full node with your moniker and the chain id of the Oraichain network:
1
oraid init <moniker-name> --chain-id Oraichain
2
oraid init ducpl --chain-id Oraichain
Copied!
4. Configure your CLI to eliminate the need to declare them as flags
1
oraicli config chain-id Oraichain
2
oraicli config output json
3
oraicli config indent true
4
oraicli config trust-node true
Copied!
5. We'll use the "test" keyring backend which saves keys unencrypted in the configuration directory of your project (defaults to ~/.oraid). You should never use the "test" keyring backend when you run your validator node on mainnet. About other options for keyring-backend, please check out https://docs.cosmos.network/master/interfaces/keyring.html for more information
1
oraicli config keyring-backend test
Copied!
6. Copy the genesis file of the network to .oraid/config/genesis.json
7. Add at least one persistent peer to retrieve all the blocks that have been committed from that peer.
1
persistent_peers = "<node-id>@<node-ip>:<node-port>"
2
persistent_peers = "[email protected]:26656"
Copied!
In order to collect node-id: oraid tendermint show-node-id
8. Run the full node:
1
oraid start
Copied!
9. Create a local account to interact with the network:
1
oraicli keys add <account-name>
2
oraicli keys add duc
Copied!
10. Use a genesis account to send some ORAI to the newly created account. This step must be done in order to broadcast the account onto the network
1
oraicli tx send <sender address> <receiver address> amount --from <account-name> --fees <orai>
2
oraicli tx send orai1xrmqwy0ssk7uxz4p5egkvj3lct958qjyfn5raq orai1mmj588ap4z948gz5mxuwwju3nwsn9hkhep7fz7 100000000000orai --from ducbean --fees 5000orai
Copied!
11. Create a new validator for your full node to receive ORAI tokens when committing a block:
1
oraicli tx staking create-validator --amount <orai> --pubkey <validator-pubkey> --moniker <your-moniker> --chain-id <network chain-id> --commission-rate <decimal> --commission-max-rate <decimal> --commission-max-change-rate <decimal> --min-self-delegation <integer> --gas <auto, integer> --gas-adjustment <decimal> --gas-prices <orai> --from duc
2
oraicli tx staking create-validator --amount 10000orai --pubkey oraivalconspub1addwnpepqvydmv22mkzc9rc92g43unew08cmj4q46dhk7vz0a9fj2xjsjn2lvqj0dfr --moniker ducphamle --chain-id Oraichain --commission-rate 0.10 --commission-max-rate 0.20 --commission-max-change-rate 0.01 --min-self-delegation 100 --gas auto --gas-adjustment 1.15 --gas-prices 0.025orai --from duc
Copied!
12. Start a Nodejs server (optional) to enable "Try it" feature for users
1
cd ./cosmosjs/
2
add a .env file for the server to run with a test account on Oraichain (the format should be similar to the env_example)
3
node index.js to start the server
Copied!
13. Start your websocket to include a reporter to report back to Oraichain
1
./websocket.sh <acc-name> <reporter-name>
Copied!
14. Install jq to process responses from the data sources (optional in case the data sources )
1
sudo apt install jq
Copied!
15. Install curl to call APIs provided by the providers (optional in case the data sources)
1
sudo apt install curl
Copied!
16. Happy validating !!
Note:
If Oraichain is still in the genesis phase, you can submit your genesis transaction to be a genesis validator as well as a genesis account. How to do:
1
oraid add-genesis-account $(oraicli keys show <acc-name> -a) 10000000000000orai
2
oraid gentx --amount 100000000orai --name duc --keyring-backend test --min-self-delegation 100
Copied!
put the validators into the genesis file so the chain is aware of the validators oraid collect-gentxs
Last modified 9mo ago
Copy link