Evmos验证人节点搭建
跑了Evmos验证人几天,由于刚上线不久,官方还比较混乱,节点搭建的官方教程也不完整,所以写了一份目前比较完整的节点搭建攻略
节点配置:
- CPU 8核+
- 内存 10GB+
- 硬盘 500GB+(节点很费硬盘)
- CPU和内存也尽量高点,不然容易丢块
安装GO 1.17
sudo rm -rf /usr/local/go; curl https://dl.google.com/go/go1.17.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf - ; cat <<'EOF' >>$HOME/.profile export GOROOT=/usr/local/go export GOPATH=$HOME/go export GO111MODULE=on export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin EOF source $HOME/.profile
#安装完成后运行以下命令查看版本
go version
安装其他必要的环境
sudo apt-get update -y && sudo apt-get upgrade -y; sudo apt-get install build-essential -y;
下载源代码并编译
git clone https://github.com/tharsis/evmos cd evmos && git checkout tags/v1.1.1 make install
安装完成后可以运行 evmosd version --long 检查是否安装成功
evmosd version --long name: evmos server_name: evmosd version: 1.1.1
初始节点
evmosd init <moniker> --chain-id=evmos_9001-1
*<moniker>
改成你要设置的名字
创建key
evmosd keys add <your key name>
*<yourKeyName>
改成你要设置的钱包名
下载genesis.json
curl https://archive.evmos.dev/genesis/genesis.json > ~/.evmosd/config/genesis.json
检查Genesis文件是否正确
cd ~/.evmosd/config echo "0d25dd7abf7325e518519ca2289775f611c0beaf1a2caf3a6b080e66168c2d6e genesis.json" | sha256sum -c
添加Persistent Peer
修改 ./evmosd/config/config.toml 文件,找到persistent_peers, 添加下面的peers
persistent_peers = "b3495a71f1b80938f5cfedc301a1b424e70e7507@185.16.38.47:26656,3d054ed237aa0f7955dcf6323e86189bee5969be@161.97.66.225:26656,fa87770116a8a44f426b6e127889b472ccec1022@65.108.137.124:26656,043052f49df9c27c1b9a51a186fd215769f433ee@116.203.196.239:26656,3048f727646c88721dc53fd3ce5bd2bedcbcc1b4@65.108.214.109:26656,435bf138fac0cd5ce06fa004be575445f9a9f9e0@168.119.89.31:26656,5fa1390cf291038165435d3cdab6ece1f6f90767@88.217.142.187:26756,588cedb70fa1d98c14a2f2c1456bfa41e1a156a8@evmos-sentry.mercury-nodes.net:29539,ef2b362ee111f2981c4f1b7393a79bd388b31154@157.90.179.182:26756,c10e55af85131a9c80e9900ed40bf32df5d15795@65.21.88.252:26656,bc4603cf97a6e84d765b6c5f9bfe2a51f3cbd59e@185.207.250.46:26656,668631f891a237bcf07a44dda9d29dfcc0bda87a@128.199.31.170:26656,75216825be4441ec7c9fa558ecd145b2a5f864c8@135.181.113.225:26656,208107dc1275bcdcd824015b127084aa9446c620@5.189.129.30:26656,af62bbb6888e6812ea2053347ff8065176d973c5@52.52.75.101:26656,1b3d176cd2f40033f9ff82408526d60b3eb90f24@138.201.17.11:26656,be5605ba50ef502ece9b0e31ba7aea6dc1c70c2d@95.217.194.249:26656,b02259a11e4ee46b29668cfc957e530022a3fca1@62.171.142.145:26656,c88f6547b007454ceae89bbf86dd01d42eb6c6d9@65.108.145.68:26656,8d2b64d64aea06b9ecfc30dc8041bd66fb41ccca@5.9.87.216:45556,069c620f8fb912e2b173c9f822bbf14069e5fd5a@159.69.21.209:26656,632efff696169de52ae241ca46c149ff8ea560aa@159.69.16.165:26656,9bafe0c7da07d74cd3b207cffd2832b22cbe08aa@178.18.252.117:26656,71078fa8a580a4e407e46a4fd07ac16276edddb8@142.132.156.243:26656,a6e35209e5bc4e1e1b0a362939b5e85e8a0edbff@85.190.134.34:26656,55ddd24b23f53c6f2f8ce524662e9c9e92b70df6@65.108.47.229:26656,799fe52ab5ee666f625d4099c9bd9914ad3fa81f@178.18.246.96:26656,0188876ca9927965ce7af86dbe0505080434f0b7@142.132.206.174:26656,4ba9a18cfa51535000da144d3eb37e9529483ca9@65.21.235.232:26656,b3ec65f24ec3f788b10931ddffb1e912678dc1be@135.181.22.238:26656"
运行节点(使用Cosmovisor)
下载并设置Cosmovisor
git clone https://github.com/cosmos/cosmos-sdk cd cosmos-sdk git checkout v0.44.6 make cosmovisor cp cosmovisor/cosmovisor $GOPATH/bin/cosmovisor cd $HOME mkdir -p ~/.evmosd mkdir -p ~/.evmosd/cosmovisor mkdir -p ~/.evmosd/cosmovisor/genesis mkdir -p ~/.evmosd/cosmovisor/genesis/bin mkdir -p ~/.evmosd/cosmovisor/upgrades 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 cp $GOPATH/bin/evmosd ~/.evmosd/cosmovisor/genesis/bin
创建背后运行服务
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
创建好后,更新,开启节点服务
sudo -S systemctl daemon-reload sudo -S systemctl enable evmosd sudo -S systemctl start evmosd
上面的命令运行好后,你的节点就开启了
用下面命令查看服务:
查看服务状态
systemctl status evmosd
查看服务日志
journalctl -u evmosd -f
上线验证人
等你的节点同步好后,可以运行下面命令上线你的验证人:
evmosd tx staking create-validator \ --amount=1000000000000aevmos \ --pubkey=$(evmosd tendermint show-validator) \ --moniker="EvmosWhale" \ --chain-id=<chain_id> \ --commission-rate="0.05" \ --commission-max-rate="0.20" \ --commission-max-change-rate="0.01" \ --min-self-delegation="1000000" \ --gas="auto" \ --gas-prices="0.025aevmos" \ --from=<key_name>
注:要进入前150名后,你的验证人才会激活
官方节点搭建文档:https://evmos.dev/mainnet/join.html
节点硬盘优化: https://evmos.dev/guides/validators/disk_optimization.html
最后为我的验证人节点打一下Call~
欢迎大家质押我的验证人节点ericet,可以通过https://evmos.disperze.network/validators/evmosvaloper15ksyw7t5t9e7w9n3d2jqqmv7y334mfrhfvvnge 质押