Becoming a Desmos mainnet genesis validator — Part 1

Riccardo Montagnin
Desmos Network
Published in
5 min readAug 17, 2021

As planned, at the end of month we will launch our first Desmos mainnet ever. This comes after 2 years of work, and has been set to start on August 31th at 15:00 UTC.

As any other chain launch, to be effective we will need a set of validators to take part to the start. This guide is intended for all the people that want to become a genesis validator and thus need to get ready for this event.

Please remember that you can become a genesis validator only if you have either participated in Desmos private token sale, or you have earned some tokens through our incentivzed programs (eg. Desmos Primer, Desmos Validator Programs, etc).

If you do not own any DSM (Desmos Tokens), you cannot become a validator at the time of genesis. However, you will be able to acquire them and become a validator at a later time once the chain starts.

The steps to be a genesis validator will be very similar to the ones highlighted in our previous blog post “Beginning of Morpheus “Apollo” genesis transactions submission process”:

  1. Submit a genesis transaction with all the details of your validator
  2. Get the updated genesis file once ready

This blog post outlines the details of the first step, and another blog post will be released when it’s time for the second one.

Submitting your genesis transaction 📜

In order to submit your genesis transaction you need to:

  1. Initialize your node with all the Desmos files
  2. Get the current genesis file
  3. Create your genesis transaction
  4. Submit the transaction file to the proper GitHub repository

Note that whenever the usage of the desmos binary is required, you can simply use Desmos v0.17.7. Inside the GitHub release page you can also find pre-compiled binaries.

1. Initialize your node

First thing first, you need to initialize your Desmos node properly. To do this, you can run the following command:

desmos init <moniker>

Note that the <moniker> value needs to be replace with your custom moniker. This is a custom name that will only be used locally, so you can choose whatever name you prefer.

This command will initialize the ~/.desmos folder properly and create all the necessary files.

Once this is done, you should check the ~/.desmos/config/app.toml and ~/.desmos/config/config.toml file in order to make sure your node is setup as your needs.

2. Get the current genesis file

Once the Desmos folders have been initialized, you now need to get our genesis file from the Desmos mainnet GitHub repository. To do this, you can use the following command:

curl https://raw.githubusercontent.com/desmos-labs/mainnet/main/penultimate_genesis.json > ~/.desmos/config/genesis.json

This will replace your generated genesis.json file with the one present inside our repository GitHub.

3. Create your genesis transaction

Once you have the shared genesis file, you are now ready to submit your genesis transaction. This transaction will create a JSON file containing the details of your validator at the genesis time of the mainnet. To create your file, you need to run

desmos gentx [key-name] [self-delegate-amount] \
--chain-id=desmos-mainnet-1 \
--moniker="<Your validator name>" \
--details="<Your details>" \
--website="<Your website>" \
--security-contact="<Your security contact>" \
--commission-rate=0.07 \
--commission-max-rate=1.0 \
--commission-max-change-rate=0.01

Please make sure you replace the following details with your custom values:

  • [key-name] is the local key name used to sign the transaction
  • [self-delegate-amount] is the amount of tokens that will be self-delegate to your node since the first block. This must be expressed in udsm. For example, if you want to self delegate 1 DSM you need to use 1000000udsm.
    Note
    In order to increase decentralization at start, we have set a maximum amount of tokens that validators will be able to self-delegate at genesis. This limit is set to 10,000 DSM ( 10000000000udsm). Genesis transactions with higher self-delegation amounts will be rejected.
  • <Your validator Name>: this is your validator name that will appear publicly on any explorer.
  • <Your details>: this are the details of your validator, a sort of biography that will be displayed on any explorer. If you do not want to provide it you can simply omit the --details flag altogether.
  • <Your website>: this is the link to your validator’s website. If you do not wish to provide it simply omit the --website flag.
  • <Your security contact>: this should be the email address that people needs to use in order to inform your of a possible security problem if found. Please note that the address is going to be public so do not use your personal email here! If you don’t want to provide it, just avoid using the --security-contact flag.

The other flags are related to how your validator will behave once started:

  • --commission-rate sets the initial commission rate of your validator. This is a percentage value, so 0.07 is going to set your validator to have a commission rate of 7%.
  • --commission-max-rate sets the maximum percentage of commission that your validator will ever be set to. A value of 1.0 means 100%.
  • --commission-max-change-rate sets the max percentage amount that your validator commission can increase in a day. A value of 0.01 means your validator commission can increase at most 1% in a day.

Note
If you see the does not have a balance in the genesis state error, it means you are not allowed to create a genesis validator. This might be because you did not earn any DSM through an incentivized program or did not participate in any private sale. Unfortunately, there is nothing much you can do to solve this. You will however be able to became a validator once the chain starts and after acquiring some DSM.

4. Submit the transaction file to GitHub

Once you execute the gentx command, it should output the path to the file where the transaction was written, like so:

Genesis transaction written to "/home/user/.desmos/config/gentx/gentx-4c33b727c684847ada0ff86704ac4fbc88bb8c0b.json"

Now, what you need to do is submit this file to out GitHub repository via a Pull Request. To do this, you need to:

  1. Fork our repository.
  2. Upload the generated gentx file inside the gentxs folder of the forked repository.
  3. Create a pull request to merge your changes inside our repository.

Once this is done, you will need to wait for us to check the PR and accept it. We will try to accept everyone as soon as possible, might this might take some time. Please be patient as everyone will accepted if their PR is valid.

Congratulations! 🎉

Congratulations on becoming a Desmos mainnet genesis validator! All you have to do is sit down, relax and wait until the final genesis is created by merging all the gentxs together. We will inform you when you have to perform other steps with another blog post.

If you have any questions, feel free to ask them inside our Discord server. We have create a new category named Mainnet to gather all the conversations there.

--

--

Riccardo Montagnin
Desmos Network

I’ve got too many places where to write my bio, so if you wanna see the updated one go to Twitter: https://twitter.com/ricmontagnin