github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/test/p2p/test.sh (about) 1 #! /bin/bash 2 set -eu 3 4 DOCKER_IMAGE=$1 5 NETWORK_NAME=local_testnet 6 N=4 7 PROXY_APP=persistent_kvstore 8 IPV=${2:-4} # Default to IPv4 9 10 if [[ "$IPV" != "4" && "$IPV" != "6" ]]; then 11 echo "IP version must be 4 or 6" >&2 12 exit 1 13 fi 14 15 # stop the existing testnet and remove local network 16 set +e 17 bash test/p2p/local_testnet_stop.sh "$NETWORK_NAME" "$N" 18 set -e 19 20 PERSISTENT_PEERS=$(bash test/p2p/persistent_peers.sh $IPV $N $DOCKER_IMAGE) 21 22 # start the testnet on a local network 23 # NOTE we re-use the same network for all tests 24 bash test/p2p/local_testnet_start.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$IPV" "$N" "$PROXY_APP" "$PERSISTENT_PEERS" 25 26 # test basic connectivity and consensus 27 # start client container and check the num peers and height for all nodes 28 bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$IPV" basic "test/p2p/basic/test.sh $IPV $N" 29 30 # test atomic broadcast: 31 # start client container and test sending a tx to each node 32 bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$IPV" ab "test/p2p/atomic_broadcast/test.sh $IPV $N" 33 34 # test fast sync (from current state of network): 35 # for each node, kill it and readd via fast sync 36 bash test/p2p/fast_sync/test.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$IPV" "$N" "$PROXY_APP" 37 38 # test killing all peers 3 times 39 bash test/p2p/kill_all/test.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$IPV" "$N" 3 40 41 # test pex 42 bash test/p2p/pex/test.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$IPV" "$N" "$PROXY_APP"