update env vars

This commit is contained in:
Solovyov1796 2024-05-03 23:14:04 +08:00
parent e012f3b35e
commit 9926bd7169

View File

@ -5,7 +5,7 @@ function help() {
echo ""
echo " -i Identity file"
echo " -k Keyring password to create key (for Linux only)"
echo " -n Network (default: testnet)"
echo " -n Network (default: devnet)"
echo " -c Chain ID (default: \"zgtendermint_16600-1\")"
echo ""
}
@ -21,7 +21,7 @@ IP_LIST=$1
shift
PEM_FLAG=""
KEYRING_PASSWORD=""
NETWORK="testnet"
NETWORK="devnet"
INIT_GENESIS_ENV=""
while [[ $# -gt 0 ]]; do
@ -56,11 +56,11 @@ NUM_NODES=${#IPS[@]}
# Install dependent libraries and binary
for ((i=0; i<$NUM_NODES; i++)) do
ssh $PEM_FLAG ubuntu@${IPS[$i]} "rm -rf 0g-chain; git clone https://github.com/0glabs/0g-chain.git; cd 0g-chain; git checkout patch_testnet_1; ./networks/testnet/install.sh"
ssh $PEM_FLAG ubuntu@${IPS[$i]} "rm -rf 0g-chain; git clone https://github.com/0glabs/0g-chain.git; cd 0g-chain; git checkout patch_testnet_1; ./networks/devnet/install.sh"
done
# Create genesis config on node0
ssh $PEM_FLAG ubuntu@${IPS[0]} "cd 0g-chain/networks/testnet; $INIT_GENESIS_ENV ./init-genesis.sh $IP_LIST $KEYRING_PASSWORD; tar czf ~/$NETWORK.tar.gz $NETWORK; rm -rf $NETWORK"
ssh $PEM_FLAG ubuntu@${IPS[0]} "cd 0g-chain/networks/devnet; $INIT_GENESIS_ENV ./init-genesis.sh $IP_LIST $KEYRING_PASSWORD; tar czf ~/$NETWORK.tar.gz $NETWORK; rm -rf $NETWORK"
scp $PEM_FLAG ubuntu@${IPS[0]}:$NETWORK.tar.gz .
ssh $PEM_FLAG ubuntu@${IPS[0]} "rm $NETWORK.tar.gz"