From 876af5cfdf02b45d7fc6e62823f971eeedd6076e Mon Sep 17 00:00:00 2001 From: zerone Date: Sun, 3 Nov 2024 13:10:45 +0800 Subject: [PATCH] init --- README.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ init_other.sh | 11 ++++---- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fb158d3..b07b87e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,74 @@ # *(canto_1264-1)* + +```bash +cantod collect-gentxs + +cantod collect-gentxs 2>&1 | jq '.app_message.genutil.gen_txs[0].body.memo' +"11b2090f74bf024cc3170738da6edfbacf9ba311@10.1.12.13:26656" + +``` + +下载 Genesis 文件: + + + +```bash + + + +wget https://cmd.jxm.cool/zerone/testnet-chain/raw/branch/master/genesis.json -P $HOME/.cantod/config/ + +``` + + + +Start cantod by creating a systemd service to run the node in the background: +通过创建 systemd 服务在后台运行节点来启动 cantod: +Edit the file: sudo nano /etc/systemd/system/cantod.service 编辑文件: sudo nano /etc/systemd/system/cantod.service +Then copy and paste the following text into your service file. Be sure to edit as you see fit. +然后将以下文本复制并粘贴到您的服务文件中。请务必按照您认为合适的方式进行编辑。 + +```bash +[Unit] +Description=Canto Node +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/root/ +ExecStart=/root/go/bin/cantod start --trace --log_level info --json-rpc.api eth,txpool,net,debug,web3 --api.enable +Restart=on-failure +StartLimitInterval=0 +RestartSec=3 +LimitNOFILE=65535 +LimitMEMLOCK=209715200 + +[Install] +WantedBy=multi-user.target +``` + + +## Start the node 启动节点 +#### 重新加载服务文件: + +``` +sudo systemctl daemon-reload +``` + +#### 创建 symlinlk: + +``` +sudo systemctl enable cantod.service +``` +#### Start the node: 启动节点: + +``` +sudo systemctl start cantod && journalctl -u cantod -f +``` +然后,您应该获取几行日志文件,然后看到: No addresses to dial. Falling back to seeds module=pex server=node + + +这是一个指标,到目前为止一切都在进行中,现在您需要创建您的验证者 txn。^c 并执行后续步骤。 \ No newline at end of file diff --git a/init_other.sh b/init_other.sh index 9471b55..8a0a765 100644 --- a/init_other.sh +++ b/init_other.sh @@ -33,21 +33,22 @@ cantod init $MONIKER --chain-id $CHAINID # 持久对等节点(始终保持连接) # persistent_peers = "@:,@:" +# cantod collect-gentxs 2>&1 | jq '.app_message.genutil.gen_txs[0].body.memo' if [[ "$OSTYPE" == "darwin"* ]]; then sed -i '' 's/minimum-gas-prices = "0acanto"/minimum-gas-prices = "0.0001acanto"/g' $HOME/.cantod/config/app.toml - sed -i '' 's/persistent_peers = ""/persistent_peers = "11b2090f74bf024cc3170738da6edfbacf9ba311@143.136.90.48:26656"/g' $HOME/.cantod/config/config.toml + sed -i '' 's/persistent_peers = ""/persistent_peers = "11b2090f74bf024cc3170738da6edfbacf9ba311@43.136.90.48:26656"/g' $HOME/.cantod/config/config.toml else sed -i 's/minimum-gas-prices = "0acanto"/minimum-gas-prices = "0.0001acanto"/g' $HOME/.cantod/config/app.toml - sed -i 's/persistent_peers = ""/persistent_peers = "11b2090f74bf024cc3170738da6edfbacf9ba311@143.136.90.48:26656"/g' $HOME/.cantod/config/config.toml + sed -i 's/persistent_peers = ""/persistent_peers = "11b2090f74bf024cc3170738da6edfbacf9ba311@43.136.90.48:26656"/g' $HOME/.cantod/config/config.toml fi -# rm $HOME/.cantod/config/genesis.json -# cp genesis.json $HOME/.cantod/config +rm $HOME/.cantod/config/genesis.json +cp genesis.json $HOME/.cantod/config -# export startevmos="cantod start --pruning=nothing $TRACE --log_level info --minimum-gas-prices=0.0001acanto --json-rpc.ws-address '0.0.0.0:8546' --json-rpc.address '0.0.0.0:8545' --json-rpc.api eth,txpool,personal,net,debug,web3 --rpc.laddr 'tcp://0.0.0.0:26657' --api.enable --chain-id canto_7701-1" +# cantod start --pruning=nothing $TRACE --log_level info --minimum-gas-prices=0.0001acanto --json-rpc.ws-address '0.0.0.0:8546' --json-rpc.address '0.0.0.0:8545' --json-rpc.api eth,txpool,personal,net,debug,web3 --rpc.laddr 'tcp://0.0.0.0:26657' --api.enable --chain-id canto_1264-1 # evmosd start \