Quicksilver 节点部署教程

一、项目信息

Web:quicksilver.zone

Twitter:quicksilverzone

Discord:discord.gg

二、硬件要求

与任何 Cosmos-SDK 链一样,硬件要求非常适中。

  • 4 个 CPU;时钟速度越快越好
  • 8GB 内存
  • 40GB 磁盘(我们使用 statesync,所以磁盘要求很低)
  • 永久的 Internet 连接(在测试网期间流量将最小化;10Mbps 就足够了 - 对于生产,预计至少 100Mbps)

三、操作系统(建议)

四、手动部署步骤

4.1-更新系统并安装必要的组件

sudo apt update && sudo apt upgrade --yes sudo apt install make clang pkg-config libssl-dev build-essential git jq ncdu bsdmainutils -y < "/dev/null"

4.2-安装golang

cd $HOME wget -O go1.18.1.linux-amd64.tar.gz https://golang.org/dl/go1.18.1.linux-amd64.tar.gz rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.1.linux-amd64.tar.gz && rm go1.18.1.linux-amd64.tar.gz echo 'export GOROOT=/usr/local/go' >> $HOME/.bash_profile echo 'export GOPATH=$HOME/go' >> $HOME/.bash_profile echo 'export GO111MODULE=on' >> $HOME/.bash_profile echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile && . $HOME/.bash_profile go version

4.3-构建Quicksilver

git clone https://github.com/ingenuity-build/quicksilver.git --branch v0.1.10 cd quicksilver make build chmod +x ./build/quicksilverd && mv ./build/quicksilverd /usr/local/bin/quicksilverd

4.4-设置验证器配置

记得将$NODENAME替换为自己的节点名字

cd $HOME quicksilverd init $NODENAME --chain-id=quicktest-3 quicksilverd config chain-id quicktest-3 quicksilverd config broadcast-mode block wget -qO $HOME/.quicksilverd/config/genesis.json "https://raw.githubusercontent.com/ingenuity-build/testnets/main/rhapsody/genesis.json" quicksilverd unsafe-reset-all

4.5-修改seeds和persistent_peers配置

SEEDS="dd3460ec11f78b4a7c4336f22a356fe00805ab64@seed.quicktest-1.quicksilver.zone:26656" sed -i -e "/seeds =/ s/= .*/= \"$SEEDS\"/" $HOME/.quicksilverd/config/config.toml PEERS="8a6c7775df2a891133b994607b93eb92a4a00e2d@95.216.161.177:26656,f9a35b54f3e9e195ed109ac2ca29814b2deddcf9@164.92.212.102:26656,2b739b09350220485b7ecefd5b784307b3127f68@88.198.242.163:26656,259cd5234c4db46de71942ce21890bf25056ad27@65.21.1.224:26656,259cd5234c4db46de71942ce21890bf25056ad27@65.21.1.224:26656,2b739b09350220485b7ecefd5b784307b3127f68@88.198.242.163:26656,f9a35b54f3e9e195ed109ac2ca29814b2deddcf9@164.92.212.102:26656,3938a7bdaae1da2f88a5c0195534052b35e61bcf@49.12.74.226:26656,cf8dbe09fca0cba81ed3b3b46243fabd5c29c164@65.21.143.79:20556" sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.quicksilverd/config/config.toml

4.6-配置pruning

pruning="custom" pruning_keep_recent="100" pruning_keep_every="0" pruning_interval="10" sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.quicksilverd/config/app.toml sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.quicksilverd/config/app.toml sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.quicksilverd/config/app.toml sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.quicksilverd/config/app.toml

4.7-修改addrbook

rm $HOME/.quicksilverd/config/addrbook.json wget -q -O $HOME/.quicksilverd/config/addrbook.json https://raw.githubusercontent.com/sourled/addrbook/main/addrbook.json

4.8-修改同步方式

