Skip to content

Commit

Permalink
update zetaclient scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinssgh committed Jan 22, 2024
1 parent 22b8c21 commit 280a4c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions cmd/zetaclientd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ func initPreParams(path string) {
}
}

// promptPasswords() This function will prompt for passwords which will be used to decrypt two key files:
// 1. HotKey
// 2. TSS key-share
func promptPasswords() (string, string, error) {
reader := bufio.NewReader(os.Stdin)
fmt.Print("HotKey Password: ")
Expand Down
4 changes: 2 additions & 2 deletions contrib/localnet/scripts/start-zetaclientd-background.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ then
rm ~/.tss/*
MYIP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
zetaclientd init --zetacore-url zetacore0 --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP"
zetaclientd start > $HOME/zetaclient.log 2>&1 &
zetaclientd start < /root/password.file > $HOME/zetaclient.log 2>&1 &
else
num=$(echo $HOSTNAME | tr -dc '0-9')
node="zetacore$num"
Expand All @@ -31,7 +31,7 @@ else
done
rm ~/.tss/*
zetaclientd init --peer /ip4/172.20.0.21/tcp/6668/p2p/"$SEED" --zetacore-url "$node" --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" --log-level 0
zetaclientd start > $HOME/zetaclient.log 2>&1 &
zetaclientd start < /root/password.file > $HOME/zetaclient.log 2>&1 &
fi

sleep 3
Expand Down
4 changes: 2 additions & 2 deletions contrib/localnet/scripts/start-zetaclientd-p2p-diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ then
--pre-params ~/preParams.json --zetacore-url zetacore0 \
--chain-id athens_101-1 --dev --operator zeta1z46tdw75jvh4h39y3vu758ctv34rw5z9kmyhgz --log-level 0 --hotkey=val_grantee_observer \
--p2p-diagnostic
zetaclientd start
zetaclientd start < /root/password.file
else
num=$(echo $HOSTNAME | tr -dc '0-9')
node="zetacore$num"
Expand All @@ -29,5 +29,5 @@ else
--pre-params ~/preParams.json --zetacore-url $node \
--chain-id athens_101-1 --dev --operator zeta1lz2fqwzjnk6qy48fgj753h48444fxtt7hekp52 --log-level 0 --hotkey=val_grantee_observer \
--p2p-diagnostic
zetaclientd start
zetaclientd start < /root/password.file
fi

0 comments on commit 280a4c5

Please sign in to comment.