Skip to content

Latest commit

 

History

History
245 lines (178 loc) · 9.27 KB

run.md

File metadata and controls

245 lines (178 loc) · 9.27 KB

Running as a genesis validator

GenTx submissions are OPEN!

To see if you were included in the final genesis, search the genesis_validators.csv or pregenesis.json for your delegator_address.

If you were included, congrats! there were a lot of submissions to process and we're glad to have you. If you weren't, thank you for taking the time to support Evmos. There will be many more opportunities to be a part of the ecosystem in the future.

For selected validators

Genesis Time is 18:00 UTC on Feb 28, 2022.

Please have your validator up and ready by this time, and be available for further instructions if necessary at that time.

The primary point of communication for the genesis process will be a private channel on the Evmos Discord. It is absolutely critical that you and your team join the Discord during launch, as it will be the coordination point in case of any hiccups or issues during the launch process.

Instructions

This guide assumes that you have completed the tasks involved in Submitting your GenTx for the Evmos Mainnet. You should be running on a machine that meets the hardware requirements specified in the Evmos Docs with Go installed. We are assuming you already have a daemon home ($HOME/.evmosd) setup.

These instructions are for creating a basic setup on a single node. Validators should modify these instructions for their own custom setups as needed (i.e. sentry nodes, tmkms, etc).

These examples are written targeting an Ubuntu 20.04 system. Relevant changes to commands should be made depending on the OS/architecture you are running on.

Update evmosd to v1.0.0-beta1

For the gentx creation, we will use the v1.0.0-beta1 release of the Evmos codebase.

For launch, please update to the v1.0.0 tag and rebuild your binaries.

git clone https://github.com/tharsis/evmos
cd evmos
git checkout tags/v1.0.0

make install

Verify Your Installation

Verify that everything is OK. If you get something like the following, you've successfully installed Evmos on your system.

evmosd version --long

name: evmos
server_name: evmosd
version: v1.0.0-beta1
commit: 2c0b38566058df48ea5e7349e0b202bf743be90f
build_tags: netgo,ledger
go: go version go1.17 darwin/amd64

If the software version does not match, then please check your $PATH to ensure the correct evmosd is running.

Save your Chain ID in evmosd config

If you haven't done so already, please save the mainnet chain-id to your client.toml. This will make it so you do not have to manually pass in the chain-id flag for every CLI command.

evmosd config chain-id evmos_9001-1

IGNORE EVERYTHING BELOW THIS LINE FOR NOW

COME BACK AFTER THE GENESIS FILE IS READY

Install and setup Cosmovisor

We highly recommend validators use cosmovisor to run their nodes. This will make low-downtime upgrades smoother, as validators don't have to manually upgrade binaries during the upgrade, and instead can preinstall new binaries, and cosmovisor will automatically update them based on on-chain Software Upgrade proposals.

You should review the docs for cosmovisor located here: https://docs.cosmos.network/master/run-node/cosmovisor.html

If you choose to use cosmovisor, please continue with these instructions:

Cosmovisor is currently located in the Cosmos SDK repo, so you will need to download that, build cosmovisor, and add it to you PATH.

git clone https://github.com/cosmos/cosmos-sdk
cd cosmos-sdk
git checkout v0.44.3
make cosmovisor
cp cosmovisor/cosmovisor $GOPATH/bin/cosmovisor
cd $HOME

After this, you must make the necessary folders for cosmosvisor in your daemon home directory (~/.evmosd).

mkdir -p ~/.evmosd
mkdir -p ~/.evmosd/cosmovisor
mkdir -p ~/.evmosd/cosmovisor/genesis
mkdir -p ~/.evmosd/cosmovisor/genesis/bin
mkdir -p ~/.evmosd/cosmovisor/upgrades

Cosmovisor requires some ENVIRONMENT VARIABLES be set in order to function properly. We recommend setting these in your .profile so it is automatically set in every session.

echo "# Setup Cosmovisor" >> ~/.profile
echo "export DAEMON_NAME=evmosd" >> ~/.profile
echo "export DAEMON_HOME=$HOME/.evmosd" >> ~/.profile
echo 'export PATH="$DAEMON_HOME/cosmovisor/current/bin:$PATH"' >> ~/.profile
source ~/.profile

Finally, you should move the evmosd binary into the cosmovisor/genesis folder.

cp $GOPATH/bin/evmosd ~/.evmosd/cosmovisor/genesis/bin

Download Genesis File

You can now download the "genesis" file for the chain. It is pre-filled with the entire genesis state and gentxs.

curl https://raw.githubusercontent.com/tharsis/network/main/genesis.json > ~/.evmosd/config/genesis.json

We recommend using sha256sum to check the hash of the genesis.

cd ~/.evmosd/config
echo "<HASH>  genesis.json" | sha256sum -c

Reset Chain Database

There shouldn't be any chain database yet, but in case there is for some reason, you should reset it. This is a good idea especially if you ran evmosd start on an old, broken genesis file or an older version of evmosd.

evmosd unsafe-reset-all

Ensure that you have set peers

In ~/.evmosd/config/config.toml you can set your peers. See the peers.txt file for a list of up to date peers.

See "Add persistent peers section" in our docs for an automated method, but field should look something like a comma separated string of peers (do not copy this, just an example):

You can share your peer with

evmosd tendermint show-node-id

Peer Format: node-id@ip:port

Example: [email protected]:26656

If you are relying on just seed node and no persistent peers or a low amount of them, please increase the following params in config.toml:

# Maximum number of inbound peers
max_num_inbound_peers = 200

# Maximum number of outbound peers to connect to, excluding persistent peers
max_num_outbound_peers = 100

Start your node

Now that everything is setup and ready to go, you can start your node.

cosmovisor start

You will need some way to keep the process always running. If you're on linux, you can do this by creating a service.

sudo tee /etc/systemd/system/evmosd.service > /dev/null <<EOF  
[Unit]
Description=Evmos Daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) start
Restart=always
RestartSec=3
LimitNOFILE=infinity

Environment="DAEMON_HOME=$HOME/.evmosd"
Environment="DAEMON_NAME=evmosd"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"

[Install]
WantedBy=multi-user.target
EOF

Then update and start the node

sudo -S systemctl daemon-reload
sudo -S systemctl enable evmosd
sudo -S systemctl start evmosd

You can check the status with:

systemctl status evmosd

Conclusion

See you all at launch! Join the discord!


Disclaimer: This content is provided for informational purposes only, and should not be relied upon as legal, business, investment, or tax advice. You should consult your own advisors as to those matters. References to any securities or digital assets are for illustrative purposes only and do not constitute an investment recommendation or offer to provide investment advisory services. Furthermore, this content is not directed at nor intended for use by any investors or prospective investors, and may not under any circumstances be relied upon when making investment decisions.

This work, "Running as a genesis validator" is a derivative of "Osmosis Genesis Validators Guide", used under CC BY. The "Osmosis Genesis Validators Guide" itself is a derivative of "Agoric Validator Guide", used under CC BY. The Agoric validator guide is itself is a derivative of "Validating Kava Mainnet" by Kevin Davis, used under CC BY. "Running as a genesis validator" is licensed under CC BY by Tharsis Labs. It was extensively modified to be relevant to the Evmos chain.