跑了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 = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26756,588cedb70fa1d98c14a2f2c1456bfa41e1a156a8@evmos-sentry.mercury-nodes.net:29539,[email protected]:26756,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:45556,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]: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 质押
Happy every day, upvoted ,see you 😊! witnesses vote for me get daily upvote. Thank you for your support
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit