[test] Add option to specify shard & add shard 1 explorer

pull/3237/head
Daniel Van Der Maden 4 years ago
parent ff1b689fb3
commit 25d250af81
  1. 5
      test/configs/local-resharding.txt
  2. 2
      test/debug.sh
  3. 4
      test/deploy.sh

@ -10,7 +10,7 @@
127.0.0.1 9009 validator .hmy/49d15743b36334399f9985feb0753430a2b287b2d68b84495bbb15381854cbf01bca9d1d9f4c9c8f18509b2bfa6bd40f.key
127.0.0.1 9010 validator .hmy/95117937cd8c09acd2dfae847d74041a67834ea88662a7cbed1e170350bc329e53db151e5a0ef3e712e35287ae954818.key
127.0.0.1 9011 validator .hmy/68ae289d73332872ec8d04ac256ca0f5453c88ad392730c5741b6055bc3ec3d086ab03637713a29f459177aaa8340615.key
127.0.0.1 9099 explorer
127.0.0.1 9099 explorer null 0
127.0.0.1 9100 validator .hmy/52ecce5f64db21cbe374c9268188f5d2cdd5bec1a3112276a350349860e35fb81f8cfe447a311e0550d961cf25cb988d.key
127.0.0.1 9101 validator .hmy/a547a9bf6fdde4f4934cde21473748861a3cc0fe8bbb5e57225a29f483b05b72531f002f8187675743d819c955a86100.key
@ -21,4 +21,5 @@
127.0.0.1 9106 validator .hmy/eca09c1808b729ca56f1b5a6a287c6e1c3ae09e29ccf7efa35453471fcab07d9f73cee249e2b91f5ee44eb9618be3904.key
127.0.0.1 9107 validator .hmy/f47238daef97d60deedbde5302d05dea5de67608f11f406576e363661f7dcbc4a1385948549b31a6c70f6fde8a391486.key
127.0.0.1 9108 validator .hmy/fc4b9c535ee91f015efff3f32fbb9d32cdd9bfc8a837bb3eee89b8fff653c7af2050a4e147ebe5c7233dc2d5df06ee0a.key
127.0.0.1 9109 validator .hmy/ca86e551ee42adaaa6477322d7db869d3e203c00d7b86c82ebee629ad79cb6d57b8f3db28336778ec2180e56a8e07296.key
127.0.0.1 9109 validator .hmy/ca86e551ee42adaaa6477322d7db869d3e203c00d7b86c82ebee629ad79cb6d57b8f3db28336778ec2180e56a8e07296.key
127.0.0.1 9098 explorer null 1

@ -3,4 +3,4 @@
rm -rf tmp_log*
rm *.rlp
rm -rf .dht*
./test/deploy.sh -D 60000 ./test/configs/local-resharding.txt
./test/deploy.sh -D 600000 ./test/configs/local-resharding.txt

@ -81,7 +81,7 @@ function launch_localnet() {
i=$((i + 1))
# Read config for i-th node form config file
IFS=' ' read -r ip port mode bls_key <<<"${line}"
IFS=' ' read -r ip port mode bls_key shard <<<"${line}"
args=("${base_args[@]}" -ip "${ip}" -port "${port}" -key "/tmp/${ip}-${port}.key" -db_dir "${ROOT}/db-${ip}-${port}" "-broadcast_invalid_tx=true")
if [[ -z "$ip" || -z "$port" ]]; then
echo "skip empty node"
@ -103,7 +103,7 @@ function launch_localnet() {
# Setup flags for i-th node based on config
case "${mode}" in
explorer)
args=("${args[@]}" "-node_type=explorer" "-shard_id=0")
args=("${args[@]}" "-node_type=explorer" "-shard_id=${shard}")
;;
archival)
args=("${args[@]}" -is_archival)

Loading…
Cancel
Save