Become a Validator

In this tutorial you will learn how to stake fiamma token and become a fiamma validator

Prerequisites

Having a full node setup and synced by following this guide

You need to register your validator address as a bitvm staker, so that you can continue with the registration process.

1. Create a Keyring and Get Funds

The Getting Testnet Tokens page contains detailed instructions on how to create a keyring and get funds for it through a faucet.

2. Get Validator Pub Key

You can get the validator pubkey for the current node using the following command. You'll need to write it down. It will be needed next when creating the validator json file

fiammad tendermint show-validator

3. Get Node Moniker

You can get the node moniker for the current node using the following command. You'll need to write it down. It will be needed next when creating the validator json file

fiammad config get config moniker

4. Create A Validator Config File

You can modify the information of your validator as you wish, the following is just an example

You can find the pubkey by Get Validator Key.

You can find the moniker by Get Node Moniker

cat << EOF > ~/.fiamma/config/validator.json
{
	"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"QiZohv1ATkoaiBvH3aKNryXIw5026xHZAWuqOuR0rWQ="},
	"amount": "1000000ufia",
	"moniker": "test-node",
	"commission-rate": "0.1",
	"commission-max-rate": "0.2",
	"commission-max-change-rate": "0.01",
	"min-self-delegation": "1"
}
EOF

5. Staking And Become A Validator

Now you can create a pledge transaction to complete the creation of the validator

fiammad tx staking create-validator ~/.fiamma/config/validator.json --from $KEYNAME --keyring-backend test --chain-id fiamma-testnet-1 --node "https://testnet-rpc.fiammachain.io/" --fees 2000ufia

6. Show Your Validator Addr

You can get your validator address with the following command

fiammad keys show $KEYNAME --keyring-backend test -a --bech val

where $KEYNAME is the name of the key that you used for the self-delegation (e.g. my-key on our example).

7. Query Your Validator staking

Use the above command to get the validator address, then you can check if your validator is staking successfully

fiammad query staking validator $ADDR

If all goes well, you should see a response indicating the parameters that you specified on the create-validator transaction.

Last updated