CUDOS Validator Setup Guide

The Cudos Network is a special-purpose blockchain designed to provide high-performance, trust-less, permission-less cloud computing for all.

You want to start validating for CUDOS? Then you’ve come to the right place! The following is a detailed step-by-step guide on how to set up your very own validator in CUDOS.

At this point, we’re going to deviate from the official documentation and go with CentOS.

0) Environment Setup

The environment setup is meant to be done on all host machines. Hardware requirements can be found here. Once you’ve spun up a host machine, please follow the steps below.

If you’ve just started with this tutorial, start with spinning up a validator machine.

First, we need to install a couple of tools.

Now, let’s create a workspace in the $HOME directory and cd into it.

Next, we need to clone CudosNode, CudosBuilders and CudosGravityBridge.

Build the docker image for CudosBuilders.

1) Validator Setup

Alright, it’s time to get down to the nitty-gritty. The validator setup entails setting up three components:

  • The CUDOS validator, which participates in on-chain consensus by voting on and proposing blocks, and which is used by the orchestrator to make its call against the CUDOS chain
  • The Gravity Bridge Orchestrator, which manages the token flow between CUDOS and Ethereum
  • An Ethereum full node, which is used by the orchestrator to make its calls against Ethereum

First, spin up a new host machine (see “Ethereum node” hardware requirements).

Alternatively, you can also use your own Ethereum full node, in which case you can skip to 1.2). Just make sure not to use Infura.

Reminder: Complete the “0) Environment Setup” before you continue with the steps below.

Running an Ethereum node is pretty straightforward.

Note, that syncing the Rinkeby blockchain might take hours/days. You can view the logs by running the following command.

First, spin up a new host machine (see “Validator node” hardware requirements). We’re going to initialize a CUDOS full node on it, which we’ll later configure to become a validator.

Reminder: Complete the “0) Environment Setup” before you continue with the steps below.

If everything went well, there should be a ~/cudos/CudosData directory.

Let’s also make sure all files were generated properly.

Copy and paste the node ID into a text file on your local computer. You’ll be needing it shortly.

Looking good so far. Now, in order to get peers, it is best practice to spin up a sentry node on another host machine.

  • Repeat the “0) Environment Setup” step on the sentry node.
  • Follow the official Sentry Setup Guide.
    For step 6, you’ll need the validator’s node ID from the text file mentioned above, and the validator’s public IP address. Make sure port 26656 is open for in- and outbound connections. For now, you don’t have to enter any other peer addresses other than you validator’s.
  • Get the sentry’s node ID, copy and paste it into a text file on your local computer. You’ll be needing it shortly.
  • Ideally, you’ll want to set up at least two sentry nodes for effective DDoS protection. Just repeat the three steps above on another host machine.

Optional: Set up a seed node. We’ll skip this step in this guide, though.

Now that we have set up our sentries, we need to add them as peers to our validator node.

Alright, it’s time to start the full node.

At this point, since we’ve only started the full node a few moments ago, it’s still going to be syncing the blockchain. Depending on your hardware and the size of the blockchain, this might take hours/days. You can check the sync status using the following commands.

In the meantime, we can create an account, which is needed to interact with the blockchain. We’re going to create one using the web extension Keplr. Please follow this guide.

Don’t forget to back up the mnemonic phrase and store it in a safe place!

Once the node has caught up, we can import our validator account that we’ve just created in Keplr. For that, we’ll need to access the validator’s container shell.

Then, please execute the following command, which will ask you the enter the mnemonic phrase.

To check if the key was successfully added, use the following command, which should list a “validator” key.

Before we can create our validator on-chain, it needs some tokens that it can self-stake, so it can actually become a validator and partake in consensus.

Once you have some tokens, we can now create the validator on-chain using the following command.

  • <STAKE> must be at least 1000000000000000000acudos (=1 CUDOS)
  • <YOUR_MONIKER> must be the same moniker you provided in ~/cudos/CudosBuilders/docker/full-node/full-node.client.testnet.public01.env
  • <CHAIN_ID> should be cudos-testnet-public for testnet (TBD for mainnet)
  • <COM_RATE> is the percentage of commission you want to take from all rewards, i.e. 0.10 means that you’ll take 10% of all rewards generated
  • <COM_MAX_RATE> is the maximum commission rate you’re committing to, i.e. 0.40 means that you’ll never take more than 40% of all rewards generated
  • <COM_MAX_CHANGE_RATE> is the maximum rate in percent, that you can change your commission rate per day, i.e. 0.20 means that per day, you can either increase or decrease your commission by 20% tops

Execute the command and wait for it to be processed. If you see a transaction hash without getting an error, then you’ve successfully created a validator account! You can copy the transaction hash and take a look at it in the block explorer.

Also, you should be able to find your validator in the list printed out by the following command (search for your moniker).

Please, do not exit the container shell session, as we’ll continue working on the validator in the next step.

For the orchestrator, we need another account on the validator machine. Create one in Keplr, back up the mnemonic phrase and store it in a safe place. Then, use the following command to import the orchestrator account, which will ask you to enter the mnemonic phrase of the orchestrator account.

To check if the key was successfully added, use the following command, which should list a “validator” key and the newly added “orchestrator” key.

For the next steps, you’ll be needing an Ethereum account. Please follow this guide on how to install and set up Metamask, and create an account. Once you have an Ethereum address, we can register the orchestrator.

  • <VALIDATOR_ADDRESS> is the validator’s operator address (cudosvaloper…). It can be retrieved with the following command.
  • <ORCH_ADDRESS> is the orchestrators address (cudos…). It can be retrieved with the following command.
  • <ETH_ADDRESS> is the Ethereum address you created in Metamask (0x…).

Once you’ve registered the orchestrator, we need to configure it.

  • <FEES> are the fees that you will have to pay for each bridge transaction, e.g 100acudos.
  • <CUDOS_NODE_IP> is the public IP address of the CUDOS validator node.
  • <ETH_NODE_IP> is the public IP address of the Ethereum full node.
  • <ORCH_MNEMONIC> is the mnemonic phrase of your orchestrator account.
  • <ETH_PRIV_KEY_HEX> is the hexadecimal representation if the Ethereum account’s private key, without the leading “0x”. Please follow this guide in order to export the private key from Metamask.

Finally, run the orchestrator.

You can view the logs with the following command.

And that pretty much wraps it up! You’re now running a validator node on the CUDOS blockchain and an orchestrator for bridging token transfers between Cosmos and Ethereum!

We hope you found this guide helpful and leave us with a clap!

Until next time!

--

--

Validator operator in 20+ PoS blockchains. Visit us at www.blockscape.network.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store