Cronos POS Chain Mainnet: Running a Validator
This is detailed documentation for setting up a Validator on Cronos POS Chain mainnet. Note that while anyone can set up a validator, only the top 100 validators are considered "active" and eligible to receive rewards. See FAQs for more info.
Step 0: Notes on network upgrades
There are two ways to set up a node:
For the host who would like to build a Validator with complete blockchain data from scratch,
Note that there were several breaking network upgrades, requiring upgrading at designated block heights. For more details on upgrading, we refer to this guide on running a full node.
Once you have a complete synced node, you can revisit this page and jump to the step of joining the networking as a validator.
For hosts who would like to join the network and start validating quickly, one can:
Begin with the binary
v3.3.9
and join the network bySTATE-SYNC
To simplify this guide, we will be covering the second case here in this guide, and guide you to begin with binary v3.3.9
and join the network by STATE-SYNC
.
Pre-requisites
Supported OS
We officially support macOS, Windows and Linux only. Other platforms may work, but there is no guarantee. We will extend our support to other platforms after we have stabilized our current architecture.
Prepare your machine
For Cronos POS Chain mainnet, you will need a machine with the following minimum requirements to run different types of nodes:
Archive Node (setting pruning = nothing)
RAM: 64GB (Rocksdb)
Disk: 3.4TB
CPU: 4 cores
Default Full Node (setting pruning = default)
RAM: 64GB (Rocksdb) or 16GB (goleveldb)
Disk: 1.2TB (From quick sync)
CPU: 4 cores
Pruned Node (setting pruning = everything)
RAM: 64GB (Rocksdb) or 16GB (goleveldb)
Disk: 40GB (From quick sync)
CPU: 4 cores
Please note that the size of snapshots from Quicksync will keep growing.
Step 1. Get the Cronos POS Chain Mainnet binary
Remarks: The following is the minimal setup to join Cronos POS Chain Mainnet. Furthermore, you may want to run full nodes as sentries (see Tendermint), restrict your validator connections to only connect to your full nodes, use secure storage and key management service for your validator keys, etc.
To simplify the following step, we will be using Linux for illustration. Binary for Mac and Windows are also available.
There are two options to install chain-maind
:
Option 1 - Install chain-maind
released binaries from GitHub
chain-maind
released binaries from GitHubTo install Cronos POS Chain binaries from Github:
You can verify the installation by checking the version of the chain-maind, the current version is
3.3.9
.
OR
Option 2 - Install chain-maind
by homebrew
chain-maind
by homebrewReminder:
If you plan to play around with different networks (mainnet and testnet), we suggest you follow the
Option 1
to download the binary directly.The binary downloaded from homebrew is only for interacting with mainnet. You cannot use it to interact with testnet.
To install binaries in Homebrew for macOS X or Linux
Homebrew is a free and open-source package management system for macOS X. Install the official Chain-maind formula from the terminal.
First, install the
crypto-org-chain
tap, a repository of our Homebrewchain-maind
package:
Now, install the
chain-maind
with crypto-org-chain/chain-maindYou can verify the installation by checking the version of the
chain-maind
Step 2. Configure chain-maind
chain-maind
Before kick-starting your node, we will have to configure the node so that it connects to the Cronos POS Chain mainnet
NOTE
Depending on your
chain-maind
home setting, thechain-maind
configuration will be initialized to that home directory. To simply the following steps, we will use the default chain-maind home directory~/.chain-maind/
for illustration.You can also put the
chain-maind
to your binary path and run it directly bychain-maind
Step 2-1. Initialize chain-maind
chain-maind
First of all, you can initialize chain-maind by:
This
moniker
will be the displayed ID of your node when connected to the Cronos POS Chain network. When providing the moniker value, make sure you drop the square brackets since they are not needed.
Step 2-2. Configure chain-maind
Download and replace the Cronos POS Chain mainnet
genesis.json
by:In
~/.chain-maind/config/app.toml
, update minimum gas price to avoid transaction spamming
Reminder: The list of the seed
is subject to change, you can also find the latest seed to connect here.
Step 2-3. Enable STATE-SYNC
With STATE-SYNC your node will download data related to the head or near the head of the chain and verify the data. This leads to drastically shorter times for joining a network for validators. For the validator, it will be amazingly fast to sync the near head of the chain and join the network. ::: warning CAUTION Blocks before state-sync trust height
will NOT be queryable. If you want to run a full node or a validator with complete blockchain data; It is not suggested to use state-sync. Kindly refer to this guide on building a node with complete data. ::: Follow the below steps to enable state-sync:
For state-sync configuration, in
~/.chain-maind/config/config.toml
, please modify the configurations under [statesync]enable
,rpc_servers
,trust_height
andtrust_hash
and addpersistent_peers
by:NOTE
For Mac environment, if
jq
is missing, you may install it by:brew install jq
We suggest using
persistent_peers
instead ofseeds
to provide a stable state-sync experience.
Step 3. Run everything
Step 3-1. Run everything
Once the chain-maind
has been configured, we are ready to start the node and sync the blockchain data:
Start
chain-maind
, e.g.:
OR
(Optional for Linux) If you would like to have it running in the background, you can start
chain-maind
withsystemd
service, e.g.:
Example: /etc/systemd/system/chain-maind.service created by script
It should begin fetching blocks from the other peers. Please wait until it is synced before moving onto the next step.
Remarks:
You can query the node syncing status by
If the above command returns
false
, it means that your node is synced; otherwise, it returnstrue
and implies your node is still catching up.
Step 3-2. Joining the network as a validator: Send a create-validator
transaction
create-validator
transactionOnce the node is synced, we are now ready to send a create-validator
transaction and join the network, for example:
You will be required to insert the following:
--from
: Thecro...
address or the key name that holds your funds for initial delegation;--amount
: The amount of self-delegation provided to the validator as an initial staking;--pubkey
: The validator public key. Can be found using./chain-maind tendermint show-validator
.;--moniker
: A moniker (name) for your validator node;--security-contact
: Security contact email/contact method, it is strongly recommended to provide an email address for receiving important messages related to validator operation in the future;--chain-id=
: The chain-id of mainnet - crypto-org-chain-mainnet-1--commission-rate
: The commission rate charge on the delegator;--commission-max-rate
: The upper bound of the commission rate;--commission-max-change-rate
: The maximum daily increase of the validator commission. Please note this parameter cannot be changed after create-validator is processed;--min-self-delegation
: The lower threshold of validator's self-delegation amount, if the self-delegation drops below this number, all staked funds to the validator will be automatically unbonded and the validator will be inactive. :::
Step 3-3. Check your validator status
Once the create-validator
transaction completes, you can check if your validator has been added to the validator set:
You can also check your public key by:
To further check if the validator is signing blocks, kindly run this script, for example:
Congratulations! You've successfully set up a mainnet node and performed some basic transactions! You may refer to Wallet Management for more advanced operations and transactions.
Basic Transactions and queries
query bank balances
- Check your transferable balance
query bank balances
- Check your transferable balanceYou can check your transferable balance with the balances
command under the bank module.
Example: Check your address balance
tx bank send
- Transfer operation
tx bank send
- Transfer operationTransfer operation involves the transfer of tokens between two addresses.
Send Funds [tx bank send <from_key_or_address> <to_address> <amount> <network_id>
]
tx bank send <from_key_or_address> <to_address> <amount> <network_id>
]Example: Send 10cro from one address to another.
tx staking
- Staking operations
tx staking
- Staking operationsNOTE
To get the 'validator-addr' with bech32 prefix, you can run this command:
Staking operations involve the interaction between an address and a validator. It allows you to create a validator and lock/unlocking funds for staking purposes.
Delegate your funds to a validator [tx staking delegate <validator-addr> <amount>
]
tx staking delegate <validator-addr> <amount>
]To bond funds for staking, you can delegate funds to a validator by the delegate
command. Note that you can look up validators and their operator address by the validator list on the explorer.
Example: Delegate funds from Default
to a validator under the operator address crocncl16k...edcer
Unbond your delegated funds [tx staking unbond <validator-addr> <amount>
]
tx staking unbond <validator-addr> <amount>
]On the other hand, we can create an Unbond
transaction to unbond the delegated funds
Example: Unbond funds from a validator under the address crocncl16k...edcer
Once your funds are unbonded, they will be locked until the unbonding_time
has passed.
Reward-related transactions and queries
After you have delegated or created a validator, the reward will be accumulated, you can check/ withdraw it by:
query distribution validator-outstanding-rewards
- Query un-withdrawn rewards for a validator
query distribution validator-outstanding-rewards
- Query un-withdrawn rewards for a validatorWe can check the distribution outstanding (un-withdrawn) rewards for a validator and all of their delegations by operator address.
Example: Check all outstanding rewards under the operator address crocncl1...zrf8
tx distribution validator-outstanding-rewards
- Query un-withdrawn rewards for a validator
tx distribution validator-outstanding-rewards
- Query un-withdrawn rewards for a validatorWe can check the distribution outstanding (un-withdrawn) rewards for a validator and all of their delegations by operator address.
Example: Withdraw all outstanding under a delegation address:
Slashing related transaction
tx slashing unjail
- Unjail a validator
tx slashing unjail
- Unjail a validatorValidator could be punished and jailed due to network misbehaviour, we can check the jailing status of a validator, for example:
Where "jailed": true
implies that the validator has been jailed. After the jailing period has passed, one can broadcast a unjail
transaction to unjail the validator and resume its normal operations by
Last updated