SNAP_RPC1="http://node02.quicktest-1.quicksilver.zone:26657" \ && SNAP_RPC2="http://node04.quicktest-1.quicksilver.zone:26657" LATEST_HEIGHT=$(curl -s $SNAP_RPC2/block | jq -r .result.block.header.height) \ && BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)) \ && TRUST_HASH=$(curl -s "$SNAP_RPC2/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \ s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC1,$SNAP_RPC2\"| ; \ s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \ s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.quicksilverd/config/config.toml

4.9-将quicksilverd安装为服务

sudo tee /etc/systemd/system/quicksilverd.service > /dev/null <<EOF [Unit] Description=Quicksilver After=network.target [Service] Type=simple User=$USER ExecStart=$(which quicksilverd) start Restart=on-failure RestartSec=10 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF

4.10-重载并启动quicksilverd

sudo systemctl daemon-reload sudo systemctl enable quicksilverd sudo systemctl start quicksilverd

4.10-查看同步日志

journalctl -u quicksilverd -f

到此节点同步设置就完成了,观察下日志看同步是否有错。

4.11-查看同步是否完成

quicksilverd status 2>&1 | jq .SyncInfo

运行上面的命令后如果输出的是下面的内容就代表同步完成。主要看“catching_up”字段false代表同步完成,true代表正在同步。

root@quicks:~# quicksilverd status 2>&1 | jq .SyncInfo { "latest_block_hash": "5C6995D73B7DE49DB95D009B2564DA33ECC18B3AAA7800A9A431057D9B53B45C", "latest_app_hash": "08DB2173469F11E5EF7CB0C00C68A9062117E98721CCBF35D0FDB57A9FD2035E", "latest_block_height": "107746", "latest_block_time": "2022-05-10T02:56:55.681790966Z", "earliest_block_hash": "3800851F8170E3570DCFC7A0E56E72DA12FB2625B401CA74AEB1A3E6B5BADB15", "earliest_app_hash": "EA7027069F3E40904A53C0BC6A2BF1EE54FF70E93D84C74DD62D6940387A85EB", "earliest_block_height": "100501", "earliest_block_time": "2022-05-09T14:28:04.60522285Z", "catching_up": false }

4.12-创建QCK钱包并领水

将**$walletName替换为自己想要的名字(不要直接复制运行)**

quicksilverd keys add $walletName

输入两次密码,钱包创建完成后会直接显示钱包地址还有助记词,记得保存下来。

Discord中#qck-tap频道发送下面的指令领取uqck测试币**(将钱包地址替换为自己的)**

$request quick1fssluasvna560a7djm3rzeht7k7x66w4j6yu8h rhapsody

#atom-tap频道发送下面的指令领取uatom测试币**(直接用主网的钱包地址就可以的)**

$request cosmos1eu2szhmms0dc07ufe5z7926eqhaksw8r32umhe rhapsody

4.13-创建验证器(这一步必须要在同步完成,并且钱包有余额的情况下才可以操作)

将**$walletName**修改为自己的钱包名字或者钱包地址

将**$monikername**修改为自己设置的节点名字

quicksilverd tx staking create-validator \ --from=$walletName \ --amount=4900000uqck \ --moniker=$monikername \ --chain-id=quicktest-3 \ --commission-rate=0.1 \ --commission-max-rate=0.5 \ --commission-max-change-rate=0.1 \ --min-self-delegation=1 \ --fees=200uqck \ --pubkey=$(quicksilverd tendermint show-validator)

完成之后可以到区块链浏览器中查看运行的情况

.

五、可能有用的命令

5.1-检查日志

journalctl -fu quicksilverd -o cat

5.2-启动服务

systemctl start quicksilverd

5.3-停止服务

systemctl stop quicksilverd

5.4-重启服务

systemctl restart quicksilverd

5.5-节点同步状态

quicksilverd status 2>&1 | jq .SyncInfo

更多命令请查看官方文档

到此教程完结,有不懂的可以到官方Dis社区提问。

 

 

Quicksilver 节点部署教程

扫一扫手机访问

Quicksilver 节点部署教程

发表评论