add validator
This commit is contained in:
parent
52b9eb9c9a
commit
5f5f3e9566
@ -6,7 +6,7 @@
|
||||
cantod collect-gentxs
|
||||
|
||||
cantod collect-gentxs 2>&1 | jq '.app_message.genutil.gen_txs[0].body.memo'
|
||||
"11b2090f74bf024cc3170738da6edfbacf9ba311@10.1.12.13:26656"
|
||||
"a4eec64d88314553eee08206d8e2a986562ef310@193.200.130.186:26656"
|
||||
|
||||
```
|
||||
|
||||
|
||||
60
init_validator.sh
Normal file
60
init_validator.sh
Normal file
@ -0,0 +1,60 @@
|
||||
KEY1="key1"
|
||||
KEY2="key2"
|
||||
KEY3="key3"
|
||||
CHAINID="canto_1264-1"
|
||||
MONIKER="validator-1x"
|
||||
KEYRING="test"
|
||||
KEYALGO="eth_secp256k1"
|
||||
LOGLEVEL="info"
|
||||
# to trace evm
|
||||
#TRACE="--trace"
|
||||
TRACE=""
|
||||
|
||||
# validate dependencies are installed
|
||||
command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; }
|
||||
|
||||
# Reinstall daemon
|
||||
rm -rf ~/.cantod*
|
||||
# make install-testing
|
||||
|
||||
# Set client config
|
||||
# cantod config set client chain-id canto_7701-1
|
||||
cantod config set client chain-id $CHAINID
|
||||
cantod config set client keyring-backend $KEYRING
|
||||
|
||||
# if $KEY exists it should be deleted
|
||||
cantod keys add $KEY1 --keyring-backend $KEYRING --algo $KEYALGO
|
||||
|
||||
cantod init $MONIKER --chain-id $CHAINID
|
||||
|
||||
|
||||
# 种子节点(启动时尝试连接这些节点)
|
||||
# seeds = "<seed_node_id>@<ip>:<port>,<seed_node_id>@<ip>:<port>"
|
||||
|
||||
# 持久对等节点(始终保持连接)
|
||||
# persistent_peers = "<peer_node_id>@<ip>:<port>,<peer_node_id>@<ip>:<port>"
|
||||
# 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 = "a4eec64d88314553eee08206d8e2a986562ef310@192.168.110.186: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 = "a4eec64d88314553eee08206d8e2a986562ef310@192.168.110.186:26656"/g' $HOME/.cantod/config/config.toml
|
||||
|
||||
|
||||
fi
|
||||
|
||||
# 强制覆盖
|
||||
cp -f genesis.json $HOME/.cantod/config/genesis.json
|
||||
|
||||
# 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 \
|
||||
# --metrics "$TRACE" \
|
||||
# --log_level $LOGLEVEL \
|
||||
# --minimum-gas-prices=0.0001$BASE_DENOM \
|
||||
# --json-rpc.api eth,txpool,personal,net,debug,web3 \
|
||||
# --home "$HOMEDIR" \
|
||||
# --chain-id "$CHAINID"
|
||||
Loading…
Reference in New Issue
Block a user