Skip to content

Commit

Permalink
integrate go-tss changes for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinssgh committed Jan 12, 2024
1 parent 6801685 commit 617804e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
14 changes: 7 additions & 7 deletions cmd/zetaclientd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,20 +319,20 @@ func initPreParams(path string) {

func promptPasswords() (string, string, error) {
reader := bufio.NewReader(os.Stdin)
fmt.Print("HotKey Password: ")
hotKeyPass, err := reader.ReadString('\n')
if err != nil {
return "", "", err
}
//fmt.Print("HotKey Password: ")
//hotKeyPass, err := reader.ReadString('\n')
//if err != nil {
// return "", "", err
//}
fmt.Print("TSS Password: ")
TSSKeyPass, err := reader.ReadString('\n')
if err != nil {
return "", "", err
}

if hotKeyPass == "" || TSSKeyPass == "" {
if TSSKeyPass == "" {
return "", "", errors.New("hotkey and tss passwords are required to start zetaclient")
}

return hotKeyPass, TSSKeyPass, err
return "", TSSKeyPass, err
}
4 changes: 2 additions & 2 deletions contrib/localnet/scripts/start-zetaclientd-genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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" --keyring-backend "$BACKEND"
zetaclientd start
echo "tsspass" | zetaclientd start
else
num=$(echo $HOSTNAME | tr -dc '0-9')
node="zetacore$num"
Expand All @@ -37,5 +37,5 @@ 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 --keyring-backend "$BACKEND"
zetaclientd start
echo "tsspass" | zetaclientd start
fi
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ replace (
// use cometbft
github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.28
github.com/tendermint/tm-db => github.com/BlockPILabs/cosmos-db v0.0.3
github.com/zeta-chain/go-tss => github.com/zeta-chain/go-tss v0.1.1-0.20240112193117-8097f56e0da4

)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3030,8 +3030,8 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
github.com/zeta-chain/go-tss v0.1.1-0.20240103170132-35850edf5dbd h1:wv+VGLFX8IhPuoqAVQGAQjlEPWqYjowJgJVNReolJTM=
github.com/zeta-chain/go-tss v0.1.1-0.20240103170132-35850edf5dbd/go.mod h1:+lJfk/qqt+oxXeVuJV+PzpUoxftUfoTRf2eF3qlbyFI=
github.com/zeta-chain/go-tss v0.1.1-0.20240112193117-8097f56e0da4 h1:41FHZ1xPtLzo2eDBv4TXkm0LMH+bi6C5ZWSt/53gbRQ=
github.com/zeta-chain/go-tss v0.1.1-0.20240112193117-8097f56e0da4/go.mod h1:+lJfk/qqt+oxXeVuJV+PzpUoxftUfoTRf2eF3qlbyFI=
github.com/zeta-chain/keystone/keys v0.0.0-20231105174229-903bc9405da2 h1:gd2uE0X+ZbdFJ8DubxNqLbOVlCB12EgWdzSNRAR82tM=
github.com/zeta-chain/keystone/keys v0.0.0-20231105174229-903bc9405da2/go.mod h1:x7Bkwbzt2W2lQfjOirnff0Dj+tykdbTG1FMJPVPZsvE=
github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20230816152528-db7d2bf9144b h1:aZRt5BtXdoDdyrUKwcv3B7mS30m/B854cjKjmnXBE5A=
Expand Down
1 change: 1 addition & 0 deletions zetaclient/tss_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func SetupTSSServer(peer p2p.AddrList, privkey tmcrypto.PrivKey, preParams *keyg
},
preParams, // use pre-generated pre-params if non-nil
IP, // for docker test
tssPassword,
)
if err != nil {
log.Error().Err(err).Msg("NewTSS error")
Expand Down

0 comments on commit 617804e

Please sign in to comment.