Skip to main content

Claim and stake your node

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.

As any object in the blockchain, a node is modelled as a virtual blockchain and you have to declare a new virtual blockchain for each node you want to deploy. A node virtual blockchain is linked to an organization, itself linked to an account. For this reason, you have to declare account and organization virtual blockchains before deploying your node. Once your organization is published on-chain, you can declare your node. We have depicted below the hierarchical structure of the account, organization and applications blockchain objects.

Overview of the process

The process to turn your replicator node into a validator node is quite simple depicted below.

  1. The first step is to claim your node. This step involves that you have already tokens (at least 1M tokens) and that you have an organization on Carmentis Desk. If you do not have tokens yet, go to the BROKEN LINK: faucet to purchase them.
  2. Once your node is claimed, it is time to stake your tokens. Provide the amount of tokens you want to stake and click on the Stake button.
Processing delay

The staking process can take few seconds to apply, please refresh the page to check the status.

  1. Once staked, no further action is required from you. Congrats 🥳!
Governance approval

Currently, the chain is in a permissionned phase. So the governance approval is required to promote your node to a validator. It might take at most a few days to be approved.

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.

Unstaking process

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 Caddyfile is 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?