Commit 73ab2e2a authored by mova's avatar mova

update scripts

parent 3866bdc9
......@@ -15,7 +15,7 @@ services:
sender:
image: movachain/test-net-tester:v0.0.12-16
container_name: sender
entrypoint: sh -c 'echo +sender+ && sender -test.run TestManyToMany /privatefromto-100_000.tmp 192.168.1.220 cryptor-sender 10000 0 50000 >> /sender/sender.log 2>&1 '
entrypoint: sh -c 'echo +sender+ && sender -test.run TestManyToMany /privatefromto-100_000.tmp 172.31.18.157 cryptor-sender 10000 0 50000 >> /sender/sender.log 2>&1 '
#entrypoint: sh -c 'sender -test.run TestManyToMany -test.timeout 0 /privatefromto-10_000.tmp 192.168.1.220 cryptor-sender 30000'
#echo " entrypoint: sh -c 'echo "+"ring"+" && sleep 10 && sender -test.run TestManyToMany -test.timeout 0 "
#entrypoint: sh -c 'echo "sender" && sleep 40 && go test -v -run TestSendSignatureTxsStream ./rpc/grpc/ --timeout 0 -args ring 192.168.1.242 100000'
......
......@@ -199,6 +199,7 @@ echo 'gs_block_count = 100' >> $configFile
echo "{" > ./explorer/config.json
echo " \"rpcURL\": \"http://$myIpAddr:18545\"" >> ./explorer/config.json
echo "}" >> ./explorer/config.json
cp ./explorer/config.json ./web/config/config.json
sed "s/EXPORT_IP/$myIpAddr/g" ./nginx/conf.d/ethnode.conf.temp > /tmp/ethnode.conf.a
......@@ -385,7 +386,7 @@ echo "peerid=\$(cat $datadir/net/$i/peer-id)" >> $startfile
echo "sentryIp=\$(cat $datadir/sentry/app.json | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')" >> $startfile
echo "echo ./host.sh ./dir replaceCunnentNodePublicIP \$sentryIp /ip4/\$ip/tcp/30333/p2p/\$peerid" >> $startfile
echo "echo ./join.sh \$peerid" >> $startfile
echo "for i in {1..120}" >> $startfile
echo "do" >> $startfile
......@@ -530,6 +531,7 @@ echo " ports:" >> $composefile
echo " - $((10080)):80" >> $composefile
echo " volumes:" >> $composefile
echo " - ./web:/usr/share/nginx/html" >> $composefile
echo " - ./explorer:/usr/share/nginx/html/config" >> $composefile
echo " networks:" >> $composefile
......
#!/bin/bash
set -eux
#set -eux
N=${1:-1}
Join=${2:-false}
......@@ -14,43 +14,6 @@ endN=$(ls -l ${DEST} |grep "^d" | grep "node*" | wc -l)
offsetN=$(($endN - $N))
if ${Join} ; then
for i in $(seq $(($offsetN+1)) $endN)
do
idx=$(((($i-1))*10))
echo $idx
docker run -d --name=node$i --net=cmpnet -e "ID=$i" --ip=172.77.5.$i -p $((26656+$idx)):26656 -p $((26657+$idx)):26657 -p $((1317+$idx)):1317 -p $((8545+$idx)):8545 -p $((8546+$idx)):8546 -v $MPWD/conf/deploy:/cmp -it caduceus/cmp2-test-net-order-chain:v0.0.1 /usr/bin/start.sh
done
sleep 10
for i in $(seq $(($offsetN+1)) $endN)
do
idx=$(((($i-1))*10))
echo $idx
while [ $(cmpcli status -n tcp://localhost:$((26657+$idx))| jq '.sync_info.catching_up' | bc) -ne 0 ]
do
echo '.sync_info.catching_up'
sleep 1
done
done
for i in $(seq $(($offsetN+1)) $endN)
do
dest=$DEST/node$i
validatorPub=$(cmpd metaversegraph show-validator --home $dest)
cmpcli tx staking create-validator --chain-id 200812 --amount 10000000cmp --pubkey $validatorPub --moniker node$i --commission-rate 0.1 --commission-max-rate 0.2 --commission-max-change-rate 0.01 --min-self-delegation 1 --from mykey$i -y
done
exit 0
fi
docker network prune -f
docker network create \
......@@ -58,11 +21,11 @@ docker network create \
--subnet=172.77.0.0/16 \
--ip-range=172.77.0.0/16 \
--gateway=172.77.5.254 \
cmpnet
movanet
echo "bootup tx order net"
for i in $(seq 1 $N)
do
idx=$(((($i-1))*10))
echo $idx
docker run -d --name=node$i --net=cmpnet -e "ID=$i" -e "ENABLE-CROSS-DOMAIN=true" -e "READ-TIMEOUT=60" -e "WRITE-TIMEOUNT=60" --ip=172.77.5.$i -p $((26656+$idx)):26656 -p $((26657+$idx)):26657 -p $((1317+$idx)):1317 -p $((8545+$idx)):8545 -p $((8546+$idx)):8546 -v $MPWD/conf/deploy:/cmp -it caduceus/cmp2-test-net-order-chain:v0.0.1 /usr/bin/start.sh
docker run -d --name=node$i --net=movanet -e "ID=$i" -e "ENABLE-CROSS-DOMAIN=true" -e "READ-TIMEOUT=60" -e "WRITE-TIMEOUNT=60" --ip=172.77.5.$i -p $((26656+$idx)):26656 -p $((26657+$idx)):26657 -p $((1317+$idx)):1317 -p $((8545+$idx)):8545 -p $((8546+$idx)):8546 -v $MPWD/conf/deploy:/cmp -it movachain/test-net-order-chain:v0.0.1 /usr/bin/start.sh
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment