Setting up a validator for E-Money [emoney-3]

Cat Boss
3 min readFeb 1, 2022

--

Hello Cat Boss here! We saw a lot of users asking around inside emoney’s official telegram chat and we thought we tried to make a super basic getting started guide for new validators who want to join.

At the time of this posting they are on emoney-3

Official documentation from the E-Money team can be found: https://github.com/BitCannaGlobal/bcna/blob/main/instructions.md

Create a server

We’ll be using Ubuntu 20.04LTS with 4GB RAM / 2 CPUs/ 80GB storage. Feel free to adjust this to your needs.

Remotely ssh into the server using the CLI and create a new user

By default, if you’re using root we recommend switching to another user because “It defeats the security model that’s been in place for years” (You can read the full response here: https://askubuntu.com/questions/16178/why-is-it-bad-to-log-in-as-root)

To create a new user we will do the following:

adduser <username>
usermod -aG sudo <username>

General environment setup

The following will prep your environment by updating / upgrading the system and installing the needed libraries to install the binary.

# Update the system
sudo apt update
sudo apt upgrade
# Install git, gcc and make
sudo apt install git build-essential ufw curl jq snapd --yes
# Install Go with Snap
sudo snap install go --classic
# Export environment variables
echo 'export GOPATH="$HOME/go"' >> ~/.profile
echo 'export GOBIN="$GOPATH/bin"' >> ~/.profile
echo 'export PATH="$GOBIN:$PATH"' >> ~/.profile
source ~/.profile

To verify go is installed:

go version

Install Binary

cd $HOME
git clone https://github.com/e-money/em-ledger.git
cd em-ledger
git checkout v1.1.4
make install
## check emd version
emd version --long

Setup Fullnode

Before we can become a validator we need to have a generic fullnode that’s fully synced up.

emd init "super cool name for your node"

This will generate genesis.json , node_key.json , and priv_validator_key.json in ~/.emd/config/

Get the correct genesis file:

wget -O ~/.emd/config/genesis.json https://github.com/e-money/networks/raw/master/emoney-3/genesis.json

Add seeds:

sed -E -i 's/seeds = \".*\"/seeds = \"708e559271d4d75d7ea2c3842e87d2e71a465684@seed-1.emoney.validator.network:28656,336cdb655ea16413a8337e730683ddc0a24af9de@seed-2.emoney.validator.network:28656,ecec8933d80da5fccda6bdd72befe7e064279fc1@207.180.213.123:26676,0ad7bc7687112e212bac404670aa24cd6116d097@50.18.83.75:26656,1723e34f45f54584f44d193ce9fd9c65271ca0b3@13.124.62.83:26656\"/' ~/.emd/config/config.toml

Start the node

You may use a background service with cosmovisor (https://docs.cosmos.network/master/run-node/cosmovisor.html) but for this tutorial we will just be using tmux

# start a detached terminal session
tmux
emd start
# detach and wait for sync
cmd + b d
# to attach a session to check on logs
tmux attach-session -t 0

once running and detached, you can check on the status by running:

emd status 2>&1 | jq

Creating a Validator

Once the catching-up status is false and you can run the following steps to create a validator

Import or create a new key:

# new key
emd keys add <key name>

If you haven’t already, add some $NGM to the account

Get your validator consensus address:

emd tendermint show-validator

you should get something like emoneyvalconspub1…

Create the validator:

emd tx staking create-validator \
--amount=<minimum amount needed to be active> \
--pubkey=<validator consensus address emoneyvalconspub1...> \
--moniker="Awesome validator name" \
--chain-id="emoney-3" \
--commission-rate="0.5" \
--commission-max-rate="1.00" \
--commission-max-change-rate="1.00" \
--min-self-delegation="1" \
--gas auto \
--gas-adjustment 1.3 \
--gas-prices 1.0ungm \
--from <key name>

Verify validator:

To check if you node is now a validator you can run emd status 2>&1 | jq and if it’s a validator, you can see the voting power is no longer 0 .

Congrats on joining the validator set :3

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Cat Boss
Cat Boss

Written by Cat Boss

We’re dPoS validators and we like writing medium posts documenting our journey, sharing tips we learn along the way. Trust me, I am a Cat.

No responses yet

Write a response