Turn your node as validator
A validator node is a node that participates in the consensus process. Since a validator node is basically a replicator node promoted to a validator rank, if you currently do not have deployed your node yet, we recommend you to follow the Deploy your replicator node guide.
Requirements
To turn your replicator node into a validator node, a few requirements must be met.
- Having a running node which has not already been claimed (a freshly deployed node meets this requirement).
- Having a running operator, used to claim your node and stake. If not already deployed, visit the Deploy your operator guide.
- Having enough tokens to stake (currently 1M tokens minimum is required).
Turn your replicator node into a validator node
Step 1: Claim your node
To claim your node, go to your running operator and follow the instructions to claim your node. The operator will declare your node as related to your organization (hence, your organization has to be declared first). After this step, your node will be visible on the explorer page and shown as visible and claimed in your operator.
Step 2: Stake your tokens
After your node is declared, you can stake your tokens on your node. Be sure to have enough tokens to stake. Still on your operator, in the list of nodes related to your organization, fill the staking form to stake tokens.
Only one unstaking operation can be performed at a time for each node and is performed after 30 days after your unstaking request, so be sure to put the right amount of tokens before to release the unstake process.
Step 3: Governance approval
The chain is currently in a governance phase. For this reason, you need to wait for the governance approval of your node. No action is required from you at this step.
Next steps
Checking node status
To check if the node status is alive, you can proceed to the domain name associated where the node is deployed.
A list of endpoints should be displayed. Check one of our nodes, for example, at https://ares.testnet.carmentis.io.
Then, click on the status endpoint to check the node status and search for the is_catching_up and latest_block_height fields.
If the value of is_catching_up is true, the node is still catching up with the blockchain.
If the value is false and latest_block_height is defined, the node is up, synchronized and running.
Access to the logs
To check the logs of the node, you can use docker using the docker compose logs -f command.
Stop the node
To stop the node, run the following command:
docker compose down
Reset the node from scratch
To reset the node from scratch (like a fresh node), you can use the following command:
# down the ABCI and CometBFT containers
docker compose down node-abci node-cometbft
# clear the local data (be careful, this command will delete all the data, requiring a new synchronization)
cometbft unsafe-reset-all --home ./cometbft && rm -Rf abci
# restart the node
docker compose up -d
Update the CLI
To keep your CLI up-to-date, execute the following method:
npm update -g @cmts-dev/carmentis-cli
Security considerations
Based on the CometBFT documentation, for security reasons, the port (26658 by default) of the ABCI server handling CometBFT requests SHOULD NEVER be exposed (except for the CometBFT server).
Troubleshooting
The sudo command is not found
The sudo command does not exist when logged as root.
Either log in as a regular user to execute the commands or adapt the command by removing the sudo.
The curl and/or jq commands are not found
Ensure that you have installed curl and jq on your system using the following command:
sudo apt install curl jq
Operator requests end in 404
In development, if the request ends in 404, ensure that the operator listens at the right port by checking the logs. Indeed, when starting the operator, if the specified port is not available, the operator attempts to listen on another free port.
The workspace shows an operator connection error
When the workspace cannot establish a connection with the operator, it displays an error message. The problem might come from several issues:
- The operator server is not running.
- The operator server does not listen to the correct port. It might come from an invalid port specification in the configuration, from a port conflict (the operator tries another free port), or an invalid docker port mapping.
- The
Caddyfileis invalid if you have provided twice the same URL for the two servers or an invalid URL. - The DNS configuration is not updated. You might have to update the DNS configuration to point to the correct IP address.
Docker not permitted (permission denired while trying to connect to the docker API at unix:///var/run/docker.sock)
In a fresh install of Docker, you might be unable to execute the docker run --rm hello-world command.
To solve this issue, we highly recommend you to follow the official Docker documentation for post-installations.
For more convinience, you can run the following commands but remember to check the Official Docker documentation:
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
docker run --rm hello-world
The docker-compose command is not found
Have you tried docker compose?