调整结构

This commit is contained in:
zerone 2024-11-03 15:24:12 +08:00
parent d4f2a89eb3
commit fc22312528
2 changed files with 27 additions and 3 deletions

View File

@ -103,20 +103,44 @@ echo $KEYRING
echo $KEY1
# Sign genesis transaction
mkdir $HOME/.cantod/config/gentx
# 生成创世交易(抵押金额最低一百万: 1000000stake)
cantod gentx $KEY1 900000000000000000000000acanto --keyring-backend $KEYRING --chain-id $CHAINID --output-document $HOME/.cantod/config/gentx/gentx-1.json
#cantod gentx $KEY2 1000000000000000000000acanto --keyring-backend $KEYRING --chain-id $CHAINID
# 将node1/2/3的gentx目录下的json文件移动到node0节点的gentx目录下(文件名最好改成对应节点名)
# $ cp -f /data/coeus/node1/config/gentx/*.json /data/coeus/node0/config/gentx
# $ cp -f /data/coeus/node2/config/gentx/*.json /data/coeus/node0/config/gentx
# $ cp -f /data/coeus/node3/config/gentx/*.json /data/coeus/node0/config/gentx
# Collect genesis tx
# 将创世交易收集到节点的genesis.json文件中
# $ cantod collect-gentxs --home /data/coeus/node0 2>&1 | jq
cantod collect-gentxs
# Run this to ensure everything worked and that the genesis file is setup correctly
cantod validate-genesis
# # Run this to ensure everything worked and that the genesis file is setup correctly
# cantod validate-genesis
# 验证创世配置文件是否正确
cantod validate-genesis
echo "File at $HOME/.cantod/config/genesis.json is a valid genesis file"
if [[ $1 == "pending" ]]; then
echo "pending mode is on, please wait for the first block committed."
fi
cp -f $HOME/.cantod/config/genesis.json genesis.json
# 将node0的聚合genesis.json文件覆盖node1/2/3三个节点的genesis.json文件
cp -f $HOME/.cantod/config/genesis.json config/genesis.json
# 将node1/2/3的gentx目录下的json文件移动到node0节点的gentx目录下(文件名最好改成对应节点名)
cp -rf $HOME/.cantod/config/gentx config
# 将node0的聚合genesis.json文件覆盖node1/2/3三个节点的genesis.json文件
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)