├── .gitignore ├── README.md ├── aws-scripts ├── kill_node.sh ├── parse_json.py ├── preprocess_peerlist.py ├── run_instance.sh ├── say_bye.sh ├── say_hello.sh ├── setup.sh └── setup_instances.sh ├── aws ├── .gitignore ├── configs │ └── aws.json └── instance │ └── instance.go ├── azure ├── common.sh ├── configs │ ├── azure-env.json │ ├── azure-small.json │ ├── vm-template.json │ ├── vnet-parameters.json │ └── vnet-template.json ├── deploy.sh ├── go-az.sh ├── instances.sh └── region.sh ├── configs ├── aws-explorer.json ├── aws.json ├── b1-8874.key ├── b1-9870.key ├── b1-9871.key ├── b1-9872.key ├── b1-9873.key ├── b1-9874.key ├── b1-9875.key ├── b1-9876.key ├── b2-8874.key ├── b2-9870.key ├── b2-9871.key ├── b2-9872.key ├── b2-9873.key ├── b2-9874.key ├── b2-9875.key ├── b2-9876.key ├── b3-12019.key ├── b3-13019.key ├── b4-12019.key ├── b4-13019.key ├── benchmark-devnet.json ├── benchmark-dryrun.json ├── benchmark-ds.json ├── benchmark-leo.json ├── benchmark-lrtn.json ├── benchmark-mkeys.json ├── benchmark-os.json ├── benchmark-pr.json ├── benchmark-rongjian.json ├── benchmark-s3.json ├── benchmark-stn.json ├── benchmark-tnet.json ├── blskey-test.txt ├── blskey.txt ├── launch-devnet.json ├── launch-dryrun.json ├── launch-ds.json ├── launch-leo.json ├── launch-lrtn.json ├── launch-mkeys.json ├── launch-os.json ├── launch-pr.json ├── launch-rongjian.json ├── launch-s3.json ├── launch-stn.json ├── launch-tnet.json ├── pangaea-keys.txt ├── userdata-soldier-http-static.sh ├── userdata-soldier-http.sh ├── userdata-systemd-static-dryrun.sh ├── userdata-systemd-static-exp.sh ├── userdata-systemd-static-lrtn-exp.sh ├── userdata-systemd-static-lrtn.sh └── userdata-systemd-static.sh ├── docs ├── benchmark.md ├── launch.md └── txgen.md ├── experiment ├── genbls │ ├── Makefile │ └── main.go ├── soldier │ ├── main.go │ └── test │ │ ├── config.json │ │ ├── init.json │ │ ├── test-soldier.sh │ │ └── update.json ├── ssm_demo │ └── main.py └── utils │ └── utils.go ├── gcloud ├── create_instances.py ├── delete_group_instances.py ├── get_gcp_ip.sh └── requirements.txt ├── go.mod ├── go.sum ├── go_executable_build.sh ├── pipeline ├── .gitignore ├── LogAnalysis.py ├── aws-instances.sh ├── backup_archival_db.sh ├── bls.py ├── bootnode.sh ├── cal_tps.sh ├── common.sh ├── common_opts.sh ├── common_test.sh ├── configuration.txt ├── consolidate.py ├── consolidate_test_funds.json ├── deploy.sh ├── dl-soldier-logs.sh ├── download-logs.sh ├── ext_peers.sh ├── flatten_config.py ├── fund.py ├── fund.sh ├── generate_distribution_config.py ├── get_leader.sh ├── go.sh ├── hard-reset.sh ├── kill_shard.sh ├── log.sh ├── merge_node.sh ├── msg.sh ├── node_ssh.sh ├── pangaea.sh ├── peer_log.sh ├── ping_shard.sh ├── pipe_log_on_shard.sh ├── r53update.py ├── requirements.txt ├── restart_node.sh ├── restart_shard.sh ├── restart_watchdog.sh ├── rollback.sh ├── rolling_restart_shard.sh ├── run_benchmark.sh ├── run_on_shard.sh ├── snapshot_recover.py ├── sync_logs.sh ├── tac.sh ├── tmpdir.sh ├── trap.sh ├── update_nodedb.sh ├── usage.sh ├── util.sh └── utils │ ├── __init__.py │ ├── configuration.txt │ ├── launch_template.py │ ├── mylogger.py │ ├── scripting.py │ ├── spot_fleet.py │ ├── utils.py │ └── utils_test.py ├── testnet └── stn │ └── launch.sh └── tools ├── .gitignore ├── .hmy ├── keystore.beta │ ├── one1shzkj8tty2wu230wsjc7lp9xqkwhch2ea7sjhc.key │ ├── one1vjywuur8ckddmc4dsyx6qdgf590eu07ag9fg4a.key │ ├── one1wh4p0kuc7unxez2z8f82zfnhsg4ty6dupqyjt2.key │ └── one1yc06ghr2p8xnl2380kpfayweguuhxdtupkhqzw.key ├── keystore.newacc │ ├── one13nttw7ucw23fwnanj04tv26uj5xpvha4jazeum.key │ ├── one17nhypqtfk88v6suutntjcy84lwrdyckdpz5sz0.key │ ├── one1kuyxefj99lhc3yn3nmn6m48jhthzul45r6xpha.key │ ├── one1mqcy64xeaeyrxp2gyq8a9tjreqzg9xyvwhqllr.key │ └── one1rq5a7j2g7aa355ywm2zzjm2hew7f43hg2ym89y.key └── wallet.ini ├── Makefile ├── beat_tx.sh ├── beat_tx2.sh ├── beat_tx_node.sh ├── check_lsof.sh ├── empty.txt ├── enable-systemd-service.sh ├── fund.sh ├── harmony.service.template ├── install-db-snapshot.sh ├── install-node.sh ├── install-node_exporter.sh ├── launch-node.sh ├── mainnet.snapshot.json ├── mydesktop.sh ├── net_stats.sh ├── remove_blskey.sh ├── setup_clouddesktop.sh ├── snapshot ├── README.md ├── jenkins.sh ├── rclone.conf ├── requirements.txt ├── rotator.sh ├── snapshot.py └── testnet_config.json ├── snapshots ├── main.all.0501.json ├── main.all.0504.json ├── main.s0.0501.json ├── main.s1.0504.json ├── main.s2.0505.json ├── main.s3.0505.json └── upload.sh ├── test.only.json └── tt.sh /.gitignore: -------------------------------------------------------------------------------- 1 | azure/logs/*.log 2 | azure/configs/*.ips 3 | azure/configs/raw_ip.txt 4 | configs/*.ip 5 | configs/profile-*.json 6 | configs/*.aws 7 | azure/archive 8 | azure/configs/*.bak 9 | azure/configs/benchmark.*.txt 10 | azure/configs/benchmark.*.json 11 | aws-experiment-launch/utils/*.pyc 12 | aws-experiment-launch/distribution_config.txt 13 | aws-experiment-launch/commander_logging.sh 14 | aws-experiment-launch/instance_ids_output.txt 15 | aws-experiment-launch/instance_output.txt 16 | aws-experiment-launch/raw_ip.txt 17 | aws-experiment-launch/logs/ 18 | aws-experiment-launch/download_logs_from_commander.sh 19 | experiment/soldier/soldier 20 | experiment/commander/commander 21 | aws-experiment-launch/tmp/ 22 | aws-experiment-launch/leader_addresses.txt 23 | keys 24 | *.swp 25 | bin 26 | tmp_log 27 | aws-experiment-launch/*.ids 28 | aws-experiment-launch/configs/profile.json 29 | 30 | # Copy from benchmark repo 31 | # IdeaIDE 32 | .idea 33 | 34 | #VsIDE 35 | .vscode 36 | 37 | # Executables 38 | *.pyc 39 | *.exe 40 | *.out 41 | *.app 42 | *.i*86 43 | *.x86_64 44 | *.hex 45 | bin/ 46 | 47 | # Mac 48 | .DS_Store 49 | 50 | # Log 51 | *.log 52 | log-* 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # experiment-deploy 2 | Repo for doing experiments in aws, azure, google cloud. 3 | 4 | [Developer Desktop Setup] 5 | * download keys from gdrive to ~/.ssh/keys 6 | * setup .aws/config and .aws/credentials 7 | * ./tools/setup_clouddesktop.sh 8 | -------------------------------------------------------------------------------- /aws-scripts/kill_node.sh: -------------------------------------------------------------------------------- 1 | for pid in `/bin/ps -fu $USER| grep "slave.go\|slave -port\|leader\|benchmark_node" | grep -v "grep" | awk '{print $2}'`; 2 | do 3 | echo 'Killed process: '$pid 4 | kill -9 $pid 5 | done 6 | -------------------------------------------------------------------------------- /aws-scripts/parse_json.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | def get_public_ip(all_reservations): 4 | all_public_ip_addresses = [] 5 | for individual_instances in all_reservations: 6 | instance_information = individual_instances['Instances'][0] 7 | if "running" != instance_information["State"]["Name"]: 8 | continue 9 | all_public_ip_addresses.append(instance_information['PublicIpAddress']) 10 | return all_public_ip_addresses 11 | 12 | def make_peers_list(all_reservations,port="9001",filename="config.txt"): 13 | p = get_public_ip(all_reservations) 14 | f = open(filename,"w") 15 | for i in range(len(p)): 16 | if i == 0: 17 | f.write(p[i] + " " + port + " " + "leader"+"\n") 18 | else: 19 | f.write(p[i] + " " + port + " " + "validator"+"\n") 20 | f.close() 21 | 22 | def is_it_running(f): 23 | pass 24 | 25 | if __name__ == "__main__": 26 | json_data=open("aws.json").read() 27 | f = json.loads(json_data) 28 | all_reservations = f['Reservations'] 29 | 30 | make_peers_list(all_reservations) 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /aws-scripts/preprocess_peerlist.py: -------------------------------------------------------------------------------- 1 | import requests 2 | amazon_ipv4_url = "http://169.254.169.254/latest/meta-data/public-ipv4" 3 | def get_my_ip(): 4 | return current_ip = requests.get(amazon_ipv4_url).text 5 | 6 | if __name__ == "__main__": 7 | current_ip = requests.get(amazon_ipv4_url).text 8 | f = open("global_nodes.txt","r") 9 | peerList = [] 10 | for myline in f: 11 | mylist = myline.split(" ") 12 | ip = mylist[0] 13 | node = mylist[2] 14 | if str(ip) != str(current_ip): 15 | if node != "transaction": 16 | peerList.append(myline) 17 | else: 18 | if node == "transaction": 19 | h = open("isTransaction.txt","w") 20 | h.write("I am just a transaction generator node") 21 | h.close() 22 | f.close() 23 | g = open("global_peerlist.txt","w") 24 | for myline in peerList: 25 | g.write(myline) 26 | g.close() 27 | -------------------------------------------------------------------------------- /aws-scripts/run_instance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | echo "Run Instances starts" >> tmplog 3 | 4 | echo "Update systcl" >> tmplog 5 | sudo sysctl -w net.core.somaxconn=1024 6 | sudo sysctl -w net.core.netdev_max_backlog=65536 7 | sudo sysctl -w net.ipv4.tcp_tw_reuse=1 8 | sudo sysctl -w net.ipv4.tcp_rmem='4096 65536 16777216' 9 | sudo sysctl -w net.ipv4.tcp_wmem='4096 65536 16777216' 10 | sudo sysctl -w net.ipv4.tcp_mem='65536 131072 262144' 11 | 12 | echo "Setup path" >> tmplog 13 | ./kill_node.sh 14 | MyHOME=/home/ec2-user 15 | source ~/.bash_profile 16 | export GOROOT=/usr/lib/golang 17 | export GOPATH=$MyHOME/projects 18 | export PATH=$PATH:$GOROOT/bin 19 | 20 | echo "Get ip" >> tmplog 21 | # Get my IP 22 | wget http://169.254.169.254/latest/meta-data/public-ipv4 23 | ip=$(head -n 1 public-ipv4) 24 | echo "Current IP is >>>" 25 | echo $ip 26 | echo ">>>>" 27 | 28 | echo "Run soldier" >> tmplog 29 | # Run soldier 30 | cd $GOPATH/src/harmony-benchmark/bin/ 31 | node_port=9000 32 | ./soldier -ip $ip -port $node_port > soldier_log 2>&1 & 33 | 34 | echo "Run Instances done" >> tmplog 35 | -------------------------------------------------------------------------------- /aws-scripts/say_bye.sh: -------------------------------------------------------------------------------- 1 | echo "Bye" >> tmplog -------------------------------------------------------------------------------- /aws-scripts/say_hello.sh: -------------------------------------------------------------------------------- 1 | echo "Hello" >> tmplog -------------------------------------------------------------------------------- /aws-scripts/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | echo "Setup Golang" >> tmplog 3 | #sudo yum update -y 4 | 5 | sudo yum install -y golang 6 | sudo yum install -y git 7 | MyHOME=/home/ec2-user 8 | echo "now setting up go-lang paths" 9 | # GOROOT is the location where Go package is installed on your system 10 | echo "export GOROOT=/usr/lib/golang" >> $MyHOME/.bash_profile 11 | 12 | # GOPATH is the location of your work directory 13 | echo "export GOPATH=$MyHOME/projects" >> $MyHOME/.bash_profile 14 | 15 | # PATH in order to access go binary system wide 16 | echo "export PATH=$PATH:$GOROOT/bin" >> $MyHOME/.bash_profile 17 | 18 | export GOROOT=/usr/lib/golang 19 | export GOPATH=$MyHOME/projects 20 | export PATH=$PATH:$GOROOT/bin 21 | source $MyHOME/.bash_profile 22 | 23 | cd $GOPATH/src/harmony-benchmark 24 | touch 'yum_not_updated.txt' 25 | # go get dependencies 26 | go get ./... 27 | curl --silent http://169.254.169.254/latest/meta-data/public-ipv4 >> bin/myip.txt 28 | # build executables 29 | go build -o bin/soldier aws-experiment-launch/experiment/soldier/main.go 30 | go build -o bin/commander aws-experiment-launch/experiment/commander/main.go 31 | go build -o bin/benchmark benchmark.go 32 | go build -o bin/txgen client/txgen/main.go 33 | 34 | # Setup ulimit 35 | echo "* soft nproc 65535" | sudo tee -a /etc/security/limits.conf 36 | echo "* hard nproc 65535" | sudo tee -a /etc/security/limits.conf 37 | echo "* soft nofile 65535" | sudo tee -a /etc/security/limits.conf 38 | echo "* hard nofile 65535" | sudo tee -a /etc/security/limits.conf 39 | echo "root soft nproc 65535" | sudo tee -a /etc/security/limits.conf 40 | echo "root hard nproc 65535" | sudo tee -a /etc/security/limits.conf 41 | echo "root soft nofile 65535" | sudo tee -a /etc/security/limits.conf 42 | echo "root hard nofile 65535" | sudo tee -a /etc/security/limits.conf 43 | echo "session required pam_limits.so" | sudo tee -a /etc/pam.d/common-session 44 | -------------------------------------------------------------------------------- /aws-scripts/setup_instances.sh: -------------------------------------------------------------------------------- 1 | aws ec2 run-instances --image-id ami-e251209a --count 1 --instance-type t2.nano --key-name main --security-group-ids sg-066a8b0ec187c7247 2 | -------------------------------------------------------------------------------- /aws/.gitignore: -------------------------------------------------------------------------------- 1 | logs/*.log 2 | *.ids 3 | go-commander.sh 4 | instance/instance 5 | -------------------------------------------------------------------------------- /aws/configs/aws.json: -------------------------------------------------------------------------------- 1 | { 2 | "regions": [ 3 | { 4 | "name": "pdx", 5 | "ext-name": "us-west-2", 6 | "vpc": { 7 | "id": "vpc-cd3e33b4", 8 | "sg": "sg-020cb5729fa212d43" 9 | }, 10 | "ami": { 11 | "default": "ami-a9d09ed1" 12 | }, 13 | "keypair": "oregon-key-benchmark", 14 | "code": "4" 15 | }, 16 | { 17 | "name": "sfo", 18 | "ext-name": "us-west-1", 19 | "vpc": { 20 | "id": "vpc-bb770fdcd", 21 | "sg": "sg-0a66ccb6ab9161a14" 22 | }, 23 | "ami": { 24 | "default": "ami-e0ba5c83" 25 | }, 26 | "keypair": "california-key-benchmark", 27 | "code": "3" 28 | }, 29 | { 30 | "name": "dub", 31 | "ext-name": "eu-west-1", 32 | "vpc": { 33 | "id": "vpc-80166ce6", 34 | "sg": "sg-0aa8954acb79fdb58" 35 | }, 36 | "ami": { 37 | "default": "ami-466768ac" 38 | }, 39 | "keypair": "ireland-key-benchmark", 40 | "code": "8" 41 | }, 42 | { 43 | "name": "nrt", 44 | "ext-name": "ap-northeast-1", 45 | "vpc": { 46 | "id": "vpc-dd631cba", 47 | "sg": "sg-009aeb97f675c1ad5" 48 | }, 49 | "ami": { 50 | "default": "ami-e99f4896" 51 | }, 52 | "keypair": "tokyo-key-benchmark", 53 | "code": "5" 54 | }, 55 | { 56 | "name": "fra", 57 | "ext-name": "eu-central-1", 58 | "vpc": { 59 | "id": "vpc-94246aff", 60 | "sg": "sg-0bb06fcd8b25b5910" 61 | }, 62 | "ami": { 63 | "default": "ami-7c4f7097" 64 | }, 65 | "keypair": "frankfurt-key-benchmark", 66 | "code": "7" 67 | }, 68 | { 69 | "name": "cmh", 70 | "ext-name": "us-east-2", 71 | "vpc": { 72 | "id": "vpc-2c420a44", 73 | "sg": "sg-0789078f1c76defbe" 74 | }, 75 | "ami": { 76 | "default": "ami-8c122be9" 77 | }, 78 | "keypair": "ohio-key-benchmark", 79 | "code": "2" 80 | }, 81 | { 82 | "name": "sin", 83 | "ext-name": "ap-southeast-1", 84 | "vpc": { 85 | "id": "vpc-864103e1", 86 | "sg": "sg-05f9b60044a19dfb2" 87 | }, 88 | "ami": { 89 | "default": "ami-05868579" 90 | }, 91 | "keypair": "singapore-key-benchmark", 92 | "code": "6" 93 | }, 94 | { 95 | "name": "iad", 96 | "ext-name": "us-east-1", 97 | "vpc": { 98 | "id": "vpc-88c9c2f3", 99 | "sg": "sg-04d0b62ee08ce8800" 100 | }, 101 | "ami": { 102 | "default": "ami-b70554c8" 103 | }, 104 | "keypair": "virginia-key-benchmark", 105 | "code": "1" 106 | } 107 | ], 108 | "keyfiles": [ 109 | { 110 | "keypair": "california-key-benchmark", 111 | "keyfile": "../keys/california-key-benchmark.pem" 112 | }, 113 | { 114 | "keypair": "ireland-key-benchmark", 115 | "keyfile": "../keys/ireland-key-benchmark.pem" 116 | }, 117 | { 118 | "keypair": "oregon-key-benchmark", 119 | "keyfile": "../keys/oregon-key-benchmark.pem" 120 | }, 121 | { 122 | "keypair": "tokyo-key-benchmark", 123 | "keyfile": "../keys/tokyo-key-benchmark.pem" 124 | }, 125 | { 126 | "keypair": "frankfurt-key-benchmark", 127 | "keyfile": "../keys/frankfurt-key-benchmark.pem" 128 | }, 129 | { 130 | "keypair": "ohio-key-benchmark", 131 | "keyfile": "../keys/ohio-key-benchmark.pem" 132 | }, 133 | { 134 | "keypair": "singapore-key-benchmark", 135 | "keyfile": "../keys/singapore-key-benchmark.pem" 136 | }, 137 | { 138 | "keypair": "virginia-key-benchmark", 139 | "keyfile": "../keys/virginia-key-benchmark.pem" 140 | } 141 | ], 142 | "userdata": [ 143 | { 144 | "name": "http:", 145 | "file": "../../configs/userdata-soldier-http.sh" 146 | }, 147 | { 148 | "name": "legacy", 149 | "file": "../../configs/userdata-soldier.sh" 150 | } 151 | ], 152 | "instance": [ 153 | { 154 | "name": "t3.micro", 155 | "price": 0.0104 156 | }, 157 | { 158 | "name": "t2.micro", 159 | "price": 0.0116 160 | } 161 | ] 162 | } -------------------------------------------------------------------------------- /azure/common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # init all the environment variables and configurations 4 | 5 | #login to azure using your credentials 6 | az account show 1> /dev/null 7 | 8 | if [ $? != 0 ]; 9 | then 10 | az login 11 | fi 12 | 13 | CONFIG=configs/azure-env.json 14 | # set mono, raw output 15 | JQ="jq -M -r" 16 | 17 | SUBSCRIPTION=$($JQ .subscriptionId $CONFIG) 18 | REGIONS=( $($JQ ' .regions | .[] ' $CONFIG) ) 19 | 20 | # AZ allows <= 800 resource per deployment 21 | # one VM takes 4 resources, thus we can only launch <= 200 per deployment 22 | MAX_PER_DEPLOY=200 23 | MAX_NUM_RG=10 24 | MAX_VM_PER_REGION=$(( $MAX_PER_DEPLOY * 4 * $MAX_NUM_RG )) 25 | 26 | #set the default subscription id 27 | az account set --subscription $SUBSCRIPTION 28 | 29 | #check the region is valid or not 30 | function is_valid_region 31 | { 32 | local match=1 33 | local r=$1 34 | 35 | if [ -z "$r" ]; then 36 | return $match 37 | fi 38 | 39 | for region in "${REGIONS[@]}"; do 40 | # run on specificed region 41 | if [ "$region" != "$r" ]; then 42 | continue 43 | else 44 | match=0 45 | break 46 | fi 47 | done 48 | 49 | return $match 50 | } 51 | -------------------------------------------------------------------------------- /azure/configs/azure-env.json: -------------------------------------------------------------------------------- 1 | { 2 | "subscriptionId": "8f969b5c-f8cb-4483-8252-354a929962e0", 3 | "regions": [ 4 | "westeurope", 5 | "eastus", 6 | "southeastasia" 7 | ] 8 | } -------------------------------------------------------------------------------- /azure/configs/azure-small.json: -------------------------------------------------------------------------------- 1 | { 2 | "westeurope": { 3 | "instancetype": "Standard_B1s", 4 | "instancecount": 1, 5 | "rg": "hb-rg-westeurope-0825" 6 | }, 7 | "eastus": { 8 | "instancetype": "Standard_B1s", 9 | "instancecount": 10, 10 | "rg": "hb-rg-eastus-0825" 11 | }, 12 | "southeastasia": { 13 | "instancetype": "Standard_B1s", 14 | "instancecount": 1, 15 | "rg": "hb-rg-southeastasia-0825" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /azure/configs/vnet-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "start": { 6 | "value": "100" 7 | }, 8 | "count": { 9 | "value": 1 10 | }, 11 | "region": { 12 | "value": "eastus" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /azure/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | IFS=$'\n\t' 4 | 5 | # -e: immediately exit if any command has a non-zero exit status 6 | # -o: prevents errors in a pipeline from being masked 7 | # IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@) 8 | 9 | usage() { echo "Usage: $0 -i -g -n -l -t -v -p " 1>&2; exit 1; } 10 | 11 | declare subscriptionId="" 12 | declare resourceGroupName="" 13 | declare deploymentName="" 14 | declare resourceGroupLocation="" 15 | declare templateFilePath="" 16 | declare parametersFilePath="" 17 | declare parameterString="" 18 | 19 | # Initialize parameters specified from command line 20 | while getopts ":i:g:n:l:t:v:p:h" arg; do 21 | case "${arg}" in 22 | h) 23 | usage 24 | ;; 25 | i) 26 | subscriptionId=${OPTARG} 27 | ;; 28 | g) 29 | resourceGroupName=${OPTARG} 30 | ;; 31 | n) 32 | deploymentName=${OPTARG} 33 | ;; 34 | l) 35 | resourceGroupLocation=${OPTARG} 36 | ;; 37 | t) 38 | templateFilePath=${OPTARG} 39 | ;; 40 | v) 41 | parametersFilePath=${OPTARG} 42 | ;; 43 | p) 44 | parameterString=${OPTARG} 45 | ;; 46 | esac 47 | done 48 | shift $((OPTIND-1)) 49 | 50 | #Prompt for parameters is some required parameters are missing 51 | if [[ -z "$subscriptionId" ]]; then 52 | echo "Your subscription ID can be looked up with the CLI using: az account show --out json " 53 | echo "Enter your subscription ID:" 54 | read subscriptionId 55 | [[ "${subscriptionId:?}" ]] 56 | fi 57 | 58 | if [[ -z "$resourceGroupName" ]]; then 59 | echo "This script will look for an existing resource group, otherwise a new one will be created " 60 | echo "You can create new resource groups with the CLI using: az group create " 61 | echo "Enter a resource group name" 62 | read resourceGroupName 63 | [[ "${resourceGroupName:?}" ]] 64 | fi 65 | 66 | if [[ -z "$deploymentName" ]]; then 67 | echo "Enter a name for this deployment:" 68 | read deploymentName 69 | fi 70 | 71 | if [[ -z "$resourceGroupLocation" ]]; then 72 | echo "If creating a *new* resource group, you need to set a location " 73 | echo "You can lookup locations with the CLI using: az account list-locations " 74 | 75 | echo "Enter resource group location:" 76 | read resourceGroupLocation 77 | fi 78 | 79 | if [ ! -f "$templateFilePath" ]; then 80 | echo "$templateFilePath not found" 81 | exit 1 82 | fi 83 | 84 | if [ ! -f "$parametersFilePath" ]; then 85 | echo "$parametersFilePath not found" 86 | exit 1 87 | fi 88 | 89 | if [ -z "$subscriptionId" ] || [ -z "$resourceGroupName" ] || [ -z "$deploymentName" ]; then 90 | echo "Either one of subscriptionId, resourceGroupName, deploymentName is empty" 91 | usage 92 | fi 93 | 94 | #login to azure using your credentials 95 | az account show 1> /dev/null 96 | 97 | if [ $? != 0 ]; 98 | then 99 | az login 100 | fi 101 | 102 | #set the default subscription id 103 | az account set --subscription $subscriptionId 104 | 105 | set +e 106 | 107 | #Check for existing RG 108 | az group show --name $resourceGroupName 1> /dev/null 109 | 110 | if [ $? != 0 ]; then 111 | echo "Resource group with name" $resourceGroupName "could not be found. Creating new resource group.." 112 | set -e 113 | ( 114 | set -x 115 | az group create --name $resourceGroupName --location $resourceGroupLocation 1> /dev/null 116 | ) 117 | else 118 | echo "Using existing resource group..." 119 | fi 120 | 121 | #Start deployment 122 | echo "Starting deployment..." 123 | ( 124 | set -x 125 | az group deployment create --name "$deploymentName" --resource-group "$resourceGroupName" --template-file "$templateFilePath" --parameters @${parametersFilePath} ${parameterString} region=$resourceGroupLocation 126 | ) 127 | 128 | if [ $? == 0 ]; 129 | then 130 | echo "Template has been successfully deployed" 131 | fi 132 | -------------------------------------------------------------------------------- /azure/go-az.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | source ./common.sh 6 | 7 | SUFFIX=${WHOAMI:-$USER} 8 | # use 10 resource group, can launch up to 800*10=8000 vms in one region 9 | GROUP=$MAX_NUM_RG 10 | 11 | function usage 12 | { 13 | ME=$(basename $0) 14 | cat< configs/$region.ips 90 | cat configs/$region.ips >> configs/raw_ip.txt 91 | done 92 | date 93 | } 94 | 95 | function delete_vms 96 | { 97 | date 98 | for region in ${REGIONS[@]}; do 99 | ./instances.sh -r $region -G terminate 100 | done 101 | date 102 | } 103 | 104 | function deinit_region 105 | { 106 | date 107 | for region in ${REGIONS[@]}; do 108 | ./region.sh -r $region list 109 | ./region.sh -r $region -y delete 110 | done 111 | date 112 | 113 | echo Please check back in 1 hour on the resource group in case they are not deleted 114 | echo using ./regin.sh -r REGION list 115 | } 116 | 117 | function purge_resources 118 | { 119 | for region in ${REGIONS[@]}; do 120 | ./region.sh -r $region -y purge 121 | done 122 | } 123 | 124 | ############################### 125 | while getopts "hs:g:" option; do 126 | case $option in 127 | h) usage ;; 128 | s) SUFFIX=$OPTARG ;; 129 | g) GROUP=$OPTARG ;; 130 | esac 131 | done 132 | 133 | shift $(($OPTIND-1)) 134 | 135 | ACTION=${1:-help} 136 | NUM_VMS=${2:-$MAX_NUM_RG} 137 | 138 | if [ $NUM_VMS -lt $MAX_NUM_RG ]; then 139 | NUM_VMS=$MAX_NUM_RG 140 | fi 141 | 142 | if [ $NUM_VMS -gt $MAX_VM_PER_REGION ]; then 143 | NUM_VMS=$MAX_VM_PER_REGION 144 | echo Can only launch up to $MAX_VM_PER_REGION VMs per region, set NUM_VMS to $MAX_VM_PER_REGION 145 | fi 146 | 147 | case "$ACTION" in 148 | "init") init_region ;; 149 | "launch") launch_vms ;; 150 | "delete") delete_vms ;; 151 | "deinit") deinit_region ;; 152 | "listip") list_ips ;; 153 | "purge") purge_resources ;; 154 | *) usage ;; 155 | esac 156 | 157 | # TODO: support one region, in case of failure 158 | # TODO: handle failed deployment 159 | # TODO: handle partial failure of the deployment 160 | -------------------------------------------------------------------------------- /configs/aws-explorer.json: -------------------------------------------------------------------------------- 1 | { 2 | "regions": [ 3 | { 4 | "name": "pdx", 5 | "ext-name": "us-west-2", 6 | "vpc": { 7 | "id": "vpc-cd3e33b4", 8 | "sg": "sg-02d9aae7e39f79a19" 9 | }, 10 | "ami": { 11 | "default": "ami-0d6621c01e8c2de2c" 12 | }, 13 | "limit": { 14 | "t3.micro": 3000, 15 | "t2.micro": 3000 16 | }, 17 | "keypair": "harmony-testnet", 18 | "code": "4" 19 | }, 20 | { 21 | "name": "sfo", 22 | "ext-name": "us-west-1", 23 | "vpc": { 24 | "id": "vpc-bb770fdcd", 25 | "sg": "sg-00875ae5aa60f9733" 26 | }, 27 | "ami": { 28 | "default": "ami-06fcc1f0bc2c8943f" 29 | }, 30 | "limit": { 31 | "t3.micro": 1500, 32 | "t2.micro": 3000 33 | }, 34 | "keypair": "harmony-testnet", 35 | "code": "3" 36 | }, 37 | { 38 | "name": "dub", 39 | "ext-name": "eu-west-1", 40 | "vpc": { 41 | "id": "vpc-80166ce6", 42 | "sg": "sg-08a8733d97ec75e08" 43 | }, 44 | "ami": { 45 | "default": "ami-06ce3edf0cff21f07" 46 | }, 47 | "limit": { 48 | "t3.micro": 3000, 49 | "t2.micro": 3000 50 | }, 51 | "keypair": "harmony-testnet", 52 | "code": "8" 53 | }, 54 | { 55 | "name": "nrt", 56 | "ext-name": "ap-northeast-1", 57 | "vpc": { 58 | "id": "vpc-dd631cba", 59 | "sg": "sg-08123a4b151c2ebba" 60 | }, 61 | "ami": { 62 | "default": "ami-0f310fced6141e627" 63 | }, 64 | "limit": { 65 | "t3.micro": 1000, 66 | "t2.micro": 3000 67 | }, 68 | "keypair": "harmony-testnet", 69 | "code": "5" 70 | }, 71 | { 72 | "name": "fra", 73 | "ext-name": "eu-central-1", 74 | "vpc": { 75 | "id": "vpc-94246aff", 76 | "sg": "sg-08a2b143e8870d8a5" 77 | }, 78 | "ami": { 79 | "default": "ami-076431be05aaf8080" 80 | }, 81 | "limit": { 82 | "t3.micro": 1000, 83 | "t2.micro": 3000 84 | }, 85 | "keypair": "harmony-testnet", 86 | "code": "7" 87 | }, 88 | { 89 | "name": "cmh", 90 | "ext-name": "us-east-2", 91 | "vpc": { 92 | "id": "vpc-2c420a44", 93 | "sg": "sg-061c334b084470b15" 94 | }, 95 | "ami": { 96 | "default": "ami-0f7919c33c90f5b58" 97 | }, 98 | "limit": { 99 | "t3.micro": 3000, 100 | "t2.micro": 3000 101 | }, 102 | "keypair": "harmony-testnet", 103 | "code": "2" 104 | }, 105 | { 106 | "name": "sin", 107 | "ext-name": "ap-southeast-1", 108 | "vpc": { 109 | "id": "vpc-864103e1", 110 | "sg": "sg-089af85c49b5a1914" 111 | }, 112 | "ami": { 113 | "default": "ami-0ec225b5e01ccb706" 114 | }, 115 | "limit": { 116 | "t3.micro": 3000, 117 | "t2.micro": 3000 118 | }, 119 | "keypair": "harmony-testnet", 120 | "code": "6" 121 | }, 122 | { 123 | "name": "iad", 124 | "ext-name": "us-east-1", 125 | "vpc": { 126 | "id": "vpc-88c9c2f3", 127 | "sg": "sg-06a73edb69d2967d3" 128 | }, 129 | "ami": { 130 | "default": "ami-0323c3dd2da7fb37d" 131 | }, 132 | "limit": { 133 | "t3.micro": 1000, 134 | "t2.micro": 3000 135 | }, 136 | "keypair": "harmony-testnet", 137 | "code": "1" 138 | } 139 | ], 140 | "keyfiles": [ 141 | { 142 | "keypair": "harmony-testnet", 143 | "keyfile": "../keys/harmony-testnet.pem" 144 | } 145 | ], 146 | "userdata": [ 147 | { 148 | "name": "http:", 149 | "file": "../../configs/userdata-soldier-http.sh" 150 | }, 151 | { 152 | "name": "legacy", 153 | "file": "../../configs/userdata-soldier.sh" 154 | } 155 | ], 156 | "instance": [ 157 | { 158 | "name": "t3.micro", 159 | "price": 0.0104 160 | }, 161 | { 162 | "name": "t3.small", 163 | "price": 0.0209 164 | }, 165 | { 166 | "name": "t3.medium", 167 | "price": 0.0418 168 | }, 169 | { 170 | "name": "t3.large", 171 | "price": 0.0835 172 | }, 173 | { 174 | "name": "t2.micro", 175 | "price": 0.0116 176 | }, 177 | { 178 | "name": "m5a.large", 179 | "price": 0.086 180 | }, 181 | { 182 | "name": "m5.large", 183 | "price": 0.106 184 | }, 185 | { 186 | "name": "c5.large", 187 | "price": 0.1 188 | } 189 | ] 190 | } 191 | -------------------------------------------------------------------------------- /configs/aws.json: -------------------------------------------------------------------------------- 1 | { 2 | "regions": [ 3 | { 4 | "name": "pdx", 5 | "ext-name": "us-west-2", 6 | "vpc": { 7 | "id": "vpc-cd3e33b4", 8 | "sg": "sg-020cb5729fa212d43" 9 | }, 10 | "ami": { 11 | "default": "ami-0d6621c01e8c2de2c" 12 | }, 13 | "limit": { 14 | "t3.micro": 3000, 15 | "t2.micro": 3000 16 | }, 17 | "keypair": "harmony-testnet", 18 | "code": "4" 19 | }, 20 | { 21 | "name": "sfo", 22 | "ext-name": "us-west-1", 23 | "vpc": { 24 | "id": "vpc-bb770fdcd", 25 | "sg": "sg-0a66ccb6ab9161a14" 26 | }, 27 | "ami": { 28 | "default": "ami-06fcc1f0bc2c8943f" 29 | }, 30 | "limit": { 31 | "t3.micro": 1500, 32 | "t2.micro": 3000 33 | }, 34 | "keypair": "harmony-testnet", 35 | "code": "3" 36 | }, 37 | { 38 | "name": "dub", 39 | "ext-name": "eu-west-1", 40 | "vpc": { 41 | "id": "vpc-80166ce6", 42 | "sg": "sg-0aa8954acb79fdb58" 43 | }, 44 | "ami": { 45 | "default": "ami-06ce3edf0cff21f07" 46 | }, 47 | "limit": { 48 | "t3.micro": 3000, 49 | "t2.micro": 3000 50 | }, 51 | "keypair": "harmony-testnet", 52 | "code": "8" 53 | }, 54 | { 55 | "name": "nrt", 56 | "ext-name": "ap-northeast-1", 57 | "vpc": { 58 | "id": "vpc-dd631cba", 59 | "sg": "sg-009aeb97f675c1ad5" 60 | }, 61 | "ami": { 62 | "default": "ami-0f310fced6141e627" 63 | }, 64 | "limit": { 65 | "t3.micro": 1000, 66 | "t2.micro": 3000 67 | }, 68 | "keypair": "harmony-testnet", 69 | "code": "5" 70 | }, 71 | { 72 | "name": "fra", 73 | "ext-name": "eu-central-1", 74 | "vpc": { 75 | "id": "vpc-94246aff", 76 | "sg": "sg-0bb06fcd8b25b5910" 77 | }, 78 | "ami": { 79 | "default": "ami-076431be05aaf8080" 80 | }, 81 | "limit": { 82 | "t3.micro": 1000, 83 | "t2.micro": 3000 84 | }, 85 | "keypair": "harmony-testnet", 86 | "code": "7" 87 | }, 88 | { 89 | "name": "cmh", 90 | "ext-name": "us-east-2", 91 | "vpc": { 92 | "id": "vpc-2c420a44", 93 | "sg": "sg-0789078f1c76defbe" 94 | }, 95 | "ami": { 96 | "default": "ami-0f7919c33c90f5b58" 97 | }, 98 | "limit": { 99 | "t3.micro": 3000, 100 | "t2.micro": 3000 101 | }, 102 | "keypair": "harmony-testnet", 103 | "code": "2" 104 | }, 105 | { 106 | "name": "sin", 107 | "ext-name": "ap-southeast-1", 108 | "vpc": { 109 | "id": "vpc-864103e1", 110 | "sg": "sg-05f9b60044a19dfb2" 111 | }, 112 | "ami": { 113 | "default": "ami-0ec225b5e01ccb706" 114 | }, 115 | "limit": { 116 | "t3.micro": 3000, 117 | "t2.micro": 3000 118 | }, 119 | "keypair": "harmony-testnet", 120 | "code": "6" 121 | }, 122 | { 123 | "name": "iad", 124 | "ext-name": "us-east-1", 125 | "vpc": { 126 | "id": "vpc-88c9c2f3", 127 | "sg": "sg-04d0b62ee08ce8800" 128 | }, 129 | "ami": { 130 | "default": "ami-0323c3dd2da7fb37d" 131 | }, 132 | "limit": { 133 | "t3.micro": 1000, 134 | "t2.micro": 3000 135 | }, 136 | "keypair": "harmony-testnet", 137 | "code": "1" 138 | } 139 | ], 140 | "keyfiles": [ 141 | { 142 | "keypair": "harmony-testnet", 143 | "keyfile": "../keys/harmony-testnet.pem" 144 | } 145 | ], 146 | "userdata": [ 147 | { 148 | "name": "http:", 149 | "file": "../../configs/userdata-soldier-http.sh" 150 | }, 151 | { 152 | "name": "legacy", 153 | "file": "../../configs/userdata-soldier.sh" 154 | } 155 | ], 156 | "instance": [ 157 | { 158 | "name": "t3.micro", 159 | "price": 0.0104 160 | }, 161 | { 162 | "name": "t3.small", 163 | "price": 0.0209 164 | }, 165 | { 166 | "name": "t3.medium", 167 | "price": 0.0418 168 | }, 169 | { 170 | "name": "t3.large", 171 | "price": 0.0835 172 | }, 173 | { 174 | "name": "t2.micro", 175 | "price": 0.0116 176 | }, 177 | { 178 | "name": "m5a.large", 179 | "price": 0.086 180 | }, 181 | { 182 | "name": "m5.large", 183 | "price": 0.106 184 | }, 185 | { 186 | "name": "c5.large", 187 | "price": 0.1 188 | } 189 | ] 190 | } 191 | -------------------------------------------------------------------------------- /configs/b1-8874.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpwkwggSjAgEAAoIBAQDKqUymdP2NUe/4TyrfwcebraIDjEovkH/YUDqg5Ca9FNPEaJrT3OAEI4QuonODWtLMy7DKv15rmmy7wCOpotc28r0MxrNOpd9LIs4GVuEtaxulcJfeDruU5qk0FC588wDCEeqcsJjjWUENXn509zU5jJ2f1YCLUrLsD8rkDZgwmuRCj0q5M43FL8Bej+STS0v+PU7gbfzqssS32gCdjymZkx+8gQwa8BvrgcDJZqax8/Tc+OvzmBCnYK40HG+etDfCdK8Cksl0fYWzTAYL6lOaKZeI12wIXTweX/MD+rNOxS9U1Fg9OSVkojO2o744QqU79NRMZ7h4GN1LllzqlGw1AgMBAAECggEAWzhnOwmv0zuNc0xXNQ5pRYabRVORVOWK1hgOu7rWQQet5ltbTX+/Cb3e0ormybpI5kvNEQWgf3ir9rqeks2sZ5xNQgHyVbVN0+kfqTTT+HicohQTF62z+2rzwHBRGIbc0X31B4Bp4POc12KwMv/O4k+L55TXXl7kEGNvZMVFuqJAeX8sTQa1ABijPnvD7pDhq/TKUSH64FXHwK/BkyrQETzqhmZd9YMGa4yS2/IeQargv7LyeZUcRI0pDbZdzSchK6o/ioCRWtMMPXrL72wDcLUGHI4TRLHBfkl3rFVDyNa93L6ZER4iQaZc862gNA02puTCGlXpcziygYNAPtkPAQKBgQDqFXONQxZTHbuxHv5LXx/s+mpIu67hsWmpcMCZ8PLseNgmPahyLRWXpW/L2YnsXDRqI9DY8mRAApAMZaF4SyIjQjlyqksak/bMBAYw85vnZddaulAGYob+E2ZBlwJkJXrDt9fbD2KxdcB1FxSCR0eQDygMSVmYyQ3w4xzk8CDO9QKBgQDdorXkzpAcmCXmc2Ut9Hj8yYCc5O7Ea8vIdQC3w7wIrQ7X5jJJucaFx1viIqXIt3kSIAo6arC0hT+YgSu2N7bJTACCFePvue44wX8u9NjwBVm4QjeX42Q+O8GWpXLYYYwb1GtEw59rt3lz5zGLb97l9t6h7BelSwh6g0Zqo5RgQQKBgDIdm5qfxVTQJdH677iVShGDX2PpAr0BLb0ADcwngOrNyIEPbFPdgSTxX2kGTvgSmYor1tfLtVja85oj3BkUBOAFmqUI/oFXMlxldCngzf0RmbSr9NwZFgupfZgHS5TDTXA/mPAmcBvMOQMYiOSHfDPEeu9+eLc0PE7ZYONG4c9NAoGAQ/7JIvskR0F+TycT4XdhLtx68qdhgS05BbSvlbEdHORK632Z6/hsqVoyHDxY9C0lnaPqv2U/9QH0MsteJ7cMAtGoTkB8/2zhYtQqOrOvYmOh1N+rwpNmi5k1mQwFIdE7dMZEaoJBhIBzaFWDY63cilykjLSrxHAyl7NyhQDOYoECgYEAxZZYOnIx6z0+HAIpjo/KmoH7eyso3l1MGFJWX5drFw5fjata/cnYsgJ4jYLECV6drcuGRvXHo68iznW+sc/RCPC5en28fq59XpJl4+p+eBySAXPq0yCPNHUPUV/7FnVJUf7xfL282TpweQ9uskx+klpytBDgthSL7ePUKr7teXA=" 3 | } -------------------------------------------------------------------------------- /configs/b1-9870.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqAkwggSkAgEAAoIBAQDUOaaVGjaHsQPmHWTjYVxsrM7NLpSIMAYqxQ5NwiBBE4lY63MVIE1Uht0Ip1k5uKghlC+hMvTG1Q+l1vpAgG6Kk8JsmKgHCQxmHjGf/0V0WEhlql4PURxz37uOkphFO2jG4gJ67z+eqAJRnmCWZNYYJOKzfaHiCv64rQdM59Hql/+s0jSVevmZr5xfjgZpgI9uNr75rM9WI+yozRDq2y1eXTqoc38AutacFsHUbu+bVdXyZOyDv/4Gkl3NC1hTX7uUos62C7rvKK5rMqrtln8HdXAt0t+TLEA0kjE/KJtJ0fXFaBsqLnX8MyIjbYgADvRPhcPKyx2BBnOlCrlNdYL/AgMBAAECggEBAMQAZpBIQFp7qt0pApdZwRGBXBF11qocqGVxzy8TfdR8ZZohAg1d4u2RDKzEWgyMNYOlp4OaWyUTe7svW7qcovsLUkIXjv/IZJIfird4/D1il6KFgQ9mWv/NfxxC2az/HFqqO54sPjaadmHJAu2DPZPY5SLegdcRToVjEF3/sAiXH4DahVbADSE1eChPJUln6Nmb6WIeMNbYRvslI6I09EdQZPX78DOKZRzJrGSb7ugBLgcta8En317XBW2+O/d1bf5LOj/UsGBhJtqkFF4TQ19xnILYYTmrLwVv4lakBxh8M3FSjUnA2szRT/uBsxQJG5KQaV6j7KOqAGvUJu2vjOECgYEA2fgxa7U+uPro/vRIPIIiuxzOVeC+n8Lv2ww79YoHd6zJArF9jURxJ//zzj+OgUctzoBLlb+NTkF2St11STDee8LEnGN0oip78KdmqI/VlsrR3Sk6sG0i31jLHIPs3H31K14wpqSFmg9yH8eypktNTgD386VCyEe0QodvDOnQ2e8CgYEA+UDiC5mB+f2LSkfEzYSGrmKvuouKGUXKQFD9M5/lIzUZ96ynGvRQT6o4wyksxHElJg2e4/U7fGqXlDdgDKYtMbYXfus/F6FW0mW1FLv/SVOhdJsUxulziDc8tYOm2KQIJuaImIsqdBDw856FCIAV4dN1SVBIhEquNo43cX1aN/ECgYEAxMv8uvWKavNHmKGv8snAV9Y7SXhAQ/h6HPjfzeJQubGMT103MWvhCq9iTg4+OOSuK+rT06F+EHC0QAXRFkMELRN99oEpVh0rh+1sl7Y9rwbyEk9eSNpQiP0fbWCDY9Rpnj1NibezVJSrgpwH5XLJmirvs9C7Ch8LVqH3Ft6ojYsCgYBf2HxTu47Ig5+5S4m5AboMerRaRmgvObABNWN4I4coF7ZJkCGd8s6jI7C6Ey48x8liLaCoxdc/C3oIK5cKpigA0qWMT4euXYMWWrfcJkKPftI6FZxStNiRS7RTlDFnYwQjeUiTaAhGI3GULKO5Vg+UDA0wyOdpv5HoNp3JTUuQ8QKBgALoqBQ9ZfrI6BkMvTb21A3rAz892jcE4Sc9vnqK/I8YsP8F/r3TB/eMzmVVXVaYdt8CgCSbuo8Pty/zoIDHIzN9aj9M9DQKnx6pwQG/HogImo8vNd87LlhQUboQUBNpYZOIFqe13BoxEDJUzpZpXG2VrDesCMgiwBO2GWoBLXes" 3 | } -------------------------------------------------------------------------------- /configs/b1-9871.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqAkwggSkAgEAAoIBAQDUOaaVGjaHsQPmHWTjYVxsrM7NLpSIMAYqxQ5NwiBBE4lY63MVIE1Uht0Ip1k5uKghlC+hMvTG1Q+l1vpAgG6Kk8JsmKgHCQxmHjGf/0V0WEhlql4PURxz37uOkphFO2jG4gJ67z+eqAJRnmCWZNYYJOKzfaHiCv64rQdM59Hql/+s0jSVevmZr5xfjgZpgI9uNr75rM9WI+yozRDq2y1eXTqoc38AutacFsHUbu+bVdXyZOyDv/4Gkl3NC1hTX7uUos62C7rvKK5rMqrtln8HdXAt0t+TLEA0kjE/KJtJ0fXFaBsqLnX8MyIjbYgADvRPhcPKyx2BBnOlCrlNdYL/AgMBAAECggEBAMQAZpBIQFp7qt0pApdZwRGBXBF11qocqGVxzy8TfdR8ZZohAg1d4u2RDKzEWgyMNYOlp4OaWyUTe7svW7qcovsLUkIXjv/IZJIfird4/D1il6KFgQ9mWv/NfxxC2az/HFqqO54sPjaadmHJAu2DPZPY5SLegdcRToVjEF3/sAiXH4DahVbADSE1eChPJUln6Nmb6WIeMNbYRvslI6I09EdQZPX78DOKZRzJrGSb7ugBLgcta8En317XBW2+O/d1bf5LOj/UsGBhJtqkFF4TQ19xnILYYTmrLwVv4lakBxh8M3FSjUnA2szRT/uBsxQJG5KQaV6j7KOqAGvUJu2vjOECgYEA2fgxa7U+uPro/vRIPIIiuxzOVeC+n8Lv2ww79YoHd6zJArF9jURxJ//zzj+OgUctzoBLlb+NTkF2St11STDee8LEnGN0oip78KdmqI/VlsrR3Sk6sG0i31jLHIPs3H31K14wpqSFmg9yH8eypktNTgD386VCyEe0QodvDOnQ2e8CgYEA+UDiC5mB+f2LSkfEzYSGrmKvuouKGUXKQFD9M5/lIzUZ96ynGvRQT6o4wyksxHElJg2e4/U7fGqXlDdgDKYtMbYXfus/F6FW0mW1FLv/SVOhdJsUxulziDc8tYOm2KQIJuaImIsqdBDw856FCIAV4dN1SVBIhEquNo43cX1aN/ECgYEAxMv8uvWKavNHmKGv8snAV9Y7SXhAQ/h6HPjfzeJQubGMT103MWvhCq9iTg4+OOSuK+rT06F+EHC0QAXRFkMELRN99oEpVh0rh+1sl7Y9rwbyEk9eSNpQiP0fbWCDY9Rpnj1NibezVJSrgpwH5XLJmirvs9C7Ch8LVqH3Ft6ojYsCgYBf2HxTu47Ig5+5S4m5AboMerRaRmgvObABNWN4I4coF7ZJkCGd8s6jI7C6Ey48x8liLaCoxdc/C3oIK5cKpigA0qWMT4euXYMWWrfcJkKPftI6FZxStNiRS7RTlDFnYwQjeUiTaAhGI3GULKO5Vg+UDA0wyOdpv5HoNp3JTUuQ8QKBgALoqBQ9ZfrI6BkMvTb21A3rAz892jcE4Sc9vnqK/I8YsP8F/r3TB/eMzmVVXVaYdt8CgCSbuo8Pty/zoIDHIzN9aj9M9DQKnx6pwQG/HogImo8vNd87LlhQUboQUBNpYZOIFqe13BoxEDJUzpZpXG2VrDesCMgiwBO2GWoBLXes" 3 | } -------------------------------------------------------------------------------- /configs/b1-9872.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpwkwggSjAgEAAoIBAQC/s++q0I8tAIniMft2buAFI3qVCoalIH0O/D8YfxNPaNL2C1A4dB6Rb8/5t8cPHHXiDWU/JG9xJtUNwycVmdccoTf86ZI3FI39x51+cFlTKvwhhc6XYaOaRdpkoS/RzJvfmzxOoq0iZeQNUEE0XGv1SPE0gmt/Vf9H0HbPtzcpJNUM0ZLUVmuPfuriLdQ3DVoKd2O6CNzam/I3frVITd31Pz8RV0QMrbiLkSP31N5KCfHlvVtObBoZfBUW7gZmOgd9uJe34V+IM1T0B2ZbG4ik+QCKdCYupTbFY5zA2Qp1I2o8OIm5piOUugIRuJO4/TmlPkkhET3wng0Mh58KIDENAgMBAAECggEBAKXZC82hpVxvjNpuF3j8rz6C1Tg/5QDSvJ7MR+HvfktDCs/mNb7BZvi33RvTjJlcK/gnUqJv6SHhUI0ZeqTLdTjFmWRqxh503+rgWTbcB8tV8s8lrfd1d06uhCRu9qnw9CFdca0uO874i3WhKugb1SJdup+M/WcqhTIh/cfyX/xs6qHvCt1SRZ3TJoBHwgWmtnPXQ/CQZgkESo/P7NNS2lj+UkiphnnnX+DndMJHBK1wNjVRpbgDG3J9V6o8cEBaC5ZqVEEuNe386O0LyH/oU+nfOa4uII+Dj12q9bAbdPugI9tXB2mx+yiZ9t8yfSbbqkmCDfJjatVX7hxSiMqmFVkCgYEAzVWfj05T9UaguGeGpiBveDUAqBR2p4NjlsMpxzzYmAQHNHzwSw+S8ASMUa2VKoIGYzQam6KfyW1+o1ASIzq8vw4CtT8a5fEG0/vZLTqR02rNO9ngYLqHAISalROTbmK+rIbTFiNl9qgzvnuKD63SAmCyjnZaL2ERJcVA+QEdR/MCgYEA7wE+zAx3Neg9grKmFgQnzS3V6dHILgUPnUs7j5UJQ2V7I8URQHmiFdWmDxntv3uF8o/mMPwecGpIMALR1Z7wwPGTW9mrFw9dBPvOutJZjyVCvAFaqQu+yOZM2SON/dsovK50/4/1lNLtclTOIkHoJIZLPLpwj5K+Ygayh08L4v8CgYBXFOMQkbWFpihvTGiMd+EOZ9wZbGRN8qj/vVEwkBuDjOHJXttB2h8E78jasvU6C97Nn8FRFA0UDf3RIRowGq8Fj9mSKGst7aRprruSNO63bOoRYfuIylKK47HzW1QBUptu69cF4olRrFAVjqskryELpRrU1Fi3E0GEdT1y3QggBQKBgHrxeQwdnXTtcja5DxZkLNUurssITqDdmZqgCJNjZtB0c1ODG8y+xNHWhQVfoRzOvah4vUCVcFMDWP7ZdHceu1mE6vhkj83c6UyW+1C+w7MOx7VOPQSYNhvB2+YWlAPxqJLmaujLdNiJZ/tYBHE61d9z9V/Xx+8S3TwvlcZkswihAoGARmJYLLP1DGlLhsWkhrhM55xdrmSVi+8f2631VMl/Pv8EHanegAPnxDwhuvPjYOMX+49zpyw1f4YF7Q51aRo4TmKXx2XFFiNFjWsR9eWYCHO07KZo3YBDL7l83coFIc7p7kF3NGgE0RavkZUWoT9GOqitK+LXi9DiNBUBE6mbsFo=" 3 | } -------------------------------------------------------------------------------- /configs/b1-9873.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpgkwggSiAgEAAoIBAQC/p6+5bAFRby9H/9O5121v/AISiC5UJ3Zfs/C7llwd1zSU1WPPEqEJoEeZR5KDY3zAUF8JhEZ8QXsQ8ejU5De8aeSo2mB+b0dBPTDQw33QfJBxgMoXWunK5p2k2433lLLIeAKWC4YflrtSAynL0SqNZDZjbXG/MhopwHxtHE9bCYOMMzd8lEqu7ooKJvqt4MbEqC0Ni4ecWQ+k/t4qQEsPuFdQgOFEy3o1hHsLm3I761oiEI6H6Z+68SBoyZHgHo67fntOqH6lTW+1mIXb31kDdpl3g5/dZH8xrpo+8GkkoB+FaT0YxBYcq4noCaXGZbBFWeJDGJXlccgEA5OnIj6BAgMBAAECggEANaLTLdxJHiY0oDy7X0Yn7XAkkFUmSgzlNvFfzM/OpddFcuWpUhlPkicWApKiMT0Ve6jCgCJRq5KTw3FADNx1sLgd8xdya8/urBZY5APh4QgLUIiPhiu+RDd4JNwBBinKQwo7Bwzgk1SWxeP2vYCjHQDPq9HERJLb+ZVR/SMwHjS1K77Jnx4rYLDNwdZ9ynFyeVqQXiu7bsvcRt9w+W5cHhKHd6ys2J/D/YPlAr0mZe9c5w2vWBQmAyI7bs5gaxvRMFHJcIP+80JA8lW9vEKhH9qxMxusj7ix/Om9iJjmspRLkYPB7Rm6ZCpIQQ2XdtWuE0kAZJekAfsK4srS/V0epQKBgQD/ZSDN83wwmzd/xxbOBd8eEwG30DjU9ppBkRX3c9DRWU9uOsTr1ILRxae4ZnvOf8zZFYl9VE4UAPsqzxCpN29igO3Crp3rarrApJbiVuMlIhWnGYcw9xyIF/YxEWeJGZm0y9G0ALqq5RdXUdV942fRCkFT2EAJzrRMzmL5jwawUwKBgQDAG+gA2nUDE5Y7plBJrOqS7Cy8YtqqkoycmeFzK/gro/n69kV2til3uGcTJQ78a+gyUjXwXLhsWGgDvTvNS3wY1ugvIvktXHk/99S1Je1uEE6wbussCUF6mjSoLbzrcJwrBjOluSui8ClRHyjpnXAeKsOkPTQS9+SJfZkKM1oLWwKBgD8Pg1gXBNUjnkKIsBLS1FKissvmOAItmc0Su+/LwwXOHZTEIhdw85RET7NyaqOEXtpDPR2bEWRTEbFyS1TdAT27Q/nMD+YvBknG2hKtDYz/q4UFAqKOgZcBA6L9/yiVD6Tapr7hZzYHNwoyhJp+6gVtmM/RF47UYSSN2VZxgF9NAoGAH9lAiEuvVHg90tvKubwqE3uGGyFEYTz0hM3aG47xkMKZoeqML5cZnth6dikRp/V3xEfu209z37p0XBJWRL278B5I1e+1YbjP/TPoFrQX/cREV2m8IUvTiDDig/M5O8sqiNN5YoMlYdjw8Jr63GgWe1nZn3PqGy7vu3+QDKngxrsCgYBocDI4PyaBenXFLID9Nauy3llXbXTvubqMVug1n7w3DqPGdnUzxf4kPHhxzZF7zJJ4ofCY+5BgnOiIoMnDSu6wjyvnli97s+9wN+kEkrofP0PJabuw76DuMKcDNtFNOEsEMwUz2ZvtnTnaiTiYULTwEFPCwSDfTyTozgY8f2bDPw==" 3 | } -------------------------------------------------------------------------------- /configs/b1-9874.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqAkwggSkAgEAAoIBAQDUOaaVGjaHsQPmHWTjYVxsrM7NLpSIMAYqxQ5NwiBBE4lY63MVIE1Uht0Ip1k5uKghlC+hMvTG1Q+l1vpAgG6Kk8JsmKgHCQxmHjGf/0V0WEhlql4PURxz37uOkphFO2jG4gJ67z+eqAJRnmCWZNYYJOKzfaHiCv64rQdM59Hql/+s0jSVevmZr5xfjgZpgI9uNr75rM9WI+yozRDq2y1eXTqoc38AutacFsHUbu+bVdXyZOyDv/4Gkl3NC1hTX7uUos62C7rvKK5rMqrtln8HdXAt0t+TLEA0kjE/KJtJ0fXFaBsqLnX8MyIjbYgADvRPhcPKyx2BBnOlCrlNdYL/AgMBAAECggEBAMQAZpBIQFp7qt0pApdZwRGBXBF11qocqGVxzy8TfdR8ZZohAg1d4u2RDKzEWgyMNYOlp4OaWyUTe7svW7qcovsLUkIXjv/IZJIfird4/D1il6KFgQ9mWv/NfxxC2az/HFqqO54sPjaadmHJAu2DPZPY5SLegdcRToVjEF3/sAiXH4DahVbADSE1eChPJUln6Nmb6WIeMNbYRvslI6I09EdQZPX78DOKZRzJrGSb7ugBLgcta8En317XBW2+O/d1bf5LOj/UsGBhJtqkFF4TQ19xnILYYTmrLwVv4lakBxh8M3FSjUnA2szRT/uBsxQJG5KQaV6j7KOqAGvUJu2vjOECgYEA2fgxa7U+uPro/vRIPIIiuxzOVeC+n8Lv2ww79YoHd6zJArF9jURxJ//zzj+OgUctzoBLlb+NTkF2St11STDee8LEnGN0oip78KdmqI/VlsrR3Sk6sG0i31jLHIPs3H31K14wpqSFmg9yH8eypktNTgD386VCyEe0QodvDOnQ2e8CgYEA+UDiC5mB+f2LSkfEzYSGrmKvuouKGUXKQFD9M5/lIzUZ96ynGvRQT6o4wyksxHElJg2e4/U7fGqXlDdgDKYtMbYXfus/F6FW0mW1FLv/SVOhdJsUxulziDc8tYOm2KQIJuaImIsqdBDw856FCIAV4dN1SVBIhEquNo43cX1aN/ECgYEAxMv8uvWKavNHmKGv8snAV9Y7SXhAQ/h6HPjfzeJQubGMT103MWvhCq9iTg4+OOSuK+rT06F+EHC0QAXRFkMELRN99oEpVh0rh+1sl7Y9rwbyEk9eSNpQiP0fbWCDY9Rpnj1NibezVJSrgpwH5XLJmirvs9C7Ch8LVqH3Ft6ojYsCgYBf2HxTu47Ig5+5S4m5AboMerRaRmgvObABNWN4I4coF7ZJkCGd8s6jI7C6Ey48x8liLaCoxdc/C3oIK5cKpigA0qWMT4euXYMWWrfcJkKPftI6FZxStNiRS7RTlDFnYwQjeUiTaAhGI3GULKO5Vg+UDA0wyOdpv5HoNp3JTUuQ8QKBgALoqBQ9ZfrI6BkMvTb21A3rAz892jcE4Sc9vnqK/I8YsP8F/r3TB/eMzmVVXVaYdt8CgCSbuo8Pty/zoIDHIzN9aj9M9DQKnx6pwQG/HogImo8vNd87LlhQUboQUBNpYZOIFqe13BoxEDJUzpZpXG2VrDesCMgiwBO2GWoBLXes" 3 | } -------------------------------------------------------------------------------- /configs/b1-9875.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqQkwggSlAgEAAoIBAQDx3HmCvZqGryLYj/pNCryAgXLtBG17ZA2DQvdCLMuSBFz2RAbkaHJDP62DP3YBponSC8j3oMUhqmbiHl9l/zeGVEiDRfpII1W9HD5njXJT0KOxw0SxBcOSqA98cgJ8kQAgr+lSqXD17ZPwcGf+uhtTMJC/vgtmxUOmJ1GfeotDE7U/SI2NgkeUFJpG7hw+jskS0PsOyPiW+lmmJ2kCxnK2cna94dyK7KvvdO0ExRwNWclb6U5YqdXKcE5s2kLV+Auwy4zNTGM21uXT/ClVsW6e4gdY/5ROxoV9n1cjETD2Z4NevyKFiYSqCMxDFNhaha5G8gqliShj88L86CsU+hkrAgMBAAECggEALFc+U7DNFqofGlLzEZLJUknpNvjb1YZXT9xEFna974wrOt7n4JIheKDA/9HvoYfVtpOAiZ2I5o4mBIiK9tkeZdsn3CFFLFqGCoCWFEgDUMhsalehTU8ANu/mvurr98hhnJyDiysTUZL3z1ncRv/5qHu73dtKndHGgDyvIyzFQUuNbvsGyGxfrDtxfCNt29WBUzzX5bNLOjMtnxNKVwmOvbxNNERRFQbvs/guwmv66yHG+NGAv8IQfbwXwnnaClhSwaUkIGTFBP9a5iyE9oErTqITunsMYWmpzylMmhzjL8knbmxC+csYJPsiPeu3BZHNjAAkEAgadggyhHAB/4b7SQKBgQD4R6xn4TAoqY7Du42MOwmzY9j+9ipDBp7JDntyx1yPg9NvkpBh8ns6UeEbk85dbrveDdSKRMpSARa6ZFdqKSWlPM1PZ/6N541FWJgfj49ilu22Isi9h9AFhgQeLbjExI2FvOvzFnyIWxhFrbz9dEwAg98l1XlaeE8YlPS4lwfZxQKBgQD5YbUfp7Gi+8HoXaIv76zyNpqCZusCk7ye4kSzYs/YQtsir3OKdi57i+Uxtp75nY7aZWberyOVmmuM8oJzrVjHhu/c1/qZuEdvOx7wCPKvq7WgDlU0N/OOCIr4dEfBIVTiF3HIq5/KQd9j8AENhJoL5jGjVWVBSxrByYu3iRyGLwKBgQCEUTZZulJ/KTYzrE3YkVIvL6Ri5PBK/kk7X6N83TDAL4JMcPDPsnnn7+EnYFNXyf8HbZl7AwRMRdZGCdnocvtkH45Ppl2sZN4OOhQApfLFmSggrFMNZ0b+2phxOO7Ctvmxb6jTyYUe6mV6JQiWjxc+IwmW0Tk2dO26bRArHBqL/QKBgQCh18tYM9iQ0ZpSVxH+0ikHOHCl2G0ESyTKaEX1tVb2Hs1ggUUWwwP/ohaoYMBjduFS0yQjuL37RTAvVONcd096jhP02yYDxRh3E4NMfEIjx+gja6nYLceekeS+wZgfuqX/5P8vIFKfTIjRrtzADSJ8PnRQcAc6jKdcxJQsFIuyeQKBgQCfjX/KIC3wo76yDx85d6n+v7p/lUNVarXRzc6BwbP4NeLu9U5xzajWDCtsz2wYkN+kwE0PnB7XJW/aPocxMfpncJlFOREyi1tmJ8Bo4RztpSpwD9RTlatBI3Ot26D56GxWOfgu6otQV1AeHjKZou5WVqzjyftyoAEZb4aLbWwErQ==" 3 | } -------------------------------------------------------------------------------- /configs/b1-9876.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqQkwggSlAgEAAoIBAQCulpvUsBZdIJWAFRZ0BzbKvcEOIKjwy8KB+cF98I9jl2Cm49UcVQy4ob+znYdef8erU1NCoYgGAT32lcRArgEOscQE5OcNKp8dV3LCw1pRlajTb1RxELbbvao10dW9Pb7L9z5tt6P9sorB7yUis6exiXU0jbKB3Hv2lJn2V0R68Y/lLQWX7NUwMsL2GrE8cgAIYxKh3qVP0fo9E4YyBc4gwxt//1vIk1ogIZOPU1Yy66jac30ATs30COA208S/tgZ7bteLx5gysfQfjrAQKn+5rDmqyuFgClAgMSbQZYGUatnq9Kqiev4ZppR61IKnsNk1acJc2s9i9X1gLtLZ1ithAgMBAAECggEBAJ+OOQAZpXaarsaNfyWu6h5DaMn2gy79qNeMX48vaHwF/mjHUx4/hA7AlCgc0XhFoz8qOa9tXJjQTcarfN33qDO7tn8aiyZ3S09PeiwQyNxCwDXrSurB8bvFDGd/S61VXqedX8p5yD+1CibO3ctnENyp2RmcXgVccVYa3NJLUuRfmESaNSrfl72x5F1ItZ3BeAssXzYHEcvPoItAbK/HV6NUOHcfJasBzXlIYVYH5cxpdjnBvf85jgmfVVOqkGftu/RRdx8kj9Mfg1Q5VKx2vMeT69+KxEJNh2aZjN3EPG4SoBmba/CmaZdz+qNe6jrS4G0T96Kq3RPzycjGf73+OIECgYEAxIYw/pPLVTtYr+SS/qpyHBeYPiRjC6vNku4lWVgdNFutBKWXSjm7aqwMZWTtQBiOJYmNLqn2fIrpIXTxoo+3crwrZXHT9cXrrVSCpluhrFaVL2Xdc5vS04tBxJgPrNhaEzdtVseQ6GTAVgEixxky/rWpLdRXPLwQhAkfwvRm/8kCgYEA42zsyVoFtMwg8NXkP2L+4e3Qz/MBaNnbkx+0ZYbGYj6yalcJK0VhaMSpMaBAM02ZZouaFKX3j7lErcsBRnKlX+0g2BK0N9GWy+14ADVyiN53cXN/IRC55PDGgeC56BzUTcYswBHJCRb4CG9YEd8MHqoZexuE7uLVFWTE8ef9itkCgYBAP+bws/z8BoT+LGpqW+smiAg7+MVw4WA6MyV+yjHyFi7AoCqQF8PQIiODWrW+CMkgOJIxuVteaEPDrmn5TacaGa7OYaJ8bZKZflGgdcCriTsI3fLCgyUwCA0eauBlD+6S7cIPZvtXHulKtOBb2z8yys1esFc9AfccU6dQo3qxEQKBgQCFQ/fAyVqcph0LYxrbtePLejKpGCmUSkzremGYOJCZU0nzHEtIKuC4przKUrAsH+Wq/FTuko5tjs/a0yFNKbMUcfyUAOnP56Xom59859TUtR/iwB4XvxhfOmPoCUqG5BXX+S+R4RoflHEFaFGAL2aHtX8271pHLW5VmfX6FsowiQKBgQC5XFPcePDyIp1PFTMfoWc2PnsNTpj2u9uX5lJv91odU+p9p37rsF8C/wjSSWBWOSntqGzzdSfzjLx9WEUh30UYhwgOrXchKreWaKNWzQ7OadNdrmN1csbFBOnRw0KKmOeTJ67Ejc152G6aK1B8m8Trj3Tqy6GRWOSP3W2HdN3Ezg==" 3 | } -------------------------------------------------------------------------------- /configs/b2-8874.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqQkwggSlAgEAAoIBAQCulpvUsBZdIJWAFRZ0BzbKvcEOIKjwy8KB+cF98I9jl2Cm49UcVQy4ob+znYdef8erU1NCoYgGAT32lcRArgEOscQE5OcNKp8dV3LCw1pRlajTb1RxELbbvao10dW9Pb7L9z5tt6P9sorB7yUis6exiXU0jbKB3Hv2lJn2V0R68Y/lLQWX7NUwMsL2GrE8cgAIYxKh3qVP0fo9E4YyBc4gwxt//1vIk1ogIZOPU1Yy66jac30ATs30COA208S/tgZ7bteLx5gysfQfjrAQKn+5rDmqyuFgClAgMSbQZYGUatnq9Kqiev4ZppR61IKnsNk1acJc2s9i9X1gLtLZ1ithAgMBAAECggEBAJ+OOQAZpXaarsaNfyWu6h5DaMn2gy79qNeMX48vaHwF/mjHUx4/hA7AlCgc0XhFoz8qOa9tXJjQTcarfN33qDO7tn8aiyZ3S09PeiwQyNxCwDXrSurB8bvFDGd/S61VXqedX8p5yD+1CibO3ctnENyp2RmcXgVccVYa3NJLUuRfmESaNSrfl72x5F1ItZ3BeAssXzYHEcvPoItAbK/HV6NUOHcfJasBzXlIYVYH5cxpdjnBvf85jgmfVVOqkGftu/RRdx8kj9Mfg1Q5VKx2vMeT69+KxEJNh2aZjN3EPG4SoBmba/CmaZdz+qNe6jrS4G0T96Kq3RPzycjGf73+OIECgYEAxIYw/pPLVTtYr+SS/qpyHBeYPiRjC6vNku4lWVgdNFutBKWXSjm7aqwMZWTtQBiOJYmNLqn2fIrpIXTxoo+3crwrZXHT9cXrrVSCpluhrFaVL2Xdc5vS04tBxJgPrNhaEzdtVseQ6GTAVgEixxky/rWpLdRXPLwQhAkfwvRm/8kCgYEA42zsyVoFtMwg8NXkP2L+4e3Qz/MBaNnbkx+0ZYbGYj6yalcJK0VhaMSpMaBAM02ZZouaFKX3j7lErcsBRnKlX+0g2BK0N9GWy+14ADVyiN53cXN/IRC55PDGgeC56BzUTcYswBHJCRb4CG9YEd8MHqoZexuE7uLVFWTE8ef9itkCgYBAP+bws/z8BoT+LGpqW+smiAg7+MVw4WA6MyV+yjHyFi7AoCqQF8PQIiODWrW+CMkgOJIxuVteaEPDrmn5TacaGa7OYaJ8bZKZflGgdcCriTsI3fLCgyUwCA0eauBlD+6S7cIPZvtXHulKtOBb2z8yys1esFc9AfccU6dQo3qxEQKBgQCFQ/fAyVqcph0LYxrbtePLejKpGCmUSkzremGYOJCZU0nzHEtIKuC4przKUrAsH+Wq/FTuko5tjs/a0yFNKbMUcfyUAOnP56Xom59859TUtR/iwB4XvxhfOmPoCUqG5BXX+S+R4RoflHEFaFGAL2aHtX8271pHLW5VmfX6FsowiQKBgQC5XFPcePDyIp1PFTMfoWc2PnsNTpj2u9uX5lJv91odU+p9p37rsF8C/wjSSWBWOSntqGzzdSfzjLx9WEUh30UYhwgOrXchKreWaKNWzQ7OadNdrmN1csbFBOnRw0KKmOeTJ67Ejc152G6aK1B8m8Trj3Tqy6GRWOSP3W2HdN3Ezg==" 3 | } -------------------------------------------------------------------------------- /configs/b2-9870.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpwkwggSjAgEAAoIBAQDKqUymdP2NUe/4TyrfwcebraIDjEovkH/YUDqg5Ca9FNPEaJrT3OAEI4QuonODWtLMy7DKv15rmmy7wCOpotc28r0MxrNOpd9LIs4GVuEtaxulcJfeDruU5qk0FC588wDCEeqcsJjjWUENXn509zU5jJ2f1YCLUrLsD8rkDZgwmuRCj0q5M43FL8Bej+STS0v+PU7gbfzqssS32gCdjymZkx+8gQwa8BvrgcDJZqax8/Tc+OvzmBCnYK40HG+etDfCdK8Cksl0fYWzTAYL6lOaKZeI12wIXTweX/MD+rNOxS9U1Fg9OSVkojO2o744QqU79NRMZ7h4GN1LllzqlGw1AgMBAAECggEAWzhnOwmv0zuNc0xXNQ5pRYabRVORVOWK1hgOu7rWQQet5ltbTX+/Cb3e0ormybpI5kvNEQWgf3ir9rqeks2sZ5xNQgHyVbVN0+kfqTTT+HicohQTF62z+2rzwHBRGIbc0X31B4Bp4POc12KwMv/O4k+L55TXXl7kEGNvZMVFuqJAeX8sTQa1ABijPnvD7pDhq/TKUSH64FXHwK/BkyrQETzqhmZd9YMGa4yS2/IeQargv7LyeZUcRI0pDbZdzSchK6o/ioCRWtMMPXrL72wDcLUGHI4TRLHBfkl3rFVDyNa93L6ZER4iQaZc862gNA02puTCGlXpcziygYNAPtkPAQKBgQDqFXONQxZTHbuxHv5LXx/s+mpIu67hsWmpcMCZ8PLseNgmPahyLRWXpW/L2YnsXDRqI9DY8mRAApAMZaF4SyIjQjlyqksak/bMBAYw85vnZddaulAGYob+E2ZBlwJkJXrDt9fbD2KxdcB1FxSCR0eQDygMSVmYyQ3w4xzk8CDO9QKBgQDdorXkzpAcmCXmc2Ut9Hj8yYCc5O7Ea8vIdQC3w7wIrQ7X5jJJucaFx1viIqXIt3kSIAo6arC0hT+YgSu2N7bJTACCFePvue44wX8u9NjwBVm4QjeX42Q+O8GWpXLYYYwb1GtEw59rt3lz5zGLb97l9t6h7BelSwh6g0Zqo5RgQQKBgDIdm5qfxVTQJdH677iVShGDX2PpAr0BLb0ADcwngOrNyIEPbFPdgSTxX2kGTvgSmYor1tfLtVja85oj3BkUBOAFmqUI/oFXMlxldCngzf0RmbSr9NwZFgupfZgHS5TDTXA/mPAmcBvMOQMYiOSHfDPEeu9+eLc0PE7ZYONG4c9NAoGAQ/7JIvskR0F+TycT4XdhLtx68qdhgS05BbSvlbEdHORK632Z6/hsqVoyHDxY9C0lnaPqv2U/9QH0MsteJ7cMAtGoTkB8/2zhYtQqOrOvYmOh1N+rwpNmi5k1mQwFIdE7dMZEaoJBhIBzaFWDY63cilykjLSrxHAyl7NyhQDOYoECgYEAxZZYOnIx6z0+HAIpjo/KmoH7eyso3l1MGFJWX5drFw5fjata/cnYsgJ4jYLECV6drcuGRvXHo68iznW+sc/RCPC5en28fq59XpJl4+p+eBySAXPq0yCPNHUPUV/7FnVJUf7xfL282TpweQ9uskx+klpytBDgthSL7ePUKr7teXA=" 3 | } -------------------------------------------------------------------------------- /configs/b2-9871.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqAkwggSkAgEAAoIBAQC0XwoFIJZdaCRqOk37CDfLGyzEyb1YhQQq8EvAgVssEmOWBDzmet+XCCFUgSTgd+qz70g7IRHYKWEUilEMzrc1HTvUF9UrIYIeGDJOsAgPRRMJbCXfkORuLgaGKwK9uIEwonrPHWcobsej1/urJV7+iVHZaV8uAcsMzEpvDzLRFpyGjDgjvUEHq7W2gR8YXULPnQ5t/X3ygM8tTn72cZgTlB3crc3fX+eVqGywQCzfZzIKRg6PGQijyMv8sQY+rrfg3n6mJ9sMKdXj9bpKwGi7O5jZSOK+GThDM2ne4XnSQRHKBf16go8l3pbnsh3AJViK4uLKDeKYLnQk/FVl2XEPAgMBAAECggEBAJ/7oDaWBejJo2r5Vgtv6ZTkAJx3V9O4/85aHsabtdNsaBo6ng3MNJ+QnYeHmL7kfi+k8EtJ9LrnUO1YFbWncIbS7CseDHxaF0A8M/rpVey9VrpHy3v11zcG6dB9O8wtZ6FMrGMicEpDoB3qR5Yw6oYYJJoTRVHYU1KBrQ++ylL7Hx0Sk8HBp9JvxihkqKAvMYO+t3/hi7eL0gClobJi65z2BpnSCCsxicF2vDfhzUs/HBrYFmD2W3Fp72SSxdvJL6lpyz6/cIvdpFpjzyhT/+UgXzby4CWIA3V95FeBwWa9hC2O1ZHO2kL0GXeYa6Mf/dGu35f+kqWEwK9hZdxUBOECgYEA2CrVwHYCUMDal74xrZpqulFmfOlXL72iPJI9sFIoRs6o9pSpvCtzmQcB6q96eGsGRgO6rsH7cxQlRsonPf9mGIqboLITCKIAS0nOzmXlOGN63OYHqpmeZQK0gbCEnppAVcmYs81JiJjo7PfiZL/9DiXC4cTQdGwON0YsIlnOuJ8CgYEA1ZucmoNGHHYnHsDNmsV295WKRQ2mJPHvYn1v6hd/JcRc8QQTuJP/8cu6MNEm2hdI/TXNifXicO8dop0nY/38Q5BVr9G1oxRFMFHvP4Q39URaIfsKZv6t+Agqw9DG/1sUwVxq5VeJZfNtBOTVLr5WPN4MBHXoHiEZ2L/RTKGNwZECgYBVaKdIAdhsW6aCqg0q0IY2046w7+kY3c5KLGXfUrbDM0gjFR3zUR+9aL1jIq47Ad5ar4KFJfPZxi3sSFc08cI/FBTlazaGBKwlEyZ4+l2U6AlVWjXRPB0PQABd9YaQu9WLj7mb4RKau//cER0MPacYfecAGSlbto3vXPR3JhC9dQKBgBdc7cP4l7KFOcIjVFmZP2nU8UqcM4/W5lffYF46M63tzDyQNZf6mAPaRIMSXS19Xn5TZCeyvRGdFaCzj5tgLDc3kieoyDUOAoNGcuR/kZ9B2pnc20ZolJ6MRiEktJ85VwvPD+IFsQF1nnbqkGaMauI9ZxMV0k15UVpjoIDBKsABAoGBANY9H2sl0v3ul+1kcXtR7HjMXorgYID3gqBRhNbxxDDPZf90J/ykdeIalDUWGBdZE4PyPrsqeoDPsjg6xBJyTzYG1WLYAGJtRA+L0ucfsTegwe2C3Rqs3nNvNg0EE1/hHdYR1Oc3jgKc1YCPSVJLJ7/YThDCrp6NYcLG6YK2CbHH" 3 | } -------------------------------------------------------------------------------- /configs/b2-9872.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpwkwggSjAgEAAoIBAQDo6lyCDZAgQC9uPfMVTMGRSdu4t/dKekHiIm5kk5SmvW0kOqbwQ66slwINW8fg+24dhUxJxYNu0kndtCYcKj7Awk0FJpJTCzifS9Yuopp6QBc+lXp7fCzIzDVe8xH5Uqk1S6WFW2BQVcftN6rblVBY5CVs9E6cT/ikGUe3eq/IGmUprXsDaDZVjwn6HFp7hmmMIbN7FX+u+ny/T5KSg7+ymGhyIDhjjUFp5pIcG3SPiiIu52Uz0vRMS/OKbpxKOqBPtcqQxcPLwNvydAsaPSzAb7ikv5BQ0/+ilVNQWmWDig79TB5oIV5kgZyskbwAyce0zHWhR7zMnDV7apxt1RkxAgMBAAECggEBAOWB2foE51oAJTyaKqd4ZNyHTM0t6a0n3ze2+dR9X+MVkTA74zepWbuTaWBEaiaVWqIYMV4YFDTlXgfqdgsWzZMfYsmKgnD2A6tkDP8TFukTslPm8zQu3epW3tha6AEnpLhxe/52VeeTP1fOnLuW2/9bgE1mRvfcDYOVrYdsiz2+cur/X1jlmyrrcyGpt1iaXaVxeKOmhUCsmvCihqucrcPIqRZvHfExqAchfEdCdoDT35iKtU7xMmpCCc756ad1Ar3F7mfFzoq+x7T0M7ks0VngDeDSV5U73G53xHIBMu/OsJnqIP4/kzk4I7WoNfWQPLna4LWtvRbMa1dExM2HZOkCgYEA/4C6AssTPvE0ZWwX4EEGN1Fbaz+ikJlsGmFHOuCETECDQ+QvXYzdgPDQ78voQV4iwVXL3ziP0G19NB4R4sqd6IdN9K6E2dpq8fdPnzlkMCAX3GAf3bf22HeSVROYqwnwsS45+2q9kItrTATSM+CJaq8IqS2nOZfZ8DFwve+jSwsCgYEA6V5iIf9m+LS+3Y42W+KhqTY4HiTTHBbHGPwus/EQGmJVyZh2BMlaQU5qckm8RFxbvuSgUxkyqNby4pbyXNeA9bVb4v2ZB17oopY86NcZ+UstwPF+Y4t1i8k20UKsOQ5II24AJscwaAlLWjOtQBjux23dwwvfzUdqlQCXIvIPMjMCgYBtRCTIawZZBZgtw5NWYRiCcbWR4Q3pnuMfSPjIUhnh7jj0wNIMxOA5c0M3OdGimtpsKf/c/3hpX1mK/00Q2yu6tJp/CF9iN0lDH0uawVV6S09I/IbEMBdNrZ0T6ySACOk5LJa5UYWuGiGRygIHE4BQ8nfWueJo++rFEK+xWplPzwKBgHkNP2QZQoWh5Buy6BmTnn3SpRtlyKgaXJ5mOaeXVN4Kwis3TYjAFXQow+iSvPjM275Sg6N3P6L7FLRazk9AbiGGOKqvF1EOdyfXPLMe2NdKmuopmoDyVz/yWOAFcKaL9PmD1spGqqJcp9ybT7Qe+sUyBUVmhGnMMMonqz4yR5WnAoGAHMd1w/x7xuoCeocgXpLmYNGUPvm31dIV2CH0LdpBsb/kwFfYgGgNj3ukTKEIREuQVA7xFqJwFLLGITPfu2adHBBZVh/qRJU3Uc4hDRCkzZY1HoDcmHI5+BhLDJ1LXuE8u+cmSQQqeZhwaPK6qWytcg2+rsGAvsCOS+wK9B+bkPk=" 3 | } -------------------------------------------------------------------------------- /configs/b2-9873.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpwkwggSjAgEAAoIBAQDKqUymdP2NUe/4TyrfwcebraIDjEovkH/YUDqg5Ca9FNPEaJrT3OAEI4QuonODWtLMy7DKv15rmmy7wCOpotc28r0MxrNOpd9LIs4GVuEtaxulcJfeDruU5qk0FC588wDCEeqcsJjjWUENXn509zU5jJ2f1YCLUrLsD8rkDZgwmuRCj0q5M43FL8Bej+STS0v+PU7gbfzqssS32gCdjymZkx+8gQwa8BvrgcDJZqax8/Tc+OvzmBCnYK40HG+etDfCdK8Cksl0fYWzTAYL6lOaKZeI12wIXTweX/MD+rNOxS9U1Fg9OSVkojO2o744QqU79NRMZ7h4GN1LllzqlGw1AgMBAAECggEAWzhnOwmv0zuNc0xXNQ5pRYabRVORVOWK1hgOu7rWQQet5ltbTX+/Cb3e0ormybpI5kvNEQWgf3ir9rqeks2sZ5xNQgHyVbVN0+kfqTTT+HicohQTF62z+2rzwHBRGIbc0X31B4Bp4POc12KwMv/O4k+L55TXXl7kEGNvZMVFuqJAeX8sTQa1ABijPnvD7pDhq/TKUSH64FXHwK/BkyrQETzqhmZd9YMGa4yS2/IeQargv7LyeZUcRI0pDbZdzSchK6o/ioCRWtMMPXrL72wDcLUGHI4TRLHBfkl3rFVDyNa93L6ZER4iQaZc862gNA02puTCGlXpcziygYNAPtkPAQKBgQDqFXONQxZTHbuxHv5LXx/s+mpIu67hsWmpcMCZ8PLseNgmPahyLRWXpW/L2YnsXDRqI9DY8mRAApAMZaF4SyIjQjlyqksak/bMBAYw85vnZddaulAGYob+E2ZBlwJkJXrDt9fbD2KxdcB1FxSCR0eQDygMSVmYyQ3w4xzk8CDO9QKBgQDdorXkzpAcmCXmc2Ut9Hj8yYCc5O7Ea8vIdQC3w7wIrQ7X5jJJucaFx1viIqXIt3kSIAo6arC0hT+YgSu2N7bJTACCFePvue44wX8u9NjwBVm4QjeX42Q+O8GWpXLYYYwb1GtEw59rt3lz5zGLb97l9t6h7BelSwh6g0Zqo5RgQQKBgDIdm5qfxVTQJdH677iVShGDX2PpAr0BLb0ADcwngOrNyIEPbFPdgSTxX2kGTvgSmYor1tfLtVja85oj3BkUBOAFmqUI/oFXMlxldCngzf0RmbSr9NwZFgupfZgHS5TDTXA/mPAmcBvMOQMYiOSHfDPEeu9+eLc0PE7ZYONG4c9NAoGAQ/7JIvskR0F+TycT4XdhLtx68qdhgS05BbSvlbEdHORK632Z6/hsqVoyHDxY9C0lnaPqv2U/9QH0MsteJ7cMAtGoTkB8/2zhYtQqOrOvYmOh1N+rwpNmi5k1mQwFIdE7dMZEaoJBhIBzaFWDY63cilykjLSrxHAyl7NyhQDOYoECgYEAxZZYOnIx6z0+HAIpjo/KmoH7eyso3l1MGFJWX5drFw5fjata/cnYsgJ4jYLECV6drcuGRvXHo68iznW+sc/RCPC5en28fq59XpJl4+p+eBySAXPq0yCPNHUPUV/7FnVJUf7xfL282TpweQ9uskx+klpytBDgthSL7ePUKr7teXA=" 3 | } -------------------------------------------------------------------------------- /configs/b2-9874.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqQkwggSlAgEAAoIBAQCulpvUsBZdIJWAFRZ0BzbKvcEOIKjwy8KB+cF98I9jl2Cm49UcVQy4ob+znYdef8erU1NCoYgGAT32lcRArgEOscQE5OcNKp8dV3LCw1pRlajTb1RxELbbvao10dW9Pb7L9z5tt6P9sorB7yUis6exiXU0jbKB3Hv2lJn2V0R68Y/lLQWX7NUwMsL2GrE8cgAIYxKh3qVP0fo9E4YyBc4gwxt//1vIk1ogIZOPU1Yy66jac30ATs30COA208S/tgZ7bteLx5gysfQfjrAQKn+5rDmqyuFgClAgMSbQZYGUatnq9Kqiev4ZppR61IKnsNk1acJc2s9i9X1gLtLZ1ithAgMBAAECggEBAJ+OOQAZpXaarsaNfyWu6h5DaMn2gy79qNeMX48vaHwF/mjHUx4/hA7AlCgc0XhFoz8qOa9tXJjQTcarfN33qDO7tn8aiyZ3S09PeiwQyNxCwDXrSurB8bvFDGd/S61VXqedX8p5yD+1CibO3ctnENyp2RmcXgVccVYa3NJLUuRfmESaNSrfl72x5F1ItZ3BeAssXzYHEcvPoItAbK/HV6NUOHcfJasBzXlIYVYH5cxpdjnBvf85jgmfVVOqkGftu/RRdx8kj9Mfg1Q5VKx2vMeT69+KxEJNh2aZjN3EPG4SoBmba/CmaZdz+qNe6jrS4G0T96Kq3RPzycjGf73+OIECgYEAxIYw/pPLVTtYr+SS/qpyHBeYPiRjC6vNku4lWVgdNFutBKWXSjm7aqwMZWTtQBiOJYmNLqn2fIrpIXTxoo+3crwrZXHT9cXrrVSCpluhrFaVL2Xdc5vS04tBxJgPrNhaEzdtVseQ6GTAVgEixxky/rWpLdRXPLwQhAkfwvRm/8kCgYEA42zsyVoFtMwg8NXkP2L+4e3Qz/MBaNnbkx+0ZYbGYj6yalcJK0VhaMSpMaBAM02ZZouaFKX3j7lErcsBRnKlX+0g2BK0N9GWy+14ADVyiN53cXN/IRC55PDGgeC56BzUTcYswBHJCRb4CG9YEd8MHqoZexuE7uLVFWTE8ef9itkCgYBAP+bws/z8BoT+LGpqW+smiAg7+MVw4WA6MyV+yjHyFi7AoCqQF8PQIiODWrW+CMkgOJIxuVteaEPDrmn5TacaGa7OYaJ8bZKZflGgdcCriTsI3fLCgyUwCA0eauBlD+6S7cIPZvtXHulKtOBb2z8yys1esFc9AfccU6dQo3qxEQKBgQCFQ/fAyVqcph0LYxrbtePLejKpGCmUSkzremGYOJCZU0nzHEtIKuC4przKUrAsH+Wq/FTuko5tjs/a0yFNKbMUcfyUAOnP56Xom59859TUtR/iwB4XvxhfOmPoCUqG5BXX+S+R4RoflHEFaFGAL2aHtX8271pHLW5VmfX6FsowiQKBgQC5XFPcePDyIp1PFTMfoWc2PnsNTpj2u9uX5lJv91odU+p9p37rsF8C/wjSSWBWOSntqGzzdSfzjLx9WEUh30UYhwgOrXchKreWaKNWzQ7OadNdrmN1csbFBOnRw0KKmOeTJ67Ejc152G6aK1B8m8Trj3Tqy6GRWOSP3W2HdN3Ezg==" 3 | } -------------------------------------------------------------------------------- /configs/b2-9875.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqAkwggSkAgEAAoIBAQC0XwoFIJZdaCRqOk37CDfLGyzEyb1YhQQq8EvAgVssEmOWBDzmet+XCCFUgSTgd+qz70g7IRHYKWEUilEMzrc1HTvUF9UrIYIeGDJOsAgPRRMJbCXfkORuLgaGKwK9uIEwonrPHWcobsej1/urJV7+iVHZaV8uAcsMzEpvDzLRFpyGjDgjvUEHq7W2gR8YXULPnQ5t/X3ygM8tTn72cZgTlB3crc3fX+eVqGywQCzfZzIKRg6PGQijyMv8sQY+rrfg3n6mJ9sMKdXj9bpKwGi7O5jZSOK+GThDM2ne4XnSQRHKBf16go8l3pbnsh3AJViK4uLKDeKYLnQk/FVl2XEPAgMBAAECggEBAJ/7oDaWBejJo2r5Vgtv6ZTkAJx3V9O4/85aHsabtdNsaBo6ng3MNJ+QnYeHmL7kfi+k8EtJ9LrnUO1YFbWncIbS7CseDHxaF0A8M/rpVey9VrpHy3v11zcG6dB9O8wtZ6FMrGMicEpDoB3qR5Yw6oYYJJoTRVHYU1KBrQ++ylL7Hx0Sk8HBp9JvxihkqKAvMYO+t3/hi7eL0gClobJi65z2BpnSCCsxicF2vDfhzUs/HBrYFmD2W3Fp72SSxdvJL6lpyz6/cIvdpFpjzyhT/+UgXzby4CWIA3V95FeBwWa9hC2O1ZHO2kL0GXeYa6Mf/dGu35f+kqWEwK9hZdxUBOECgYEA2CrVwHYCUMDal74xrZpqulFmfOlXL72iPJI9sFIoRs6o9pSpvCtzmQcB6q96eGsGRgO6rsH7cxQlRsonPf9mGIqboLITCKIAS0nOzmXlOGN63OYHqpmeZQK0gbCEnppAVcmYs81JiJjo7PfiZL/9DiXC4cTQdGwON0YsIlnOuJ8CgYEA1ZucmoNGHHYnHsDNmsV295WKRQ2mJPHvYn1v6hd/JcRc8QQTuJP/8cu6MNEm2hdI/TXNifXicO8dop0nY/38Q5BVr9G1oxRFMFHvP4Q39URaIfsKZv6t+Agqw9DG/1sUwVxq5VeJZfNtBOTVLr5WPN4MBHXoHiEZ2L/RTKGNwZECgYBVaKdIAdhsW6aCqg0q0IY2046w7+kY3c5KLGXfUrbDM0gjFR3zUR+9aL1jIq47Ad5ar4KFJfPZxi3sSFc08cI/FBTlazaGBKwlEyZ4+l2U6AlVWjXRPB0PQABd9YaQu9WLj7mb4RKau//cER0MPacYfecAGSlbto3vXPR3JhC9dQKBgBdc7cP4l7KFOcIjVFmZP2nU8UqcM4/W5lffYF46M63tzDyQNZf6mAPaRIMSXS19Xn5TZCeyvRGdFaCzj5tgLDc3kieoyDUOAoNGcuR/kZ9B2pnc20ZolJ6MRiEktJ85VwvPD+IFsQF1nnbqkGaMauI9ZxMV0k15UVpjoIDBKsABAoGBANY9H2sl0v3ul+1kcXtR7HjMXorgYID3gqBRhNbxxDDPZf90J/ykdeIalDUWGBdZE4PyPrsqeoDPsjg6xBJyTzYG1WLYAGJtRA+L0ucfsTegwe2C3Rqs3nNvNg0EE1/hHdYR1Oc3jgKc1YCPSVJLJ7/YThDCrp6NYcLG6YK2CbHH" 3 | } -------------------------------------------------------------------------------- /configs/b2-9876.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpwkwggSjAgEAAoIBAQDlAYrA0TQ2IjgC/tYqx1FkQoyelLTWSaxJrWXDdOUUsZHYfKCyeJ4TCUzqKX0S8Rjsml1V2awU0cZSsdV1CSNVjjE4EU9CXTGTCNo97xhj0XM4Oy8IWAygkvAeshN4dSLEU7iYUVjxSwE3rUVAfTwwlq+ExIfJrQKS8k9Lbort56XE7gGwZ4TQX6R5T6SGS9E7VpLL6rv+rItuD++0eTasrBLbi9J5LDf6kqGwvxBMpdEZTVwv8nl6nFVt+3WZ5rkVtp5KjA3rViHec0azF8r97CMX938PEW2Ue9fDMKhOiDwIxhmE877sc20Mpse+zduCCiR1hPMg0IdUNpkMMLzxAgMBAAECggEAYI7a41wSaLTa6yBqSxVJkz2gLwlCiov70gEDxHsYUDZi6WX7F+VVuW8VeDJQI1l3CeQ4cIdcUFb3CU0kVLmqpVtUE3Dw+2lyCq4T30NeBFB/BXmm5hzCDj6GclrhbMvvAdrPHaJHH05h0AkGByAG7fHLRe7b1kRVroHuvz5348EZUiYGBq5k0WN3ZifuDFSFXab3GFTeYLSyx9004jfRW1UXevbzOKfo6iRgeb7vJIH5wrt3Dvtj7pyQf0EY39tQ05n+stUx619Ue9i1CnapLcUO8Juxxd4pPmPlmgmKZ+tIvmWBZhQ+J1rYn42I4Uitbm0lYZUEk4borN7PrNKBtQKBgQDqmswT/K13tWDskUY7zj2CoxVkhJ6rZnTDQGeJqO6wSGk4t28/lhUubN0CGzKl7KWaO3MX4shwpquljL8cPnmxcSUdW0Mz4DV5Ll0NDeZPj00MfV4685p8V260qJGFtCSCr4sHm20+7XtcZCpOAOAT9YVfz1OgTlF5L9b57kmuYwKBgQD55AknehSa3puVTssMnGytA8XZAdyUw0lvZxsTA75MOEUpILnl7S/VIGEBxnNr6KXgM7GBgaRoQADjpnxDHS/JXnxXW7I8OvmtGJOxQ5/lsIHAQSyHEHfxHOmGeSvt/wfFFIGG2ZD8KN8R+q/QcFN1KSBC/38mvNwV17599pxtmwKBgGkTZf45uNQZ98xdENDugZxGQOmhgJOSMw/Ug8sjT6zC8eXGOtyG8vu1JJOx7NBmGpHmuJjlKRNTgyOF037p+IViANaSLppIfIrHGkQjipjtvPuwFwleXD3+xwXBTlRNJ+EkkKealKaPpSXvcwc22yX1XIRaDsGI8nLN24JbmMKzAoGBAI4mw3JahxgmY/kGjolI/qVZTRYKchGKGd8ulv81FO7E38rqm/WI/LnPpn9dBdGv0ZR9s49JUV4gcqEN1whStRlnD3KebgDHR7rJDVM8ddwykUzthkf6/VACs3FUwsGrXx8kcB5m64wWL/dJVPRMwZ0XXQvfzdQagVRHm0yKmifbAoGACpHPxNlmr2KlUDtAT0NkWE1IlKZBOJpFRNnZXYGaTJHeRY7lbhrCLwjmK+51X3LwhNbb7jY3tDuPqollkf+mBMw/o4oGOhlfd/+AR8z4xvujnGkmEk02p4DAJsYip52WmCSJRLl0+13mlmN9rN8bvkEyOlDgWkuCnjGVdZZMY28=" 3 | } -------------------------------------------------------------------------------- /configs/b3-12019.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpwkwggSjAgEAAoIBAQDlAYrA0TQ2IjgC/tYqx1FkQoyelLTWSaxJrWXDdOUUsZHYfKCyeJ4TCUzqKX0S8Rjsml1V2awU0cZSsdV1CSNVjjE4EU9CXTGTCNo97xhj0XM4Oy8IWAygkvAeshN4dSLEU7iYUVjxSwE3rUVAfTwwlq+ExIfJrQKS8k9Lbort56XE7gGwZ4TQX6R5T6SGS9E7VpLL6rv+rItuD++0eTasrBLbi9J5LDf6kqGwvxBMpdEZTVwv8nl6nFVt+3WZ5rkVtp5KjA3rViHec0azF8r97CMX938PEW2Ue9fDMKhOiDwIxhmE877sc20Mpse+zduCCiR1hPMg0IdUNpkMMLzxAgMBAAECggEAYI7a41wSaLTa6yBqSxVJkz2gLwlCiov70gEDxHsYUDZi6WX7F+VVuW8VeDJQI1l3CeQ4cIdcUFb3CU0kVLmqpVtUE3Dw+2lyCq4T30NeBFB/BXmm5hzCDj6GclrhbMvvAdrPHaJHH05h0AkGByAG7fHLRe7b1kRVroHuvz5348EZUiYGBq5k0WN3ZifuDFSFXab3GFTeYLSyx9004jfRW1UXevbzOKfo6iRgeb7vJIH5wrt3Dvtj7pyQf0EY39tQ05n+stUx619Ue9i1CnapLcUO8Juxxd4pPmPlmgmKZ+tIvmWBZhQ+J1rYn42I4Uitbm0lYZUEk4borN7PrNKBtQKBgQDqmswT/K13tWDskUY7zj2CoxVkhJ6rZnTDQGeJqO6wSGk4t28/lhUubN0CGzKl7KWaO3MX4shwpquljL8cPnmxcSUdW0Mz4DV5Ll0NDeZPj00MfV4685p8V260qJGFtCSCr4sHm20+7XtcZCpOAOAT9YVfz1OgTlF5L9b57kmuYwKBgQD55AknehSa3puVTssMnGytA8XZAdyUw0lvZxsTA75MOEUpILnl7S/VIGEBxnNr6KXgM7GBgaRoQADjpnxDHS/JXnxXW7I8OvmtGJOxQ5/lsIHAQSyHEHfxHOmGeSvt/wfFFIGG2ZD8KN8R+q/QcFN1KSBC/38mvNwV17599pxtmwKBgGkTZf45uNQZ98xdENDugZxGQOmhgJOSMw/Ug8sjT6zC8eXGOtyG8vu1JJOx7NBmGpHmuJjlKRNTgyOF037p+IViANaSLppIfIrHGkQjipjtvPuwFwleXD3+xwXBTlRNJ+EkkKealKaPpSXvcwc22yX1XIRaDsGI8nLN24JbmMKzAoGBAI4mw3JahxgmY/kGjolI/qVZTRYKchGKGd8ulv81FO7E38rqm/WI/LnPpn9dBdGv0ZR9s49JUV4gcqEN1whStRlnD3KebgDHR7rJDVM8ddwykUzthkf6/VACs3FUwsGrXx8kcB5m64wWL/dJVPRMwZ0XXQvfzdQagVRHm0yKmifbAoGACpHPxNlmr2KlUDtAT0NkWE1IlKZBOJpFRNnZXYGaTJHeRY7lbhrCLwjmK+51X3LwhNbb7jY3tDuPqollkf+mBMw/o4oGOhlfd/+AR8z4xvujnGkmEk02p4DAJsYip52WmCSJRLl0+13mlmN9rN8bvkEyOlDgWkuCnjGVdZZMY28=" 3 | } -------------------------------------------------------------------------------- /configs/b3-13019.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqQkwggSlAgEAAoIBAQDx3HmCvZqGryLYj/pNCryAgXLtBG17ZA2DQvdCLMuSBFz2RAbkaHJDP62DP3YBponSC8j3oMUhqmbiHl9l/zeGVEiDRfpII1W9HD5njXJT0KOxw0SxBcOSqA98cgJ8kQAgr+lSqXD17ZPwcGf+uhtTMJC/vgtmxUOmJ1GfeotDE7U/SI2NgkeUFJpG7hw+jskS0PsOyPiW+lmmJ2kCxnK2cna94dyK7KvvdO0ExRwNWclb6U5YqdXKcE5s2kLV+Auwy4zNTGM21uXT/ClVsW6e4gdY/5ROxoV9n1cjETD2Z4NevyKFiYSqCMxDFNhaha5G8gqliShj88L86CsU+hkrAgMBAAECggEALFc+U7DNFqofGlLzEZLJUknpNvjb1YZXT9xEFna974wrOt7n4JIheKDA/9HvoYfVtpOAiZ2I5o4mBIiK9tkeZdsn3CFFLFqGCoCWFEgDUMhsalehTU8ANu/mvurr98hhnJyDiysTUZL3z1ncRv/5qHu73dtKndHGgDyvIyzFQUuNbvsGyGxfrDtxfCNt29WBUzzX5bNLOjMtnxNKVwmOvbxNNERRFQbvs/guwmv66yHG+NGAv8IQfbwXwnnaClhSwaUkIGTFBP9a5iyE9oErTqITunsMYWmpzylMmhzjL8knbmxC+csYJPsiPeu3BZHNjAAkEAgadggyhHAB/4b7SQKBgQD4R6xn4TAoqY7Du42MOwmzY9j+9ipDBp7JDntyx1yPg9NvkpBh8ns6UeEbk85dbrveDdSKRMpSARa6ZFdqKSWlPM1PZ/6N541FWJgfj49ilu22Isi9h9AFhgQeLbjExI2FvOvzFnyIWxhFrbz9dEwAg98l1XlaeE8YlPS4lwfZxQKBgQD5YbUfp7Gi+8HoXaIv76zyNpqCZusCk7ye4kSzYs/YQtsir3OKdi57i+Uxtp75nY7aZWberyOVmmuM8oJzrVjHhu/c1/qZuEdvOx7wCPKvq7WgDlU0N/OOCIr4dEfBIVTiF3HIq5/KQd9j8AENhJoL5jGjVWVBSxrByYu3iRyGLwKBgQCEUTZZulJ/KTYzrE3YkVIvL6Ri5PBK/kk7X6N83TDAL4JMcPDPsnnn7+EnYFNXyf8HbZl7AwRMRdZGCdnocvtkH45Ppl2sZN4OOhQApfLFmSggrFMNZ0b+2phxOO7Ctvmxb6jTyYUe6mV6JQiWjxc+IwmW0Tk2dO26bRArHBqL/QKBgQCh18tYM9iQ0ZpSVxH+0ikHOHCl2G0ESyTKaEX1tVb2Hs1ggUUWwwP/ohaoYMBjduFS0yQjuL37RTAvVONcd096jhP02yYDxRh3E4NMfEIjx+gja6nYLceekeS+wZgfuqX/5P8vIFKfTIjRrtzADSJ8PnRQcAc6jKdcxJQsFIuyeQKBgQCfjX/KIC3wo76yDx85d6n+v7p/lUNVarXRzc6BwbP4NeLu9U5xzajWDCtsz2wYkN+kwE0PnB7XJW/aPocxMfpncJlFOREyi1tmJ8Bo4RztpSpwD9RTlatBI3Ot26D56GxWOfgu6otQV1AeHjKZou5WVqzjyftyoAEZb4aLbWwErQ==" 3 | } -------------------------------------------------------------------------------- /configs/b4-12019.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASqAkwggSkAgEAAoIBAQC0XwoFIJZdaCRqOk37CDfLGyzEyb1YhQQq8EvAgVssEmOWBDzmet+XCCFUgSTgd+qz70g7IRHYKWEUilEMzrc1HTvUF9UrIYIeGDJOsAgPRRMJbCXfkORuLgaGKwK9uIEwonrPHWcobsej1/urJV7+iVHZaV8uAcsMzEpvDzLRFpyGjDgjvUEHq7W2gR8YXULPnQ5t/X3ygM8tTn72cZgTlB3crc3fX+eVqGywQCzfZzIKRg6PGQijyMv8sQY+rrfg3n6mJ9sMKdXj9bpKwGi7O5jZSOK+GThDM2ne4XnSQRHKBf16go8l3pbnsh3AJViK4uLKDeKYLnQk/FVl2XEPAgMBAAECggEBAJ/7oDaWBejJo2r5Vgtv6ZTkAJx3V9O4/85aHsabtdNsaBo6ng3MNJ+QnYeHmL7kfi+k8EtJ9LrnUO1YFbWncIbS7CseDHxaF0A8M/rpVey9VrpHy3v11zcG6dB9O8wtZ6FMrGMicEpDoB3qR5Yw6oYYJJoTRVHYU1KBrQ++ylL7Hx0Sk8HBp9JvxihkqKAvMYO+t3/hi7eL0gClobJi65z2BpnSCCsxicF2vDfhzUs/HBrYFmD2W3Fp72SSxdvJL6lpyz6/cIvdpFpjzyhT/+UgXzby4CWIA3V95FeBwWa9hC2O1ZHO2kL0GXeYa6Mf/dGu35f+kqWEwK9hZdxUBOECgYEA2CrVwHYCUMDal74xrZpqulFmfOlXL72iPJI9sFIoRs6o9pSpvCtzmQcB6q96eGsGRgO6rsH7cxQlRsonPf9mGIqboLITCKIAS0nOzmXlOGN63OYHqpmeZQK0gbCEnppAVcmYs81JiJjo7PfiZL/9DiXC4cTQdGwON0YsIlnOuJ8CgYEA1ZucmoNGHHYnHsDNmsV295WKRQ2mJPHvYn1v6hd/JcRc8QQTuJP/8cu6MNEm2hdI/TXNifXicO8dop0nY/38Q5BVr9G1oxRFMFHvP4Q39URaIfsKZv6t+Agqw9DG/1sUwVxq5VeJZfNtBOTVLr5WPN4MBHXoHiEZ2L/RTKGNwZECgYBVaKdIAdhsW6aCqg0q0IY2046w7+kY3c5KLGXfUrbDM0gjFR3zUR+9aL1jIq47Ad5ar4KFJfPZxi3sSFc08cI/FBTlazaGBKwlEyZ4+l2U6AlVWjXRPB0PQABd9YaQu9WLj7mb4RKau//cER0MPacYfecAGSlbto3vXPR3JhC9dQKBgBdc7cP4l7KFOcIjVFmZP2nU8UqcM4/W5lffYF46M63tzDyQNZf6mAPaRIMSXS19Xn5TZCeyvRGdFaCzj5tgLDc3kieoyDUOAoNGcuR/kZ9B2pnc20ZolJ6MRiEktJ85VwvPD+IFsQF1nnbqkGaMauI9ZxMV0k15UVpjoIDBKsABAoGBANY9H2sl0v3ul+1kcXtR7HjMXorgYID3gqBRhNbxxDDPZf90J/ykdeIalDUWGBdZE4PyPrsqeoDPsjg6xBJyTzYG1WLYAGJtRA+L0ucfsTegwe2C3Rqs3nNvNg0EE1/hHdYR1Oc3jgKc1YCPSVJLJ7/YThDCrp6NYcLG6YK2CbHH" 3 | } -------------------------------------------------------------------------------- /configs/b4-13019.key: -------------------------------------------------------------------------------- 1 | { 2 | "key": "CAASpwkwggSjAgEAAoIBAQC/s++q0I8tAIniMft2buAFI3qVCoalIH0O/D8YfxNPaNL2C1A4dB6Rb8/5t8cPHHXiDWU/JG9xJtUNwycVmdccoTf86ZI3FI39x51+cFlTKvwhhc6XYaOaRdpkoS/RzJvfmzxOoq0iZeQNUEE0XGv1SPE0gmt/Vf9H0HbPtzcpJNUM0ZLUVmuPfuriLdQ3DVoKd2O6CNzam/I3frVITd31Pz8RV0QMrbiLkSP31N5KCfHlvVtObBoZfBUW7gZmOgd9uJe34V+IM1T0B2ZbG4ik+QCKdCYupTbFY5zA2Qp1I2o8OIm5piOUugIRuJO4/TmlPkkhET3wng0Mh58KIDENAgMBAAECggEBAKXZC82hpVxvjNpuF3j8rz6C1Tg/5QDSvJ7MR+HvfktDCs/mNb7BZvi33RvTjJlcK/gnUqJv6SHhUI0ZeqTLdTjFmWRqxh503+rgWTbcB8tV8s8lrfd1d06uhCRu9qnw9CFdca0uO874i3WhKugb1SJdup+M/WcqhTIh/cfyX/xs6qHvCt1SRZ3TJoBHwgWmtnPXQ/CQZgkESo/P7NNS2lj+UkiphnnnX+DndMJHBK1wNjVRpbgDG3J9V6o8cEBaC5ZqVEEuNe386O0LyH/oU+nfOa4uII+Dj12q9bAbdPugI9tXB2mx+yiZ9t8yfSbbqkmCDfJjatVX7hxSiMqmFVkCgYEAzVWfj05T9UaguGeGpiBveDUAqBR2p4NjlsMpxzzYmAQHNHzwSw+S8ASMUa2VKoIGYzQam6KfyW1+o1ASIzq8vw4CtT8a5fEG0/vZLTqR02rNO9ngYLqHAISalROTbmK+rIbTFiNl9qgzvnuKD63SAmCyjnZaL2ERJcVA+QEdR/MCgYEA7wE+zAx3Neg9grKmFgQnzS3V6dHILgUPnUs7j5UJQ2V7I8URQHmiFdWmDxntv3uF8o/mMPwecGpIMALR1Z7wwPGTW9mrFw9dBPvOutJZjyVCvAFaqQu+yOZM2SON/dsovK50/4/1lNLtclTOIkHoJIZLPLpwj5K+Ygayh08L4v8CgYBXFOMQkbWFpihvTGiMd+EOZ9wZbGRN8qj/vVEwkBuDjOHJXttB2h8E78jasvU6C97Nn8FRFA0UDf3RIRowGq8Fj9mSKGst7aRprruSNO63bOoRYfuIylKK47HzW1QBUptu69cF4olRrFAVjqskryELpRrU1Fi3E0GEdT1y3QggBQKBgHrxeQwdnXTtcja5DxZkLNUurssITqDdmZqgCJNjZtB0c1ODG8y+xNHWhQVfoRzOvah4vUCVcFMDWP7ZdHceu1mE6vhkj83c6UyW+1C+w7MOx7VOPQSYNhvB2+YWlAPxqJLmaujLdNiJZ/tYBHE61d9z9V/Xx+8S3TwvlcZkswihAoGARmJYLLP1DGlLhsWkhrhM55xdrmSVi+8f2631VMl/Pv8EHanegAPnxDwhuvPjYOMX+49zpyw1f4YF7Q51aRo4TmKXx2XFFiNFjWsR9eWYCHO07KZo3YBDL7l83coFIc7p7kF3NGgE0RavkZUWoT9GOqitK+LXi9DiNBUBE6mbsFo=" 3 | } -------------------------------------------------------------------------------- /configs/benchmark-devnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 80/100 nodes on 2 shard in 2 regions", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "t3.medium", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "t3.small", 11 | "regions": "iad,pdx", 12 | "protection": false, 13 | "root": 20 14 | }, 15 | "explorer_node": { 16 | "num_vm": 1, 17 | "type": "t3.small", 18 | "regions": "iad,pdx", 19 | "protection": false, 20 | "root": 30 21 | }, 22 | "bootnode": { 23 | "enable": true, 24 | "server": "52.40.84.2", 25 | "name": "b6.harmony.one", 26 | "port": 9870, 27 | "user": "ec2-user", 28 | "key": "oregon-key-benchmark.pem", 29 | "p2pkey": "b2-9874.key", 30 | "log_conn": false 31 | }, 32 | "bootnode1": { 33 | "enable": true, 34 | "server": "54.86.126.90", 35 | "name": "b5.harmony.one", 36 | "port": 9870, 37 | "user": "ec2-user", 38 | "key": "virginia-key-benchmark.pem", 39 | "p2pkey": "b1-9874.key", 40 | "log_conn": false 41 | }, 42 | "azure": { 43 | "num_vm": 0, 44 | "regions": [ 45 | "eastus", 46 | "westeurope", 47 | "southeastasia" 48 | ] 49 | }, 50 | "benchmark": { 51 | "shards": 2, 52 | "duration": 120, 53 | "dashboard": false, 54 | "crosstx": 30, 55 | "attacked_mode": 0, 56 | "peer_per_shard": 50, 57 | "minpeer": 37, 58 | "log_conn": false, 59 | "even_shard": true, 60 | "init_retry": false, 61 | "commit_delay": "2s", 62 | "network_type": "pangaea", 63 | "bls": true 64 | }, 65 | "logs": { 66 | "leader": true, 67 | "client": false, 68 | "validator": true, 69 | "soldier": true, 70 | "db": false 71 | }, 72 | "dashboard": { 73 | "name": "1.harmony.one", 74 | "port": 3000, 75 | "reset": "false" 76 | }, 77 | "explorer": { 78 | "name": "explorer.harmony.one", 79 | "port": 4444, 80 | "reset": "false" 81 | }, 82 | "explorer2": { 83 | "name": "34.220.94.30", 84 | "port": 4444, 85 | "reset": "false" 86 | }, 87 | "txgen": { 88 | "enable": "false", 89 | "ip": "myip", 90 | "port": 8000 91 | }, 92 | "parallel": 40, 93 | "userdata": "userdata-soldier-http.sh", 94 | "flow": { 95 | "wait_for_launch": 120, 96 | "reserved_account": "", 97 | "rpczone": "pga" 98 | }, 99 | "bls": { 100 | "pass": "blsnopass.txt", 101 | "bucket": "harmony-secret-keys", 102 | "folder": "bls-pangaea", 103 | "keyfile": "pangaea-keys.txt" 104 | }, 105 | "genesis": "genesis.txt", 106 | "libp2p": true 107 | } 108 | -------------------------------------------------------------------------------- /configs/benchmark-dryrun.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "dryrun network to open staking mainnet launch", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "m5a.large", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "c5.large", 11 | "regions": "iad,sfo,cmh,pdx", 12 | "protection": false, 13 | "root": 20 14 | }, 15 | "explorer_node": { 16 | "num_vm": 1, 17 | "type": "c5.large", 18 | "regions": "iad,sfo,cmh,pdx", 19 | "root": 20, 20 | "userdata": "userdata-systemd-static-exp.sh", 21 | "protection": false 22 | }, 23 | "bootnode": { 24 | "enable": true, 25 | "server": "52.40.84.2", 26 | "name": "b6.harmony.one", 27 | "port": 9909, 28 | "user": "ec2-user", 29 | "key": "oregon-key-benchmark.pem", 30 | "p2pkey": "b2-9870.key", 31 | "log_conn": true 32 | }, 33 | "bootnode1": { 34 | "enable": true, 35 | "server": "54.86.126.90", 36 | "name": "b5.harmony.one", 37 | "port": 9909, 38 | "user": "ec2-user", 39 | "key": "virginia-key-benchmark.pem", 40 | "p2pkey": "b1-9870.key", 41 | "log_conn": true 42 | }, 43 | "azure": { 44 | "num_vm": 0, 45 | "regions": [ 46 | "eastus", 47 | "westeurope", 48 | "southeastasia" 49 | ] 50 | }, 51 | "benchmark": { 52 | "shards": 4, 53 | "duration": 120, 54 | "dashboard": false, 55 | "crosstx": 30, 56 | "attacked_mode": 0, 57 | "peer_per_shard": 170, 58 | "minpeer": 16, 59 | "log_conn": false, 60 | "even_shard": true, 61 | "init_retry": false, 62 | "commit_delay": "2s", 63 | "network_type": "mainnet", 64 | "bls": true 65 | }, 66 | "logs": { 67 | "leader": true, 68 | "client": false, 69 | "validator": true, 70 | "soldier": false, 71 | "db": false 72 | }, 73 | "dashboard": { 74 | "name": "1.harmony.one", 75 | "port": 3000, 76 | "reset": "false" 77 | }, 78 | "explorer": { 79 | "name": "explorer.os.hmny.io", 80 | "port": 4444, 81 | "reset": "false" 82 | }, 83 | "explorer2": { 84 | "name": "34.220.94.30", 85 | "port": 4444, 86 | "reset": "false" 87 | }, 88 | "parallel": 50, 89 | "userdata": "userdata-systemd-static-dryrun.sh", 90 | "flow": { 91 | "wait_for_launch": 60, 92 | "reserved_account": "", 93 | "rpczone": "dry", 94 | "rpcnode": 5 95 | }, 96 | "bls": { 97 | "pass": "blspass.txt", 98 | "bucket": "harmony-secret-keys", 99 | "folder": "bls", 100 | "keyfile": "blskey.txt" 101 | }, 102 | "multikey": { 103 | "enable": true, 104 | "keys_per_node": 10, 105 | "blskey_folder": ".hmy/blskeys" 106 | }, 107 | "genesis": "genesis.txt", 108 | "libp2p": true 109 | } 110 | -------------------------------------------------------------------------------- /configs/benchmark-ds.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 30 nodes on 3 shard in one region", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "t3.medium", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 3, 10 | "type": "t3.small", 11 | "regions": "iad", 12 | "protection": false, 13 | "root": 15 14 | }, 15 | "explorer_node": { 16 | "num_vm": 3, 17 | "type": "t3.small", 18 | "regions": "iad", 19 | "root": 25, 20 | "protection": false 21 | }, 22 | "bootnode": { 23 | "enable": true, 24 | "server": "52.40.84.2", 25 | "name": "b6.harmony.one", 26 | "port": 9876, 27 | "user": "ec2-user", 28 | "key": "oregon-key-benchmark.pem", 29 | "p2pkey": "b2-9870.key", 30 | "log_conn": false 31 | }, 32 | "bootnode1": { 33 | "enable": false, 34 | "server": "54.86.126.90", 35 | "name": "b5.harmony.one", 36 | "port": 9867, 37 | "user": "ec2-user", 38 | "key": "virginia-key-benchmark.pem", 39 | "p2pkey": "b1-9870.key", 40 | "log_conn": false 41 | }, 42 | "azure": { 43 | "num_vm": 0, 44 | "regions": [ 45 | "eastus", 46 | "westeurope", 47 | "southeastasia" 48 | ] 49 | }, 50 | "benchmark": { 51 | "shards": 3, 52 | "duration": 120, 53 | "dashboard": false, 54 | "crosstx": 30, 55 | "attacked_mode": 0, 56 | "peer_per_shard": 10, 57 | "minpeer": 6, 58 | "log_conn": false, 59 | "even_shard": true, 60 | "init_retry": false, 61 | "commit_delay": "2s", 62 | "network_type": "testnet", 63 | "bls": true 64 | }, 65 | "logs": { 66 | "leader": true, 67 | "client": false, 68 | "validator": true, 69 | "soldier": true, 70 | "db": false 71 | }, 72 | "dashboard": { 73 | "name": "1.harmony.one", 74 | "port": 3000, 75 | "reset": "false" 76 | }, 77 | "explorer": { 78 | "name": "explorer.harmony.one", 79 | "port": 4444, 80 | "reset": "false" 81 | }, 82 | "explorer2": { 83 | "name": "34.220.94.30", 84 | "port": 4444, 85 | "reset": "false" 86 | }, 87 | "txgen": { 88 | "enable": "false", 89 | "ip": "myip", 90 | "port": 8000 91 | }, 92 | "parallel": 50, 93 | "userdata": "userdata-soldier-http.sh", 94 | "flow": { 95 | "wait_for_launch": 60, 96 | "reserved_account": "", 97 | "rpczone": "ds", 98 | "rpcnode": 2 99 | }, 100 | "bls": { 101 | "pass": "blsnopass.txt", 102 | "bucket": "harmony-secret-keys", 103 | "folder": "bls-test", 104 | "keyfile": "blskey-test.txt" 105 | }, 106 | "genesis": "genesis.txt", 107 | "libp2p": true 108 | } 109 | -------------------------------------------------------------------------------- /configs/benchmark-leo.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 60 nodes on 2 shard in two region, 3 keys per node, needs only 20 nodes", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "t3.medium", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "t3.small", 11 | "regions": "iad,pdx,cmh", 12 | "protection": false, 13 | "root": 10 14 | }, 15 | "explorer_node": { 16 | "num_vm": 1, 17 | "type": "t3.small", 18 | "regions": "iad,pdx,cmh", 19 | "root": 10, 20 | "protection": false 21 | }, 22 | "bootnode": { 23 | "enable": false, 24 | "server": "52.40.84.2", 25 | "name": "b6.harmony.one", 26 | "port": 9866, 27 | "user": "ec2-user", 28 | "key": "oregon-key-benchmark.pem", 29 | "p2pkey": "b2-9870.key", 30 | "log_conn": false 31 | }, 32 | "bootnode1": { 33 | "enable": true, 34 | "server": "54.86.126.90", 35 | "name": "b5.harmony.one", 36 | "port": 9871, 37 | "user": "ec2-user", 38 | "key": "virginia-key-benchmark.pem", 39 | "p2pkey": "b1-9870.key", 40 | "log_conn": false 41 | }, 42 | "azure": { 43 | "num_vm": 0, 44 | "regions": [ 45 | "eastus", 46 | "westeurope", 47 | "southeastasia" 48 | ] 49 | }, 50 | "benchmark": { 51 | "shards": 3, 52 | "duration": 120, 53 | "dashboard": false, 54 | "crosstx": 0, 55 | "attacked_mode": 0, 56 | "peer_per_shard": 10, 57 | "minpeer": 3, 58 | "log_conn": false, 59 | "even_shard": true, 60 | "init_retry": false, 61 | "commit_delay": "0s", 62 | "network_type": "testnet", 63 | "bls": true 64 | }, 65 | "logs": { 66 | "leader": true, 67 | "client": false, 68 | "validator": true, 69 | "soldier": true, 70 | "db": false 71 | }, 72 | "dashboard": { 73 | "name": "1.harmony.one", 74 | "port": 3000, 75 | "reset": "false" 76 | }, 77 | "explorer": { 78 | "name": "explorer.harmony.one", 79 | "port": 4444, 80 | "reset": "false" 81 | }, 82 | "explorer2": { 83 | "name": "34.220.94.30", 84 | "port": 4444, 85 | "reset": "false" 86 | }, 87 | "txgen": { 88 | "enable": "false", 89 | "ip": "myip", 90 | "port": 8000 91 | }, 92 | "parallel": 50, 93 | "userdata": "userdata-soldier-http-static.sh", 94 | "flow": { 95 | "wait_for_launch": 60, 96 | "reserved_account": "", 97 | "rpczone": "t1", 98 | "rpcnode": 3 99 | }, 100 | "bls": { 101 | "pass": "blsnopass.txt", 102 | "bucket": "harmony-secret-keys", 103 | "folder": "bls-test", 104 | "keyfile": "blskey-test.txt" 105 | }, 106 | "multikey": { 107 | "enable": true, 108 | "keys_per_node": 2, 109 | "blskey_folder": ".hmy/blskeys" 110 | }, 111 | "genesis": "genesis.txt", 112 | "libp2p": true 113 | } 114 | -------------------------------------------------------------------------------- /configs/benchmark-lrtn.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 20 nodes on 4 shard in 1 region", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "m5a.large", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 4, 10 | "type": "c5.large", 11 | "regions": "iad", 12 | "protection": false, 13 | "root": 15 14 | }, 15 | "explorer_node": { 16 | "num_vm": 4, 17 | "type": "m5.large", 18 | "regions": "iad", 19 | "root": 40, 20 | "userdata": "userdata-systemd-static-lrtn-exp.sh", 21 | "protection": false 22 | }, 23 | "bootnode": { 24 | "enable": true, 25 | "server": "52.40.84.2", 26 | "name": "b6.harmony.one", 27 | "port": 9850, 28 | "user": "ec2-user", 29 | "key": "oregon-key-benchmark.pem", 30 | "p2pkey": "b2-9870.key", 31 | "log_conn": true 32 | }, 33 | "bootnode1": { 34 | "enable": true, 35 | "server": "54.86.126.90", 36 | "name": "b5.harmony.one", 37 | "port": 9850, 38 | "user": "ec2-user", 39 | "key": "virginia-key-benchmark.pem", 40 | "p2pkey": "b1-9870.key", 41 | "log_conn": true 42 | }, 43 | "azure": { 44 | "num_vm": 0, 45 | "regions": [ 46 | "eastus", 47 | "westeurope", 48 | "southeastasia" 49 | ] 50 | }, 51 | "benchmark": { 52 | "shards": 4, 53 | "duration": 120, 54 | "dashboard": false, 55 | "crosstx": 30, 56 | "attacked_mode": 0, 57 | "peer_per_shard": 15, 58 | "minpeer": 4, 59 | "log_conn": false, 60 | "even_shard": true, 61 | "init_retry": false, 62 | "commit_delay": "2s", 63 | "network_type": "testnet", 64 | "bls": true 65 | }, 66 | "logs": { 67 | "leader": true, 68 | "client": false, 69 | "validator": true, 70 | "soldier": true, 71 | "db": false 72 | }, 73 | "dashboard": { 74 | "name": "1.harmony.one", 75 | "port": 3000, 76 | "reset": "false" 77 | }, 78 | "explorer": { 79 | "name": "explorer.b.hmny.io", 80 | "port": 4444, 81 | "reset": "false" 82 | }, 83 | "explorer2": { 84 | "name": "34.220.94.30", 85 | "port": 4444, 86 | "reset": "false" 87 | }, 88 | "txgen": { 89 | "enable": "false", 90 | "ip": "myip", 91 | "port": 8000 92 | }, 93 | "parallel": 50, 94 | "userdata": "userdata-soldier-http.sh", 95 | "flow": { 96 | "wait_for_launch": 60, 97 | "reserved_account": "", 98 | "rpczone": "b", 99 | "rpcnode": 4 100 | }, 101 | "bls": { 102 | "pass": "blsnopass.txt", 103 | "bucket": "harmony-secret-keys", 104 | "folder": "bls-test", 105 | "keyfile": "blskey-test.txt" 106 | }, 107 | "multikey": { 108 | "enable": true, 109 | "keys_per_node": 3, 110 | "blskey_folder": ".hmy/blskeys" 111 | }, 112 | "genesis": "genesis.txt", 113 | "libp2p": true 114 | } 115 | 116 | -------------------------------------------------------------------------------- /configs/benchmark-mkeys.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 60 nodes on 2 shards in one region, 3 key per node, we just need 20 nodes", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "t3.medium", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 2, 10 | "type": "t3.small", 11 | "regions": "iad", 12 | "protection": false, 13 | "root": 10 14 | }, 15 | "explorer_node": { 16 | "num_vm": 2, 17 | "type": "t3.small", 18 | "regions": "iad", 19 | "root": 20, 20 | "protection": false 21 | }, 22 | "bootnode": { 23 | "enable": true, 24 | "server": "52.40.84.2", 25 | "name": "b6.harmony.one", 26 | "port": 9888, 27 | "user": "ec2-user", 28 | "key": "oregon-key-benchmark.pem", 29 | "p2pkey": "b2-9870.key", 30 | "log_conn": false 31 | }, 32 | "bootnode1": { 33 | "enable": true, 34 | "server": "54.86.126.90", 35 | "name": "b5.harmony.one", 36 | "port": 9888, 37 | "user": "ec2-user", 38 | "key": "virginia-key-benchmark.pem", 39 | "p2pkey": "b1-9870.key", 40 | "log_conn": false 41 | }, 42 | "azure": { 43 | "num_vm": 0, 44 | "regions": [ 45 | "eastus", 46 | "westeurope", 47 | "southeastasia" 48 | ] 49 | }, 50 | "benchmark": { 51 | "shards": 2, 52 | "duration": 120, 53 | "dashboard": false, 54 | "crosstx": 30, 55 | "attacked_mode": 0, 56 | "peer_per_shard": 30, 57 | "minpeer": 6, 58 | "log_conn": false, 59 | "even_shard": true, 60 | "init_retry": false, 61 | "commit_delay": "0s", 62 | "network_type": "testnet", 63 | "bls": true 64 | }, 65 | "logs": { 66 | "leader": true, 67 | "client": false, 68 | "validator": true, 69 | "soldier": true, 70 | "db": false 71 | }, 72 | "dashboard": { 73 | "name": "1.harmony.one", 74 | "port": 3000, 75 | "reset": "false" 76 | }, 77 | "explorer": { 78 | "name": "explorer.mkeys.b2.hmny.io", 79 | "port": 8888, 80 | "reset": "true" 81 | }, 82 | "txgen": { 83 | "enable": "false", 84 | "ip": "myip", 85 | "port": 8000 86 | }, 87 | "parallel": 50, 88 | "userdata": "userdata-soldier-http-static.sh", 89 | "flow": { 90 | "wait_for_launch": 60, 91 | "reserved_account": "", 92 | "rpczone": "b2", 93 | "rpcnode": 2 94 | }, 95 | "bls": { 96 | "pass": "blsnopass.txt", 97 | "bucket": "harmony-secret-keys", 98 | "folder": "bls-test", 99 | "keyfile": "blskey-test.txt" 100 | }, 101 | "multikey": { 102 | "enable": true, 103 | "keys_per_node": 3, 104 | "blskey_folder": ".hmy/blskeys" 105 | }, 106 | "genesis": "genesis.txt", 107 | "libp2p": true 108 | } 109 | -------------------------------------------------------------------------------- /configs/benchmark-os.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 40 nodes on 4 shard in four regions", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "m5a.large", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "m5a.large", 11 | "regions": "iad,sfo,cmh,pdx", 12 | "protection": false, 13 | "root": 15 14 | }, 15 | "explorer_node": { 16 | "num_vm": 1, 17 | "type": "m5.large", 18 | "regions": "iad,sfo,cmh,pdx", 19 | "root": 25, 20 | "userdata": "userdata-systemd-static-exp.sh", 21 | "protection": false 22 | }, 23 | "bootnode": { 24 | "enable": true, 25 | "server": "52.40.84.2", 26 | "name": "b6.harmony.one", 27 | "port": 9867, 28 | "user": "ec2-user", 29 | "key": "oregon-key-benchmark.pem", 30 | "p2pkey": "b2-9870.key", 31 | "log_conn": true 32 | }, 33 | "bootnode1": { 34 | "enable": true, 35 | "server": "54.86.126.90", 36 | "name": "b5.harmony.one", 37 | "port": 9867, 38 | "user": "ec2-user", 39 | "key": "virginia-key-benchmark.pem", 40 | "p2pkey": "b1-9870.key", 41 | "log_conn": true 42 | }, 43 | "azure": { 44 | "num_vm": 0, 45 | "regions": [ 46 | "eastus", 47 | "westeurope", 48 | "southeastasia" 49 | ] 50 | }, 51 | "benchmark": { 52 | "shards": 4, 53 | "duration": 120, 54 | "dashboard": false, 55 | "crosstx": 30, 56 | "attacked_mode": 0, 57 | "peer_per_shard": 30, 58 | "minpeer": 5, 59 | "log_conn": false, 60 | "even_shard": true, 61 | "init_retry": false, 62 | "commit_delay": "2s", 63 | "network_type": "pangaea", 64 | "bls": true 65 | }, 66 | "logs": { 67 | "leader": true, 68 | "client": false, 69 | "validator": true, 70 | "soldier": false, 71 | "db": false 72 | }, 73 | "dashboard": { 74 | "name": "1.harmony.one", 75 | "port": 3000, 76 | "reset": "false" 77 | }, 78 | "explorer": { 79 | "name": "explorer.os.hmny.io", 80 | "port": 4444, 81 | "reset": "false" 82 | }, 83 | "explorer2": { 84 | "name": "34.220.94.30", 85 | "port": 4444, 86 | "reset": "false" 87 | }, 88 | "txgen": { 89 | "enable": "false", 90 | "ip": "myip", 91 | "port": 8000 92 | }, 93 | "parallel": 50, 94 | "userdata": "userdata-systemd-static.sh", 95 | "flow": { 96 | "wait_for_launch": 60, 97 | "reserved_account": "", 98 | "rpczone": "os", 99 | "rpcnode": 3 100 | }, 101 | "bls": { 102 | "pass": "blsnopass.txt", 103 | "bucket": "harmony-secret-keys", 104 | "folder": "bls-test", 105 | "keyfile": "blskey-test.txt" 106 | }, 107 | "multikey": { 108 | "enable": true, 109 | "keys_per_node": 3, 110 | "blskey_folder": ".hmy/blskeys" 111 | }, 112 | "genesis": "genesis.txt", 113 | "libp2p": true 114 | } 115 | -------------------------------------------------------------------------------- /configs/benchmark-pr.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 50 nodes on 1 shards, 1 region, run 300 seconds", 3 | "client": { 4 | "num_vm": 1, 5 | "type": "t3.medium", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "t3.medium", 11 | "regions": "iad", 12 | "root": 8 13 | }, 14 | "bootnode": { 15 | "enable": true, 16 | "server": "54.213.43.194", 17 | "name": "b2.harmony.one", 18 | "port": 9870, 19 | "user": "ec2-user", 20 | "key": "oregon-key-benchmark.pem", 21 | "p2pkey": "b2-9870.key" 22 | }, 23 | "bootnode1": { 24 | "enable": true, 25 | "server": "100.26.90.187", 26 | "name": "b1.harmony.one", 27 | "port": 9870, 28 | "user": "ec2-user", 29 | "key": "virginia-key-benchmark.pem", 30 | "p2pkey": "b1-9870.key" 31 | }, 32 | "azure": { 33 | "num_vm": 0, 34 | "regions": [ 35 | "eastus", 36 | "westeurope", 37 | "southeastasia" 38 | ] 39 | }, 40 | "benchmark": { 41 | "shards": 1, 42 | "duration": 300, 43 | "dashboard": false, 44 | "crosstx": 30, 45 | "attacked_mode": 0, 46 | "init_retry": false, 47 | "peer_per_shard": 50, 48 | "minpeer": 36, 49 | "archival": ",9,", 50 | "even_shard": false 51 | }, 52 | "logs": { 53 | "leader": true, 54 | "client": true, 55 | "validator": true, 56 | "soldier": true, 57 | "db": false 58 | }, 59 | "dashboard": { 60 | "server": "34.222.41.95", 61 | "port": 3000, 62 | "reset": "false" 63 | }, 64 | "explorer": { 65 | "server": "34.222.41.95", 66 | "port": 4444, 67 | "reset": "false" 68 | }, 69 | "txgen": { 70 | "enable": "true", 71 | "ip": "myip", 72 | "port": 8000 73 | }, 74 | "parallel": 100, 75 | "userdata": "userdata-soldier-http.sh", 76 | "flow": { 77 | "wait_for_launch": 60, 78 | "reserved_account": ",40,41,42,90,91,140,190,92,141,88,199,142,93,43,143,44,94,95,191,45,46,192,193,47,48,96,97,145,146,147,194,195,196," 79 | }, 80 | "libp2p": true 81 | } 82 | -------------------------------------------------------------------------------- /configs/benchmark-rongjian.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 464/600 nodes on 4 shard in 4 region, reserve 34 nodes for FN", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "t3.large", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "t3.large", 11 | "regions": "iad,pdx,nrt,dub", 12 | "root": 30 13 | }, 14 | "explorer_node": { 15 | "num_vm": 1, 16 | "type": "t3.large", 17 | "regions": "iad,pdx,nrt,dub", 18 | "root": 100 19 | }, 20 | "bootnode": { 21 | "enable": true, 22 | "server": "54.213.43.194", 23 | "name": "b2.harmony.one", 24 | "port": 9879, 25 | "user": "ec2-user", 26 | "key": "oregon-key-benchmark.pem", 27 | "p2pkey": "b2-9874.key", 28 | "log_conn": true 29 | }, 30 | "bootnode1": { 31 | "enable": true, 32 | "server": "100.26.90.187", 33 | "name": "b1.harmony.one", 34 | "port": 9879, 35 | "user": "ec2-user", 36 | "key": "virginia-key-benchmark.pem", 37 | "p2pkey": "b1-9870.key", 38 | "log_conn": true 39 | }, 40 | "azure": { 41 | "num_vm": 0, 42 | "regions": [ 43 | "eastus", 44 | "westeurope", 45 | "southeastasia" 46 | ] 47 | }, 48 | "benchmark": { 49 | "shards": 4, 50 | "duration": 60, 51 | "dashboard": true, 52 | "crosstx": 30, 53 | "attacked_mode": 0, 54 | "peer_per_shard": 150, 55 | "minpeer": 100, 56 | "log_conn": false, 57 | "even_shard": true, 58 | "init_retry": false, 59 | "commit_delay": "2s", 60 | "bls": true 61 | }, 62 | "logs": { 63 | "leader": true, 64 | "client": false, 65 | "validator": true, 66 | "soldier": true, 67 | "db": false 68 | }, 69 | "dashboard": { 70 | "server": "18.236.168.100", 71 | "name": "1.harmony.one", 72 | "port": 3000, 73 | "reset": "false" 74 | }, 75 | "explorer": { 76 | "server": "34.222.41.95", 77 | "name": "0.harmony.one", 78 | "port": 4444, 79 | "reset": "false" 80 | }, 81 | "txgen": { 82 | "enable": "false", 83 | "ip": "myip", 84 | "port": 8000 85 | }, 86 | "parallel": 100, 87 | "userdata": "userdata-soldier-http.sh", 88 | "flow": { 89 | "wait_for_launch": 120, 90 | "reserved_account": "", 91 | "rpczone": "t3" 92 | }, 93 | "bls": { 94 | "pass": "blspass.txt", 95 | "bucket": "harmony-secret-keys", 96 | "folder": "bls", 97 | "keyfile": "blskey.txt" 98 | }, 99 | "genesis": "genesis.txt", 100 | "libp2p": true 101 | } 102 | -------------------------------------------------------------------------------- /configs/benchmark-s3.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 448/600 nodes on 4 shard in 6 regions, reserve 152 nodes for FN", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "t3.medium", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "m5a.large", 11 | "regions": "iad,pdx,nrt,dub", 12 | "protection": true, 13 | "root": 50 14 | }, 15 | "explorer_node": { 16 | "num_vm": 1, 17 | "type": "m5a.large", 18 | "regions": "iad,pdx,nrt,dub", 19 | "root": 100, 20 | "userdata": "userdata-systemd-static-exp.sh", 21 | "protection": true 22 | }, 23 | "bootnode": { 24 | "enable": true, 25 | "server": "54.213.43.194", 26 | "name": "b2.harmony.one", 27 | "port": 9874, 28 | "user": "ec2-user", 29 | "key": "oregon-key-benchmark.pem", 30 | "p2pkey": "b2-9874.key", 31 | "log_conn": true 32 | }, 33 | "bootnode1": { 34 | "enable": true, 35 | "server": "100.26.90.187", 36 | "name": "b1.harmony.one", 37 | "port": 9874, 38 | "user": "ec2-user", 39 | "key": "virginia-key-benchmark.pem", 40 | "p2pkey": "b1-9874.key", 41 | "log_conn": true 42 | }, 43 | "bootnode3": { 44 | "enable": true, 45 | "server": "13.113.101.219", 46 | "name": "b3.harmony.one", 47 | "port": 12019, 48 | "user": "ec2-user", 49 | "key": "tokyo-key-benchmark.pem", 50 | "p2pkey": "b3-12019.key", 51 | "log_conn": true 52 | }, 53 | "bootnode4": { 54 | "enable": true, 55 | "server": "99.81.170.167", 56 | "name": "b4.harmony.one", 57 | "port": 12019, 58 | "user": "ec2-user", 59 | "key": "ireland-key-benchmark.pem", 60 | "p2pkey": "b4-12019.key", 61 | "log_conn": true 62 | }, 63 | "azure": { 64 | "num_vm": 0, 65 | "regions": [ 66 | "eastus", 67 | "westeurope", 68 | "southeastasia" 69 | ] 70 | }, 71 | "benchmark": { 72 | "shards": 4, 73 | "duration": 120, 74 | "dashboard": false, 75 | "crosstx": 30, 76 | "attacked_mode": 0, 77 | "peer_per_shard": 150, 78 | "minpeer": 101, 79 | "log_conn": false, 80 | "even_shard": true, 81 | "init_retry": false, 82 | "commit_delay": "2s", 83 | "bls": true 84 | }, 85 | "logs": { 86 | "leader": true, 87 | "client": false, 88 | "validator": true, 89 | "soldier": true, 90 | "db": true 91 | }, 92 | "dashboard": { 93 | "name": "1.harmony.one", 94 | "port": 3000, 95 | "reset": "false" 96 | }, 97 | "explorer": { 98 | "name": "explorer.harmony.one", 99 | "port": 4444, 100 | "reset": "true" 101 | }, 102 | "explorer2": { 103 | "name": "34.220.94.30", 104 | "port": 4444, 105 | "reset": "true" 106 | }, 107 | "txgen": { 108 | "enable": "false", 109 | "ip": "myip", 110 | "port": 8000 111 | }, 112 | "parallel": 50, 113 | "userdata": "userdata-soldier-http.sh", 114 | "flow": { 115 | "wait_for_launch": 120, 116 | "reserved_account": "", 117 | "rpczone": "t" 118 | }, 119 | "bls": { 120 | "pass": "blspass.txt", 121 | "bucket": "harmony-secret-keys", 122 | "folder": "bls", 123 | "keyfile": "blskey.txt" 124 | }, 125 | "genesis": "genesis.txt", 126 | "libp2p": true 127 | } 128 | -------------------------------------------------------------------------------- /configs/benchmark-stn.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 20 nodes, 2 shards", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "m5a.large", 6 | "regions": "sfo,pdx" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "c5.large", 11 | "regions": "sfo,pdx", 12 | "protection": false, 13 | "root": 10 14 | }, 15 | "explorer_node": { 16 | "num_vm": 1, 17 | "type": "c5.large", 18 | "regions": "sfo,pdx", 19 | "root": 25, 20 | "userdata": "userdata-systemd-static-exp.sh", 21 | "protection": false 22 | }, 23 | "bootnode": { 24 | "enable": true, 25 | "server": "52.40.84.2", 26 | "name": "b6.harmony.one", 27 | "port": 9842, 28 | "user": "ec2-user", 29 | "key": "oregon-key-benchmark.pem", 30 | "p2pkey": "b2-9870.key", 31 | "log_conn": false 32 | }, 33 | "bootnode1": { 34 | "enable": false, 35 | "server": "54.86.126.90", 36 | "name": "b5.harmony.one", 37 | "port": 9845, 38 | "user": "ec2-user", 39 | "key": "virginia-key-benchmark.pem", 40 | "p2pkey": "b1-9870.key", 41 | "log_conn": false 42 | }, 43 | "azure": { 44 | "num_vm": 0, 45 | "regions": [ 46 | "eastus", 47 | "westeurope", 48 | "southeastasia" 49 | ] 50 | }, 51 | "benchmark": { 52 | "shards": 2, 53 | "duration": 120, 54 | "dashboard": false, 55 | "crosstx": 30, 56 | "attacked_mode": 0, 57 | "peer_per_shard": 30, 58 | "minpeer": 8, 59 | "log_conn": false, 60 | "even_shard": true, 61 | "init_retry": false, 62 | "commit_delay": "2s", 63 | "network_type": "stressnet", 64 | "bls": true 65 | }, 66 | "logs": { 67 | "leader": true, 68 | "client": false, 69 | "validator": true, 70 | "soldier": true, 71 | "db": false 72 | }, 73 | "dashboard": { 74 | "name": "staking.harmony.one", 75 | "port": 3000, 76 | "reset": "false" 77 | }, 78 | "explorer": { 79 | "name": "explorer.stn.hmny.io", 80 | "port": 4444, 81 | "reset": "true" 82 | }, 83 | "explorer2": { 84 | "name": "34.220.94.30", 85 | "port": 4444, 86 | "reset": "false" 87 | }, 88 | "txgen": { 89 | "enable": "false", 90 | "ip": "myip", 91 | "port": 8000 92 | }, 93 | "parallel": 50, 94 | "userdata": "userdata-systemd-static.sh", 95 | "flow": { 96 | "wait_for_launch": 60, 97 | "reserved_account": "", 98 | "rpczone": "stn", 99 | "rpcnode": 3 100 | }, 101 | "bls": { 102 | "pass": "blsnopass.txt", 103 | "bucket": "harmony-secret-keys", 104 | "folder": "bls-test", 105 | "keyfile": "blskey-test.txt" 106 | }, 107 | "multikey": { 108 | "enable": true, 109 | "keys_per_node": 1, 110 | "blskey_folder": ".hmy/blskeys" 111 | }, 112 | "sentry1": { 113 | "enable": true, 114 | "ip": "52.11.85.154", 115 | "user": "ec2-user", 116 | "shard": 0 117 | }, 118 | "sentry2": { 119 | "enable": true, 120 | "ip": "54.202.197.141", 121 | "user": "ec2-user", 122 | "shard": 1 123 | }, 124 | "genesis": "genesis.txt", 125 | "libp2p": true 126 | } 127 | -------------------------------------------------------------------------------- /configs/benchmark-tnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "aws 20 nodes on 4 shard in four regions", 3 | "client": { 4 | "num_vm": 0, 5 | "type": "m5a.large", 6 | "regions": "iad" 7 | }, 8 | "leader": { 9 | "num_vm": 1, 10 | "type": "t3.small", 11 | "regions": "iad,sfo,cmh,pdx", 12 | "protection": false, 13 | "root": 10 14 | }, 15 | "explorer_node": { 16 | "num_vm": 1, 17 | "type": "t3.small", 18 | "regions": "iad,sfo,cmh,pdx", 19 | "root": 15, 20 | "userdata": "userdata-systemd-static-exp.sh", 21 | "protection": false 22 | }, 23 | "bootnode": { 24 | "enable": true, 25 | "server": "52.40.84.2", 26 | "name": "b6.harmony.one", 27 | "port": 9889, 28 | "user": "ec2-user", 29 | "key": "oregon-key-benchmark.pem", 30 | "p2pkey": "b2-9870.key", 31 | "log_conn": true 32 | }, 33 | "bootnode1": { 34 | "enable": true, 35 | "server": "54.86.126.90", 36 | "name": "b5.harmony.one", 37 | "port": 9889, 38 | "user": "ec2-user", 39 | "key": "virginia-key-benchmark.pem", 40 | "p2pkey": "b1-9870.key", 41 | "log_conn": true 42 | }, 43 | "azure": { 44 | "num_vm": 0, 45 | "regions": [ 46 | "eastus", 47 | "westeurope", 48 | "southeastasia" 49 | ] 50 | }, 51 | "benchmark": { 52 | "shards": 4, 53 | "duration": 120, 54 | "dashboard": false, 55 | "crosstx": 30, 56 | "attacked_mode": 0, 57 | "peer_per_shard": 25, 58 | "minpeer": 5, 59 | "log_conn": false, 60 | "even_shard": true, 61 | "init_retry": false, 62 | "commit_delay": "2s", 63 | "network_type": "testnet", 64 | "bls": true 65 | }, 66 | "logs": { 67 | "leader": true, 68 | "client": false, 69 | "validator": true, 70 | "soldier": false, 71 | "db": false 72 | }, 73 | "dashboard": { 74 | "name": "1.harmony.one", 75 | "port": 3000, 76 | "reset": "false" 77 | }, 78 | "explorer": { 79 | "name": "explorer.os.hmny.io", 80 | "port": 4444, 81 | "reset": "false" 82 | }, 83 | "explorer2": { 84 | "name": "34.220.94.30", 85 | "port": 4444, 86 | "reset": "false" 87 | }, 88 | "txgen": { 89 | "enable": "false", 90 | "ip": "myip", 91 | "port": 8000 92 | }, 93 | "parallel": 50, 94 | "userdata": "userdata-systemd-static.sh", 95 | "flow": { 96 | "wait_for_launch": 60, 97 | "reserved_account": "", 98 | "rpczone": "tn", 99 | "rpcnode": 3 100 | }, 101 | "bls": { 102 | "pass": "blsnopass.txt", 103 | "bucket": "harmony-secret-keys", 104 | "folder": "bls-test", 105 | "keyfile": "blskey-test.txt" 106 | }, 107 | "multikey": { 108 | "enable": true, 109 | "keys_per_node": 3, 110 | "blskey_folder": ".hmy/blskeys" 111 | }, 112 | "genesis": "genesis.txt", 113 | "libp2p": true 114 | } 115 | -------------------------------------------------------------------------------- /configs/launch-devnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "t3.small", 6 | "ondemand": 0, 7 | "spot": 39, 8 | "protection": false, 9 | "root": 20 10 | }, 11 | { 12 | "region": "pdx", 13 | "type": "t3.small", 14 | "ondemand": 0, 15 | "spot": 39, 16 | "protection": false, 17 | "root": 20 18 | } 19 | ], 20 | "userdata": { 21 | "name": "http", 22 | "file": "userdata-soldier-http.sh.aws" 23 | }, 24 | "batch": 100 25 | } 26 | -------------------------------------------------------------------------------- /configs/launch-dryrun.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "c5.large", 6 | "ondemand": 16, 7 | "spot": 0, 8 | "protection": false, 9 | "root": 20 10 | }, 11 | { 12 | "region": "sfo", 13 | "type": "c5.large", 14 | "ondemand": 16, 15 | "spot": 0, 16 | "protection": false, 17 | "root": 20 18 | }, 19 | { 20 | "region": "cmh", 21 | "type": "c5.large", 22 | "ondemand": 16, 23 | "spot": 0, 24 | "protection": false, 25 | "root": 20 26 | }, 27 | { 28 | "region": "pdx", 29 | "type": "c5.large", 30 | "ondemand": 16, 31 | "spot": 0, 32 | "protection": false, 33 | "root": 20 34 | } 35 | ], 36 | "userdata": { 37 | "name": "http", 38 | "file": "userdata-systemd-static-dryrun.sh.aws" 39 | }, 40 | "batch": 100 41 | } 42 | -------------------------------------------------------------------------------- /configs/launch-ds.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "t3.small", 6 | "ondemand": 0, 7 | "spot": 18, 8 | "protection": false, 9 | "root": 15 10 | } 11 | ], 12 | "userdata": { 13 | "name": "http", 14 | "file": "userdata-soldier-http.sh.aws" 15 | }, 16 | "batch": 100 17 | } 18 | -------------------------------------------------------------------------------- /configs/launch-leo.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "t3.small", 6 | "ondemand": 0, 7 | "spot": 4, 8 | "protection": false, 9 | "root": 10 10 | }, 11 | { 12 | "region": "pdx", 13 | "type": "t3.small", 14 | "ondemand": 0, 15 | "spot": 4, 16 | "protection": false, 17 | "root": 10 18 | }, 19 | { 20 | "region": "cmh", 21 | "type": "t3.small", 22 | "ondemand": 0, 23 | "spot": 4, 24 | "protection": false, 25 | "root": 10 26 | } 27 | ], 28 | "userdata": { 29 | "name": "http", 30 | "file": "userdata-soldier-http-static.sh.aws" 31 | }, 32 | "batch": 100 33 | } 34 | -------------------------------------------------------------------------------- /configs/launch-lrtn.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "c5.large", 6 | "ondemand": 0, 7 | "spot": 16, 8 | "protection": false, 9 | "root": 15 10 | } 11 | ], 12 | "userdata": { 13 | "name": "http", 14 | "file": "userdata-systemd-static-lrtn.sh" 15 | }, 16 | "batch": 100 17 | } 18 | 19 | -------------------------------------------------------------------------------- /configs/launch-mkeys.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "t3.small", 6 | "ondemand": 0, 7 | "spot": 18, 8 | "protection": false, 9 | "root": 10 10 | } 11 | ], 12 | "userdata": { 13 | "name": "http", 14 | "file": "userdata-soldier-http-static.sh.aws" 15 | }, 16 | "batch": 100 17 | } 18 | -------------------------------------------------------------------------------- /configs/launch-os.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "c5.large", 6 | "ondemand": 9, 7 | "spot": 0, 8 | "protection": false, 9 | "root": 15 10 | }, 11 | { 12 | "region": "sfo", 13 | "type": "c5.large", 14 | "ondemand": 9, 15 | "spot": 0, 16 | "protection": false, 17 | "root": 15 18 | }, 19 | { 20 | "region": "cmh", 21 | "type": "c5.large", 22 | "ondemand": 9, 23 | "spot": 0, 24 | "protection": false, 25 | "root": 15 26 | }, 27 | { 28 | "region": "pdx", 29 | "type": "c5.large", 30 | "ondemand": 9, 31 | "spot": 0, 32 | "protection": false, 33 | "root": 15 34 | } 35 | ], 36 | "userdata": { 37 | "name": "http", 38 | "file": "userdata-systemd-static.sh.aws" 39 | }, 40 | "batch": 100 41 | } 42 | -------------------------------------------------------------------------------- /configs/launch-pr.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "t3.micro", 6 | "ondemand": 1, 7 | "spot": 48, 8 | "root": 8 9 | } 10 | ], 11 | "userdata": { 12 | "name": "http", 13 | "file": "userdata-soldier-http.sh.aws" 14 | }, 15 | "batch": 100 16 | } 17 | -------------------------------------------------------------------------------- /configs/launch-rongjian.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "t3.large", 6 | "ondemand": 0, 7 | "spot": 113, 8 | "root": 30 9 | }, 10 | { 11 | "region": "pdx", 12 | "type": "t3.large", 13 | "ondemand": 0, 14 | "spot": 113, 15 | "root": 30 16 | }, 17 | { 18 | "region": "nrt", 19 | "type": "t3.large", 20 | "ondemand": 0, 21 | "spot": 113, 22 | "root": 30 23 | }, 24 | { 25 | "region": "dub", 26 | "type": "t3.large", 27 | "ondemand": 0, 28 | "spot": 113, 29 | "root": 30 30 | } 31 | 32 | ], 33 | "userdata": { 34 | "name": "http", 35 | "file": "userdata-soldier-http.sh.aws" 36 | }, 37 | "batch": 100 38 | } 39 | -------------------------------------------------------------------------------- /configs/launch-s3.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "m5a.large", 6 | "ondemand": 70, 7 | "spot": 0, 8 | "protection": true, 9 | "root": 50 10 | }, 11 | { 12 | "region": "pdx", 13 | "type": "m5a.large", 14 | "ondemand": 70, 15 | "spot": 0, 16 | "protection": true, 17 | "root": 50 18 | }, 19 | { 20 | "region": "nrt", 21 | "type": "m5a.large", 22 | "ondemand": 55, 23 | "spot": 0, 24 | "protection": true, 25 | "root": 50 26 | }, 27 | { 28 | "region": "dub", 29 | "type": "m5a.large", 30 | "ondemand": 55, 31 | "spot": 0, 32 | "protection": true, 33 | "root": 50 34 | }, 35 | { 36 | "region": "sin", 37 | "type": "m5a.large", 38 | "ondemand": 50, 39 | "spot": 0, 40 | "protection": true, 41 | "root": 50 42 | }, 43 | { 44 | "region": "sfo", 45 | "type": "m5.large", 46 | "ondemand": 50, 47 | "spot": 0, 48 | "protection": true, 49 | "root": 50 50 | }, 51 | { 52 | "region": "fra", 53 | "type": "m5a.large", 54 | "ondemand": 40, 55 | "spot": 0, 56 | "protection": true, 57 | "root": 50 58 | }, 59 | { 60 | "region": "cmh", 61 | "type": "m5a.large", 62 | "ondemand": 54, 63 | "spot": 0, 64 | "protection": true, 65 | "root": 50 66 | } 67 | ], 68 | "userdata": { 69 | "name": "http", 70 | "file": "userdata-soldier-http.sh.aws" 71 | }, 72 | "batch": 500 73 | } 74 | -------------------------------------------------------------------------------- /configs/launch-stn.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "sfo", 5 | "type": "t3.small", 6 | "ondemand": 0, 7 | "spot": 9, 8 | "protection": false, 9 | "root": 10 10 | }, 11 | { 12 | "region": "pdx", 13 | "type": "t3.small", 14 | "ondemand": 0, 15 | "spot": 9, 16 | "protection": false, 17 | "root": 10 18 | } 19 | ], 20 | "userdata": { 21 | "name": "http", 22 | "file": "userdata-systemd-static.sh.aws" 23 | }, 24 | "batch": 100 25 | } 26 | -------------------------------------------------------------------------------- /configs/launch-tnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "launch": [ 3 | { 4 | "region": "iad", 5 | "type": "t3.small", 6 | "ondemand": 0, 7 | "spot": 8, 8 | "protection": false, 9 | "root": 10 10 | }, 11 | { 12 | "region": "sfo", 13 | "type": "t3.small", 14 | "ondemand": 0, 15 | "spot": 8, 16 | "protection": false, 17 | "root": 10 18 | }, 19 | { 20 | "region": "cmh", 21 | "type": "t3.small", 22 | "ondemand": 0, 23 | "spot": 8, 24 | "protection": false, 25 | "root": 10 26 | }, 27 | { 28 | "region": "pdx", 29 | "type": "t3.small", 30 | "ondemand": 0, 31 | "spot": 8, 32 | "protection": false, 33 | "root": 10 34 | } 35 | ], 36 | "userdata": { 37 | "name": "http", 38 | "file": "userdata-systemd-static.sh.aws" 39 | }, 40 | "batch": 100 41 | } 42 | -------------------------------------------------------------------------------- /docs/launch.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | This document describes the structure and explain the variables of the launch-xxx.json files. 3 | This file is only used to control the launch of AWS EC2 instances. 4 | 5 | ## launch 6 | This section defines a list of region and the instance launch options in each region. 7 | Noted this is a list of json struct in this variable. And you may have multiple struct for one region defined. 8 | 9 | ### launch.region 10 | * string 11 | * This is the name of the AWS region. AWS internally uses the 3 letter airport code to represent each region. 12 | * The official list of AWS region is [Here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html) 13 | * You may find a complete list of AWS region code in the [aws.json file](https://github.com/harmony-one/experiment-deploy/blob/master/configs/aws.json) 14 | 15 | ### launch.type 16 | * string 17 | * This is the type of EC2 instance to be launched in this region. 18 | 19 | ### launch.ondemand 20 | * integer 21 | * This defines the number of on-demand instances to be launched. 22 | 23 | ### launch.ami 24 | * string 25 | * The AMI name to be launched. The AMI name can be found in the aws.json file as well. 26 | 27 | ### launch.spot 28 | * integer 29 | * The number of spot instances to be launched in the region. 30 | 31 | ## userdata 32 | This section defines the userdata for each instance. 33 | 34 | ### userdata.name 35 | * string 36 | * "http" is the new way to control the soldier via HTTP REST api. 37 | 38 | ### userdata.file 39 | * string 40 | * The file name of the user data template. 41 | 42 | ## batch 43 | * integer 44 | * The number of instances launched per batch. If we need to launch a huge number of instance, we may increase this number. 45 | 46 | # Sample 47 | [Devnet Launch Configuration JSON file](https://docs.google.com/document/d/1ijvu5Bud83AuT9rDC2AaqZlpKMVUqHn9BqP6d3TZRGM/) 48 | -------------------------------------------------------------------------------- /docs/txgen.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | This document is the detailed explanation of the txgen json file format. 4 | We use wallet application to emulate transactions to the blockchain. 5 | 6 | ## description 7 | * string 8 | * the description of the json file, purpose of this test setup. 9 | 10 | ## profile 11 | * string 12 | * the name of the json configuration, should be identical to the -suffix of the json file name. 13 | 14 | ## init 15 | this section describes the initialization setup of the test. 16 | 17 | ### init.reset 18 | * true/false 19 | * reset all the accounts db in this setup. 20 | 21 | ### init.account_db 22 | * string 23 | * the name of the account db file. 24 | 25 | ## accounts 26 | * list of account 27 | * this section has a list of existing accounts 28 | 29 | ### account.name 30 | * string 31 | * the alias of the account 32 | 33 | ### account.address 34 | * hash 35 | * the 0x... hash address of the account. The address can be queried in the blockchain explorer. 36 | 37 | ### account.prikey 38 | * string 39 | * the private key of the account. It will be imported into the wallet app to recreate the account. 40 | 41 | ## wallet 42 | this section describes the wallet setup. 43 | 44 | ### wallet.account 45 | * integer 46 | * number of accounts generated in wallet 47 | 48 | ### wallet.faucet 49 | * true/false 50 | * request free tokens from faucet or not 51 | 52 | ## transactions 53 | this section has a list of the transactions to be generated 54 | 55 | ### transaction.from 56 | * string 57 | * the name of the from address of the transaction 58 | * '*' represents all/any accounts generated in wallet section 59 | * '%' represents a random accounts generated in the wallet section 60 | 61 | ### transaction.to 62 | * string 63 | * the name of the to address of the transaction 64 | * '*' represents all/any accounts generated in wallet section 65 | * '%' represents a random accounts generated in the wallet section 66 | 67 | ### transaction.amount 68 | * numeric value 69 | * the amount of token in this transaction 70 | * '0' represents a random number 71 | 72 | ### transaction.delay 73 | * numeric value in second 74 | * the amount of delay after each transaction 75 | 76 | ### transaction.count 77 | * integer 78 | * the number of the same transaction 79 | 80 | ### transaction.parallel 81 | * integer 82 | * the number of transaction can execute in parallel 83 | 84 | # Sample 85 | [Txgen Beat Configuration](https://github.com/harmony-one/experiment-deploy/blob/master/configs/txgen-beat.json) 86 | -------------------------------------------------------------------------------- /experiment/genbls/Makefile: -------------------------------------------------------------------------------- 1 | all: main.go 2 | go build -o main main.go 3 | 4 | test: main 5 | ./main -host hosts.json -key 1 -shard 2 -slot 10 -pass ~/tmp/bls.pass -keypath ~/tmp/blskeys 6 | 7 | clean: 8 | rm -rf files 9 | rm main 10 | 11 | PHONY: test clean 12 | -------------------------------------------------------------------------------- /experiment/soldier/test/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "sessionID": "2345-7890", 3 | "configURL": "http://unique-bucket-bin.s3.amazonaws.com/ec2-user/distribution_config.txt" 4 | } 5 | -------------------------------------------------------------------------------- /experiment/soldier/test/init.json: -------------------------------------------------------------------------------- 1 | { 2 | "ip": "127.0.0.1", 3 | "port": "9999", 4 | "benchmarkArgs": "-metrics_report_url http://34.218.238.198:3000/report", 5 | "txgenArgs": "-duration -1" 6 | } 7 | -------------------------------------------------------------------------------- /experiment/soldier/test/test-soldier.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # this script is used to test local soldier http server 4 | # it sends REST api request to soldier 5 | 6 | IP=127.0.0.1 7 | PORT=9000 8 | 9 | function usage 10 | { 11 | ME=$(basename $0) 12 | cat< 0 { 45 | cmd.Env = append(os.Environ(), env...) 46 | } 47 | 48 | stderrBytes := &bytes.Buffer{} 49 | cmd.Stderr = stderrBytes 50 | 51 | if err := cmd.Start(); err != nil { 52 | log.Printf("Error Start: %v", err) 53 | return -1, err 54 | } 55 | 56 | Pid = cmd.Process.Pid 57 | 58 | log.Println("Command running", name, args) 59 | go func() { 60 | if err := cmd.Wait(); err != nil { 61 | log.Printf("Stderr: %v", string(stderrBytes.Bytes())) 62 | log.Printf("Command finished with error: %v", err) 63 | } else { 64 | log.Printf("Command finished successfully") 65 | } 66 | }() 67 | return -1, nil 68 | } 69 | -------------------------------------------------------------------------------- /gcloud/delete_group_instances.py: -------------------------------------------------------------------------------- 1 | from subprocess import call, check_output 2 | import argparse 3 | import os 4 | import time 5 | import logging 6 | import threading 7 | 8 | logging.basicConfig(level=logging.INFO, 9 | format='%(threadName)s %(asctime)s - %(name)s - %(levelname)s - %(message)s') 10 | 11 | def getLogger(file): 12 | logger = logging.getLogger(file) 13 | logger.setLevel(logging.INFO) 14 | return logger 15 | 16 | LOGGER = getLogger(__file__) 17 | 18 | DELETE_CMD = [ 19 | "gcloud", 20 | "compute", 21 | "instance-groups", 22 | "managed", 23 | "delete", 24 | "--zone", 25 | "ZONE", # at 6 26 | "--quiet", 27 | ] 28 | 29 | def delete_all_group_instances(zone, groups): 30 | LOGGER.info("Deleting all groups in zone %s" % zone) 31 | cmd = DELETE_CMD[:] 32 | cmd[6] = zone 33 | cmd.extend(groups) 34 | LOGGER.info("Deleting all groups in zone %s" % zone) 35 | ret_code = call(cmd) 36 | LOGGER.info("Finished deleting all groups in zone %s with return code %s" % (zone, ret_code)) 37 | 38 | def main(): 39 | parser = argparse.ArgumentParser( 40 | description='This script helps create groups of instances in gcp') 41 | parser.add_argument('--gcp_output', type=str, dest='gcp_output', 42 | default='gcp_output.txt', help='gcp group output') 43 | args = parser.parse_args() 44 | 45 | zone_to_group = {} 46 | for line in open(args.gcp_output).readlines(): 47 | line = line.strip() 48 | if not line[:-2] in zone_to_group: 49 | zone_to_group[line[:-2]] = [] 50 | zone_to_group[line[:-2]].append(line) 51 | 52 | thread_pool = [] 53 | for zone, groups in zone_to_group.iteritems(): 54 | t = threading.Thread(target=delete_all_group_instances, args=( 55 | zone, groups)) 56 | t.start() 57 | thread_pool.append(t) 58 | for t in thread_pool: 59 | t.join() 60 | 61 | 62 | 63 | if __name__ == '__main__': 64 | main() 65 | -------------------------------------------------------------------------------- /gcloud/get_gcp_ip.sh: -------------------------------------------------------------------------------- 1 | gcloud compute instances list --flatten networkInterfaces[].accessConfigs[] --format 'csv[no-heading](name,networkInterfaces.accessConfigs.natIP)' > name_ips.txt 2 | gcloud compute instances list --flatten networkInterfaces[].accessConfigs[] --format 'csv[no-heading](networkInterfaces.accessConfigs.natIP)' > ips.txt 3 | 4 | -------------------------------------------------------------------------------- /gcloud/requirements.txt: -------------------------------------------------------------------------------- 1 | google-api-python-client==1.7.4 2 | google-auth==1.5.1 3 | google-auth-httplib2==0.0.3 4 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/harmony-one/experiment-deploy 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/aws/aws-sdk-go v1.19.1 7 | github.com/kr/pretty v0.1.0 8 | github.com/stretchr/testify v1.3.0 // indirect 9 | golang.org/x/net v0.0.0-20190322120337-addf6b3196f6 // indirect 10 | ) 11 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/aws/aws-sdk-go v1.19.1 h1:8kOP0/XGJwXIFlYoD1DAtA39cAjc15Iv/QiDMKitD9U= 2 | github.com/aws/aws-sdk-go v1.19.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= 3 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 4 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 5 | github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= 6 | github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 7 | github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= 8 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 9 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 10 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 11 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 12 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 13 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 14 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 15 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 16 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 17 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 18 | golang.org/x/net v0.0.0-20190322120337-addf6b3196f6 h1:78jEq2G3J16aXneH23HSnTQQTCwMHoyO8VEiUH+bpPM= 19 | golang.org/x/net v0.0.0-20190322120337-addf6b3196f6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 20 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 21 | golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= 22 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 23 | -------------------------------------------------------------------------------- /go_executable_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # this script is used to generate the binary of soldier 3 | # TODO: add error and parameter checking 4 | 5 | export GO111MODULE=on 6 | declare -A SRC 7 | SRC[soldier]=experiment/soldier/main.go 8 | SRC[instance]=aws/instance/instance.go 9 | SRC[genbls]=experiment/genbls/main.go 10 | 11 | BINDIR=bin 12 | BUCKET=unique-bucket-bin 13 | GOOS=linux 14 | GOARCH=amd64 15 | FOLDER=/${WHOAMI:-$USER} 16 | 17 | if [ "$(uname -s)" == "Darwin" ]; then 18 | MD5='md5 -r' 19 | else 20 | MD5=md5sum 21 | fi 22 | 23 | SCRIPTS=( $BINDIR/md5sum-cs.txt ) 24 | 25 | function usage 26 | { 27 | ME=$(basename $0) 28 | cat< $BINDIR/md5sum-cs.txt 2> /dev/null 74 | } 75 | 76 | function upload 77 | { 78 | AWSCLI=aws 79 | 80 | if [ -n "$PROFILE" ]; then 81 | AWSCLI+=" --profile $PROFILE" 82 | fi 83 | 84 | for bin in "${!SRC[@]}"; do 85 | [ -e $BINDIR/$bin ] && $AWSCLI s3 cp $BINDIR/$bin s3://${BUCKET}$FOLDER/$bin --acl public-read 86 | done 87 | 88 | for s in "${SCRIPTS[@]}"; do 89 | if [ -d $s ]; then 90 | $AWSCLI s3 sync $s s3://${BUCKET}$FOLDER/$(basename $s) --acl public-read 91 | elif [ -e $s ]; then 92 | $AWSCLI s3 cp $s s3://${BUCKET}$FOLDER/$(basename $s) --acl public-read 93 | fi 94 | done 95 | } 96 | 97 | ################################ MAIN FUNCTION ############################## 98 | while getopts "hp:a:o:b:f:" option; do 99 | case $option in 100 | h) usage ;; 101 | p) PROFILE=$OPTARG ;; 102 | a) GOARCH=$OPTARG ;; 103 | o) GOOS=$OPTARG ;; 104 | b) BUCKET=$OPTARG ;; 105 | f) FOLDER=/$OPTARG ;; 106 | esac 107 | done 108 | 109 | mkdir -p $BINDIR 110 | 111 | shift $(($OPTIND-1)) 112 | 113 | ACTION=${1:-build} 114 | 115 | case "$ACTION" in 116 | "build") build_only ;; 117 | "upload") upload ;; 118 | *) usage ;; 119 | esac 120 | -------------------------------------------------------------------------------- /pipeline/.gitignore: -------------------------------------------------------------------------------- 1 | *.ids 2 | txgen 3 | *.rlp 4 | distribution_config.txt 5 | instance_ids_output.txt 6 | instance_output.txt 7 | logs/ 8 | raw_ip.txt 9 | bn-ma.txt 10 | bc-ma.txt 11 | go-bootnode* 12 | explorer.reset.json 13 | raw_ip-explorer_node.txt 14 | raw_ip-leader.txt 15 | updater53.sh -------------------------------------------------------------------------------- /pipeline/backup_archival_db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | 16 | print_usage() { 17 | cat <<- ENDEND 18 | usage: ${progname} ${common_usage} shard [shard ...] 19 | 20 | ${common_usage_desc} 21 | 22 | arguments: 23 | shard the shard number, such as 0 24 | ENDEND 25 | } 26 | 27 | unset -v OPTIND OPTARG opt 28 | OPTIND=1 29 | while getopts ":${common_getopts_spec}" opt 30 | do 31 | ! process_common_opts "${opt}" || continue 32 | case "${opt}" in 33 | '?') usage "unrecognized option -${OPTARG}";; 34 | ':') usage "missing argument for -${OPTARG}";; 35 | *) err 70 "unhandled option -${OPTARG}";; 36 | esac 37 | done 38 | shift $((${OPTIND} - 1)) 39 | default_common_opts 40 | 41 | case $# in 42 | 0) usage "missing shard arg";; 43 | esac 44 | 45 | unset -v now backup_dir 46 | now=$(date -u +%Y-%m-%dT%H:%M:%SZ) 47 | backup_dir=$(mktemp -d "${logdir}/archival-db.${now}.XXXXXX") 48 | mkdir -p "${backup_dir}" 49 | 50 | unset -v shard 51 | for shard 52 | do 53 | "${progdir}/run_on_shard.sh" -d "${logdir}" -rEST "${shard}" 'echo "${ip}"' | head -10 | ( 54 | unset -v ip 55 | while read -r ip 56 | do 57 | echo "rsyncing from ${ip}" 58 | # TODO ek – eliminate need for -d ${logdir} below 59 | rsync -azH -e "${progdir}/node_ssh.sh -d ${logdir}" --delete "${ip}:harmony_db_*" "${backup_dir}/s${shard}-${ip}/" & 60 | done 61 | wait 62 | ) 63 | done 64 | msg "backup finished and can be found in: ${backup_dir}" 65 | -------------------------------------------------------------------------------- /pipeline/cal_tps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function usage 4 | { 5 | ME=$(basename $0) 6 | cat< "all-peers-${shard}.txt" 53 | sort "${logdir}/shard${shard}.txt" | 54 | join -v1 -t ' ' "all-peers-${shard}.txt" - \ 55 | > "ext-peers-${shard}.txt" 56 | 57 | rm -f "online-ext-keys-${shard}.txt" 58 | while read line; do 59 | ip=$(echo $line | awk ' { print $1 } ') 60 | key=$(echo $line | awk ' { print $2 } ') 61 | if nc -w 3 -vz $ip 6000; then 62 | echo $key >> "online-ext-keys-${shard}.txt" 63 | fi 64 | done<"ext-peers-${shard}.txt" 65 | sort -u "online-ext-keys-${shard}.txt" > "online-ext-keys-sorted-${shard}.txt" 66 | num_keys=$(($(wc -l < "online-ext-keys-sorted-${shard}.txt") + 0)) 67 | echo ${shard} ${num_keys} 68 | done 69 | -------------------------------------------------------------------------------- /pipeline/flatten_config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import absolute_import, division, print_function, unicode_literals 4 | 5 | import re 6 | 7 | try: 8 | unicode 9 | except NameError: 10 | unicode = str 11 | try: 12 | bytes 13 | except NameError: 14 | bytes = str 15 | 16 | try: 17 | from collections.abc import Mapping, Sequence 18 | except ImportError: 19 | from collections import Mapping, Sequence 20 | 21 | ident_re = re.compile(r'^[A-Za-z_][A-Za-z0-9_]*$') 22 | 23 | 24 | def flatten(d, key_re=None): 25 | """Flatten the given JSON/YAML deserialized data.""" 26 | return _flatten(None, d, key_re) 27 | 28 | 29 | def _flatten(p, d, key_re): 30 | if p is None: 31 | p1 = '' 32 | else: 33 | p1 = p + '.' 34 | if isinstance(d, Mapping): 35 | for k, v in d.items(): 36 | if key_re is not None: 37 | m = key_re.search(k) 38 | if m is None: 39 | raise ValueError( 40 | "invalid (sub-)key %r under parent key %r" % (p, k)) 41 | for r in _flatten(p1 + k, v, key_re): 42 | yield r 43 | elif isinstance(d, Sequence) and not isinstance(d, (unicode, bytes)): 44 | for i, v in enumerate(d): 45 | for r in _flatten(p1 + str(i), v, key_re): 46 | yield r 47 | else: 48 | yield p, d 49 | 50 | 51 | if __name__ == '__main__': 52 | import argparse 53 | import sys 54 | parser = argparse.ArgumentParser(description=""" 55 | Flattens a JSON/YAML configuration into a list of tab-separated 56 | key-value pairs.""") 57 | parser.add_argument('--yaml', '-y', dest='input_type', 58 | action='store_const', const='yaml', 59 | help="""treat input(s) as YAML""") 60 | parser.add_argument('--json', '-j', dest='input_type', 61 | action='store_const', const='json', 62 | help="""treat input(s) as JSON (default)""") 63 | parser.add_argument('--ident', '-I', dest='key_re', 64 | action='store_const', const=ident_re, 65 | help="""validate keys as identifiers""") 66 | parser.add_argument('--key-re', '-R', dest='key_re', type=re.compile, 67 | metavar='REGEX', 68 | help="""validate keys using the given regex""") 69 | parser.add_argument('--sep', '-S', 70 | help="""key-value separator (default: tab)""") 71 | parser.add_argument('filenames', nargs='*', metavar='FILE', 72 | help="""input filename(s); - is stdin (default)""") 73 | parser.set_defaults(input_type='json', sep='\t') 74 | args = parser.parse_args() 75 | if args.input_type == 'json': 76 | import json 77 | load = json.load 78 | elif args.input_type == 'yaml': 79 | import yaml 80 | load = yaml.load 81 | else: 82 | parser.error("invalid input type %r" % (args.input_type,)) 83 | for filename in args.filenames or ['-']: 84 | if filename == '-': 85 | d = load(sys.stdin) 86 | else: 87 | with open(filename) as f: 88 | d = load(f) 89 | for k, v in flatten(d, args.key_re): 90 | if isinstance(v, bool): 91 | v = v and 'true' or 'false' 92 | print(k or '', args.sep, v, sep='') 93 | -------------------------------------------------------------------------------- /pipeline/fund.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -z "${HMY_PROFILE}" ]; then 4 | echo "profile is not set, exiting..." 5 | exit 6 | fi 7 | 8 | unset OPTARG opt clear force shards 9 | clear=false 10 | force=false 11 | shards="0" 12 | while getopts :cfs:u: opt 13 | do 14 | case "${opt}" in 15 | c) clear=true ;; 16 | f) force=true ;; 17 | s) shards="${OPTARG}" ;; 18 | u) csv_source="${OPTARG}" ;; 19 | *) echo " 20 | Funding script according to harmony.one/keys2 21 | 22 | Options: 23 | -c Clear the old funding logs before starting the funding process. 24 | -f Force funding without any checks. 25 | -s shards CSV string Specify shards to fund as a CSV string. (default: ${shards}) 26 | -u URL Url to the spreadsheet/CSV file that will be used as the source for funding accounts 27 | " 28 | exit ;; 29 | esac 30 | done 31 | 32 | csv_file="fund-${HMY_PROFILE}.csv" 33 | 34 | if [ -z "${csv_source}" ]; then 35 | csv_source="https://docs.google.com/spreadsheets/d/e/2PACX-1vTUUOCAuSgP8TcA1xWY5AbxaMO7OSowYgdvaHpeMQudAZkHkJrf2sGE6TZ0hIbcy20qpZHmlC8HhCw1/pub?gid=0&single=true&output=csv" 36 | csv_name="harmony.one/keys2" 37 | fi 38 | 39 | if [ -z "${csv_name}" ]; then 40 | csv_name=$csv_source 41 | fi 42 | 43 | rm -rf ./bin # Clear existing CLI, assuption made of where fund.py stores CLI binary. 44 | if [ "${clear}" = true ]; then 45 | echo "[!] clearing old funding logs..." 46 | rm -rf ./logs/${HMY_PROFILE}/funding.json 47 | fi 48 | echo "[!] getting funding information from ${csv_name}" 49 | curl -o "${csv_file}" "${csv_source}" -s > /dev/null 50 | if [ "${force}" = true ]; then 51 | echo "[!] force funding..." 52 | python3 -u fund.py --from_csv "${csv_file}" --shards "${shards}" --yes --force 53 | else 54 | python3 -u fund.py --from_csv "${csv_file}" --shards "${shards}" --yes 55 | fi 56 | -------------------------------------------------------------------------------- /pipeline/generate_distribution_config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import argparse 4 | import logging 5 | import sys 6 | 7 | from utils import utils 8 | 9 | logging.basicConfig(level=logging.INFO, format='%(threadName)s %(asctime)s - %(name)s - %(levelname)s - %(message)s') 10 | LOGGER = logging.getLogger(__file__) 11 | LOGGER.setLevel(logging.INFO) 12 | 13 | 14 | if __name__ == "__main__": 15 | parser = argparse.ArgumentParser(description='This script helps you to genereate distribution config') 16 | parser.add_argument('--ip_list_file', type=str, dest='ip_list_file', 17 | default='raw_ip.txt', help="the file containing available raw ips") 18 | # If the ip_list_file is None we need to use the region, node_name_tag and region_config to collect raw_ip 19 | parser.add_argument('--region', type=str, dest='region_number', 20 | default="4", help="region number") 21 | parser.add_argument('--node_name_tag', type=str, 22 | dest='node_name_tag', default='4-NODE-23-36-01-2018-07-05') 23 | parser.add_argument('--region_config', type=str, 24 | dest='region_config', default='configuration.txt') 25 | 26 | parser.add_argument('--shard_number', type=int, dest='shard_number', default=1) 27 | parser.add_argument('--explorer_number', type=int, dest='explorer_number', default=0) 28 | parser.add_argument('--client_number', type=int, dest='client_number', default=0) 29 | parser.add_argument('--commander_number', type=int, dest='commander_number', default=0) 30 | parser.add_argument('--distribution_config', type=str, 31 | dest='distribution_config', default='distribution_config.txt') 32 | args = parser.parse_args() 33 | 34 | if args.ip_list_file == None: 35 | utils.generate_distribution_config2( 36 | args.region_number, args.node_name_tag, args.region_config, 37 | args.shard_number, args.explorer_number, args.client_number, args.distribution_config, args.commander_number) 38 | else: 39 | utils.generate_distribution_config3(args.shard_number, args.explorer_number, args.client_number, 40 | args.ip_list_file, args.distribution_config, args.commander_number) 41 | LOGGER.info("Done writing %s" % args.distribution_config) 42 | -------------------------------------------------------------------------------- /pipeline/get_leader.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | 16 | print_usage() { 17 | cat <<- ENDEND 18 | usage: ${progname} ${common_usage} shard ... 19 | 20 | Prints the current leader's info 21 | 22 | ${common_usage_desc} 23 | 24 | shard the shard number, such as 0 25 | ENDEND 26 | } 27 | 28 | unset -v OPTIND OPTARG opt 29 | OPTIND=1 30 | while getopts :${common_getopts_spec} opt 31 | do 32 | ! process_common_opts "${opt}" || continue 33 | case "${opt}" in 34 | '?') usage "unrecognized option -${OPTARG}";; 35 | ':') usage "missing argument for -${OPTARG}";; 36 | *) err 70 "unhandled option -${OPTARG}";; 37 | esac 38 | done 39 | shift $((${OPTIND} - 1)) 40 | default_common_opts 41 | 42 | case $# in 43 | 0) usage "missing shard argument";; 44 | esac 45 | 46 | unset -v shard 47 | 48 | for shard 49 | do 50 | "${progdir}/run_on_shard.sh" -rST -d "${logdir}" -p "${profile}" "${shard}" ' 51 | cat ../tmp_log/*/*.log latest/*/*.log 2> /dev/null | 52 | grep HOORAY | 53 | jq -r '\''(.ip // "?") + " " + (.t // .time // "?")'\'' | 54 | tail -1 55 | ' | sort -k2,3 | cut -f1 | tail -1 56 | done 57 | -------------------------------------------------------------------------------- /pipeline/kill_shard.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | 16 | print_usage() { 17 | cat <<- ENDEND 18 | usage: ${progname} ${common_usage} shard [shard ...] 19 | 20 | ${common_usage_desc} 21 | 22 | arguments: 23 | shard the shard number, such as 0 24 | ENDEND 25 | } 26 | 27 | unset -v OPTIND OPTARG opt 28 | OPTIND=1 29 | while getopts ":${common_getopts_spec}" opt 30 | do 31 | ! process_common_opts "${opt}" || continue 32 | case "${opt}" in 33 | '?') usage "unrecognized option -${OPTARG}";; 34 | ':') usage "missing argument for -${OPTARG}";; 35 | *) err 70 "unhandled option -${OPTARG}";; 36 | esac 37 | done 38 | shift $((${OPTIND} - 1)) 39 | default_common_opts 40 | 41 | unset -v shard 42 | for shard 43 | do 44 | "${progdir}/run_on_shard.sh" -d "${logdir}" -rT "${shard}" ' 45 | if sudo pkill harmony 46 | then 47 | unset -v start end 48 | start=$(date +%s) 49 | while sudo pgrep harmony > /dev/null 50 | do 51 | sleep 1 52 | done 53 | end=$(date +%s) 54 | echo "${ip}: OK: $((${end} - ${start}))s" 55 | else 56 | echo "${ip}: ERROR: pkill returned $?" 57 | fi 58 | ' 59 | done 60 | -------------------------------------------------------------------------------- /pipeline/log.sh: -------------------------------------------------------------------------------- 1 | . "${progdir}/msg.sh" 2 | . "${progdir}/util.sh" 3 | 4 | log() { 5 | local level priority level_ok priority_ok high_enough l 6 | level="${1-}" 7 | if ! shift 1 8 | then 9 | msg "log: level not specified" 10 | return 64 11 | fi 12 | priority="${1-}" 13 | if ! shift 1 14 | then 15 | msg "log: priority not specified" 16 | return 64 17 | fi 18 | level_ok=false 19 | priority_ok=false 20 | high_enough= 21 | for l in EMERGENCY ALERT CRITICAL ERROR WARNING NOTICE INFO DEBUG 22 | do 23 | case "${l}" in 24 | "${priority}") 25 | : ${high_enough:="true"} 26 | priority_ok=true 27 | ;; 28 | esac 29 | case "${l}" in 30 | "${level}") 31 | : ${high_enough:="false"} 32 | level_ok=true 33 | ;; 34 | esac 35 | done 36 | case "${level_ok}" in 37 | false) 38 | msg "log: unknown level ${level}" 39 | return 64 40 | ;; 41 | esac 42 | case "${priority_ok}" in 43 | false) 44 | msg "log: unknown priority ${priority}" 45 | return 64 46 | ;; 47 | esac 48 | case "${high_enough}" in 49 | true) 50 | msg "${priority}:" "$@" 51 | ;; 52 | esac 53 | } 54 | 55 | log_define() { 56 | local func_prefix level_var func_prio func prio default_level opt 57 | OPTIND=1 58 | while getopts :f:v:l: opt "$@" 59 | do 60 | case "${opt}" in 61 | '?') 62 | msg "log_define: unrecognized option -${OPTARG}" 63 | return 64 64 | ;; 65 | ':') 66 | msg "log_define: missing argument for -${OPTARG}" 67 | return 64 68 | ;; 69 | v) 70 | level_var="${OPTARG}" 71 | ;; 72 | l) 73 | default_level="${OPTARG}" 74 | ;; 75 | esac 76 | done 77 | shift $((${OPTIND} - 1)) 78 | case $# in 79 | 0) 80 | msg "log_define: function prefix is required" 81 | return 64 82 | ;; 83 | esac 84 | func_prefix="${1}" 85 | : ${level_var:="${func_prefix}_log_level"} 86 | : ${default_level:="NOTICE"} 87 | for func_prio in emerg:EMERGENCY alert:ALERT crit:CRITICAL err:ERROR \ 88 | warning:WARNING notice:NOTICE info:INFO debug:DEBUG 89 | do 90 | func="${func_prefix}_${func_prio%:*}" 91 | prio="${func_prio#*:}" 92 | eval " 93 | ${func}() { 94 | log \"\${${level_var}-${default_level}}\" \ 95 | ${prio} \"\$@\" 96 | } 97 | " 98 | done 99 | eval " 100 | ${func_prefix}_fatal() { 101 | local code 102 | code=\"\${1-1}\" 103 | shift 1 2> /dev/null || : 104 | ${func_prefix}_crit \"\$@\" 105 | exit \"\${code}\" 106 | } 107 | " 108 | } 109 | 110 | log_define -v log_level log 111 | 112 | log_level_below() { 113 | case "${1-}" in 114 | EMERGENCY) echo ALERT;; 115 | ALERT) echo CRITICAL;; 116 | CRITICAL) echo ERROR;; 117 | ERROR) echo WARNING;; 118 | WARNING) echo NOTICE;; 119 | NOTICE) echo INFO;; 120 | INFO) echo DEBUG;; 121 | DEBUG) echo DEBUG;; 122 | *) 123 | msg "log_level_below: unknown level ${1-}" 124 | return 1 125 | ;; 126 | esac 127 | } 128 | 129 | log_level_above() { 130 | case "${1-}" in 131 | DEBUG) echo INFO;; 132 | INFO) echo NOTICE;; 133 | NOTICE) echo WARNING;; 134 | WARNING) echo ERROR;; 135 | ERROR) echo CRITICAL;; 136 | CRITICAL) echo ALERT;; 137 | ALERT) echo EMERGENCY;; 138 | EMERGENCY) echo EMERGENCY;; 139 | *) 140 | msg "log_level_below: unknown level ${1-}" 141 | return 1 142 | ;; 143 | esac 144 | } 145 | -------------------------------------------------------------------------------- /pipeline/msg.sh: -------------------------------------------------------------------------------- 1 | msg() { 2 | case $# in 3 | [1-9]*) 4 | echo "${progname+"${progname}: "}$*" >&2 5 | ;; 6 | esac 7 | } 8 | 9 | err() { 10 | local status 11 | status="${1-1}" 12 | shift 1 2> /dev/null || : 13 | msg "$@" 14 | exit "${status}" || exit 1 15 | } 16 | 17 | msg_exit() { 18 | err "$@" 19 | } 20 | -------------------------------------------------------------------------------- /pipeline/node_ssh.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | . "${progdir}/util.sh" 16 | . "${progdir}/log.sh" 17 | 18 | log_define node_ssh 19 | 20 | print_usage() { 21 | cat <<- ENDEND 22 | usage: ${progname} ${common_usage} [-M] [-o opt] [user@]ipaddr [command] 23 | 24 | ${common_usage_desc} 25 | 26 | options: 27 | -o opt add an extra ssh(1) option 28 | -p profile use specified profile 29 | -M use opportunistic ssh connection multiplexing 30 | (helps back-to-back invocations); -M -M uses fresh mux 31 | -n run in background 32 | 33 | arguments: 34 | user remote username (default: same as local) 35 | ipaddr IP address of the node 36 | command the shell command to run on the host; 37 | if not given, use interactive shell 38 | ENDEND 39 | } 40 | 41 | unset -v use_ssh_mux exit_mux_first ssh_opts 42 | use_ssh_mux=false 43 | exit_mux_first=false 44 | ssh_opts="" 45 | 46 | unset -v OPTIND OPTARG opt 47 | OPTIND=1 48 | while getopts ":o:Mn${common_getopts_spec}" opt 49 | do 50 | ! process_common_opts "${opt}" || continue 51 | case "${opt}" in 52 | '?') usage "unrecognized option -${OPTARG}";; 53 | ':') usage "missing argument for -${OPTARG}";; 54 | o) ssh_opts="${ssh_opts} $(shell_quote "${OPTARG}")";; 55 | n) ssh_opts="${ssh_opts} -n";; 56 | M) exit_mux_first="${use_ssh_mux}"; use_ssh_mux=true;; 57 | *) err 70 "unhandled option -${OPTARG}";; 58 | esac 59 | done 60 | shift $((${OPTIND} - 1)) 61 | default_common_opts 62 | 63 | unset -v userip user ip cmd_quoted 64 | userip="${1-}" 65 | shift 1 2> /dev/null || usage "missing IP address" 66 | 67 | unset -v key_file 68 | KEYDIR=${HSSH_KEY_DIR:-~/.ssh/keys} 69 | 70 | case "${userip}" in 71 | *@*) 72 | user="${userip%%@*}" 73 | ip="${userip#*@}" 74 | key_file=$KEYDIR/$(find_key_from_ip $ip) 75 | ;; 76 | *) 77 | ip="${userip}" 78 | # hostname=$(host "$ip" | awk ' { print $NF } ') 79 | vendor=$(find_cloud_from_ip $ip) 80 | case "$vendor" in 81 | "aws") 82 | userip="ec2-user@${userip}" ;; 83 | "gcp") 84 | userip="gce-user@${userip}" ;; 85 | "azure") 86 | userip="hmy@${userip}" ;; 87 | "do") 88 | userip="root@${userip}" ;; 89 | esac 90 | # key_file=$KEYDIR/$(find_key_from_host $hostname) 91 | ;; 92 | esac 93 | cmd_quoted=$(shell_quote "$@") 94 | 95 | if ${use_ssh_mux} 96 | then 97 | mkdir -p ~/.ssh/ctl 98 | fi 99 | 100 | unset -v known_hosts_file 101 | [ -d "${logdir}" ] || logdir=/tmp 102 | known_hosts_file="${logdir}/known_hosts" 103 | 104 | set -- \ 105 | -F /dev/null \ 106 | -o GlobalKnownHostsFile=/dev/null \ 107 | -o UserKnownHostsFile="${known_hosts_file}" \ 108 | -o StrictHostKeyChecking=no \ 109 | -o ServerAliveInterval=60 \ 110 | -o ConnectTimeout=10 111 | 112 | if ${use_ssh_mux} 113 | then 114 | set -- "$@" \ 115 | -o ControlPath='~/.ssh/ctl/%r@%h[%p]' \ 116 | -o ControlMaster=auto \ 117 | -o ControlPersist=yes 118 | fi 119 | 120 | # TODO: add harmony-node.pem for mainnet TF nodes 121 | # Need to support testnet TF nodes later 122 | #if [ -f "${key_file}" ] 123 | #then 124 | # set -- "$@" -i "${key_file}" 125 | #else 126 | # node_ssh_info "key file does not exist; proceeding without one" 127 | #fi 128 | 129 | if ${exit_mux_first} 130 | then 131 | ssh "$@" -O exit "${userip}" || : 132 | fi 133 | 134 | eval 'set -- "$@" '"${ssh_opts}" 135 | set -- "$@" "${userip}" 136 | eval 'set -- "$@" '"${cmd_quoted}" 137 | exec ssh "$@" 138 | -------------------------------------------------------------------------------- /pipeline/peer_log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | 16 | print_usage() { 17 | cat <<- ENDEND 18 | usage: ${progname} ${common_usage} shard ... 19 | 20 | ${common_usage_desc} 21 | 22 | options: 23 | 24 | shard the shard number, such as 0 25 | ENDEND 26 | } 27 | 28 | unset -v OPTIND OPTARG opt 29 | OPTIND=1 30 | while getopts :${common_getopts_spec} opt 31 | do 32 | ! process_common_opts "${opt}" || continue 33 | case "${opt}" in 34 | '?') usage "unrecognized option -${OPTARG}";; 35 | ':') usage "missing argument for -${OPTARG}";; 36 | *) err 70 "unhandled option -${OPTARG}";; 37 | esac 38 | done 39 | shift $((${OPTIND} - 1)) 40 | default_common_opts 41 | 42 | case $# in 43 | 0) usage "missing shard argument";; 44 | esac 45 | 46 | unset -v shard 47 | for shard 48 | do 49 | "${progdir}/run_on_shard.sh" -p "${profile}" -d "${logdir}" -rTSE "${shard}" ' 50 | zcat ../tmp_log/*/zero*.log.gz latest/zero*.log.gz 2> /dev/null | 51 | cat - ../tmp_log/*/zero*.log latest/zero*.log 2> /dev/null | 52 | grep -F '\''"Add Peer to Node"'\'' 53 | ' > "raw-${shard}.txt" & 54 | done 55 | wait 56 | -------------------------------------------------------------------------------- /pipeline/ping_shard.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | 16 | print_usage() { 17 | cat <<- ENDEND 18 | usage: ${progname} ${common_usage} shard [shard ...] 19 | 20 | ${common_usage_desc} 21 | 22 | arguments: 23 | shard the shard number, such as 0 24 | ENDEND 25 | } 26 | 27 | unset -v OPTIND OPTARG opt 28 | OPTIND=1 29 | while getopts ":${common_getopts_spec}" opt 30 | do 31 | ! process_common_opts "${opt}" || continue 32 | case "${opt}" in 33 | '?') usage "unrecognized option -${OPTARG}";; 34 | ':') usage "missing argument for -${OPTARG}";; 35 | *) err 70 "unhandled option -${OPTARG}";; 36 | esac 37 | done 38 | shift $((${OPTIND} - 1)) 39 | default_common_opts 40 | 41 | unset -v shard 42 | for shard 43 | do 44 | "${progdir}/run_on_shard.sh" -d "${logdir}" -Mr "${shard}" 'curl -s http://localhost:19000/ping; echo' 45 | done 46 | -------------------------------------------------------------------------------- /pipeline/pipe_log_on_shard.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | 16 | print_usage() { 17 | cat <<- ENDEND 18 | usage: ${progname} ${common_usage} cmd shard [shard ...] 19 | 20 | ${common_usage_desc} 21 | 22 | arguments: 23 | cmd shell command to execute with log fed into stdin 24 | shard the shard number, such as 0 25 | ENDEND 26 | } 27 | 28 | unset -v OPTIND OPTARG opt 29 | OPTIND=1 30 | while getopts ":${common_getopts_spec}" opt 31 | do 32 | ! process_common_opts "${opt}" || continue 33 | case "${opt}" in 34 | '?') usage "unrecognized option -${OPTARG}";; 35 | ':') usage "missing argument for -${OPTARG}";; 36 | *) err 70 "unhandled option -${OPTARG}";; 37 | esac 38 | done 39 | shift $((${OPTIND} - 1)) 40 | default_common_opts 41 | 42 | case $# in 43 | 0) usage "missing shell command";; 44 | esac 45 | 46 | unset -v cmd 47 | cmd="${1}" 48 | shift 1 49 | 50 | case $# in 51 | 0) usage "missing shard arg";; 52 | esac 53 | 54 | unset -v shard 55 | for shard 56 | do 57 | "${progdir}/run_on_shard.sh" -d "${logdir}" -MTr "${shard}" 'cat ../tmp_log/log-"${ts}"/*-"${ip}"-9000.log | ('"${cmd:-"cat"}"')' 58 | done 59 | -------------------------------------------------------------------------------- /pipeline/requirements.txt: -------------------------------------------------------------------------------- 1 | pyhmy==20.5.5 2 | pexpect==4.8.0 3 | dnspython==1.16.0 4 | pagerduty-api==0.3 5 | botocore==1.16.20 6 | boto3==1.13.20 -------------------------------------------------------------------------------- /pipeline/restart_shard.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | 16 | print_usage() { 17 | cat <<- ENDEND 18 | usage: ${progname} ${common_usage} cmd shard [shard ...] 19 | 20 | ${common_usage_desc} 21 | 22 | arguments: 23 | cmd shell command to execute with log fed into stdin 24 | shard the shard number, such as 0 25 | ENDEND 26 | } 27 | 28 | unset -v OPTIND OPTARG opt 29 | OPTIND=1 30 | while getopts ":${common_getopts_spec}" opt 31 | do 32 | ! process_common_opts "${opt}" || continue 33 | case "${opt}" in 34 | '?') usage "unrecognized option -${OPTARG}";; 35 | ':') usage "missing argument for -${OPTARG}";; 36 | *) err 70 "unhandled option -${OPTARG}";; 37 | esac 38 | done 39 | shift $((${OPTIND} - 1)) 40 | default_common_opts 41 | 42 | backup_dir="${1}" 43 | shift 1 44 | shard="${backup_dir##*/s}" 45 | shard="${shard%%-*}" 46 | 47 | pause() { 48 | unset -v junk 49 | read -r -p 'Press Enter to continue . . .' junk 50 | } 51 | 52 | echo "Shard: ${shard}" 53 | echo "Backup: ${backup_dir}" 54 | 55 | echo "Checking backup directory size" 56 | du -sh "${backup_dir}" 57 | pause 58 | 59 | echo "Restoring backup back onto nodes..." 60 | sep= 61 | for ip in `./run_on_shard.sh -d "${logdir}" -rT "${shard}" 'echo $ip'` 62 | do 63 | echo -n "${sep}${ip}" 64 | sep=", " 65 | rsync -aqHz -e "${progdir}/node_ssh.sh -d ${logdir}" "$backup_dir" "$ip:" & 66 | done 67 | echo -n "..." 68 | wait 69 | echo 70 | pause 71 | 72 | echo "Killing shard ${shard}..." 73 | ./kill_shard.sh -d "${logdir}" "${shard}" 74 | pause 75 | 76 | echo "Making sure no nodes still run in shard ${shard}..." 77 | ./run_on_shard.sh -d "${logdir}" -rS "${shard}" 'pgrep -a harmony' 78 | pause 79 | 80 | echo "Moving staged database back into place..." 81 | ./run_on_shard.sh -d "${logdir}" -r "${shard}" 'set -eu; sudo rm -rf harmony_db_*; sudo mv '"${backup_dir##*/}"'/harmony_db_* .; rmdir '"${backup_dir##*/}"'; sudo chown -Rh 0:0 harmony_db_*; du -sh harmony_db_*' 82 | pause 83 | 84 | echo "Restarting shard ${shard}..." 85 | ./go.sh -p ek-test reinit `./run_on_shard.sh -d "${logdir}" -rT "${shard}" 'echo $ip'` 86 | 87 | echo 88 | echo "All done!" 89 | -------------------------------------------------------------------------------- /pipeline/restart_watchdog.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Assumptions: 4 | # run from the pipeline directory 5 | # experiment-deploy & nodedb repos are set up at the same level 6 | # github credentials for nodedb exist for current user 7 | # ssh watchdog is correctly configured 8 | 9 | base=$(basename `realpath .`) 10 | watchdog="/usr/local/watchdog" 11 | nodedb="/usr/local/watchdog/nodedb" 12 | 13 | help() { 14 | echo "" 15 | echo "Usage: ${0} -a [action] -s [service] -u" 16 | echo -e "\t-a " 17 | echo -e "\t-s Target service to restart (default = ostn)" 18 | echo -e "\t-b Build latest Watchdog binaries" 19 | echo -e "\t-u Pull the nodedb repo on the Watchdog machine (default = false)" 20 | exit 21 | } 22 | 23 | unset OPTARG action service build update 24 | action="restart" 25 | service="ostn" 26 | build=false 27 | update=false 28 | while getopts "a:s:bu" opt 29 | do 30 | case "${opt}" in 31 | a ) action="$OPTARG" ;; 32 | s ) service="${OPTARG}" ;; 33 | b ) build=true ;; 34 | u ) update=true ;; 35 | * ) help ;; 36 | esac 37 | done 38 | 39 | # Check valid action 40 | case ${action} in 41 | start ) ;; 42 | stop ) ;; 43 | restart ) ;; 44 | * ) echo "[ERROR] Unknown action: ${action}"; exit ;; 45 | esac 46 | echo "Action: ${action}" 47 | 48 | # Check valid service 49 | case ${service} in 50 | mainnet ) ;; 51 | testnet ) ;; 52 | devnet ) ;; 53 | lrtn ) ;; 54 | ostn ) ;; 55 | pstn ) ;; 56 | stn ) ;; 57 | all ) service="*" ;; 58 | * ) echo "[ERROR] Unknown service: ${service}"; exit ;; 59 | esac 60 | echo "Service: ${service}" 61 | 62 | if [[ "${build}" == true ]]; then 63 | echo "-- Building new Watchdog binary --" 64 | sudo sh -c "cd ${watchdog}/master && git reset --hard origin/master && git clean -xdf && git pull && PATH=\$PATH:/usr/local/go/bin make" 65 | fi 66 | 67 | # Pull nodedb 68 | if [[ "${update}" == true ]]; then 69 | echo "-- Pulling new nodedb --" 70 | sudo sh -c "cd ${nodedb} && git reset --hard origin/master && git clean -xdf && git pull" > /dev/null 71 | else 72 | echo "-- Using existing nodedb --" 73 | fi 74 | 75 | sudo sh -c "cd ${nodedb} && git show --oneline -s" 76 | 77 | # Watchdog 78 | sudo systemctl ${action} harmony-watchdogd@${service}.service 79 | -------------------------------------------------------------------------------- /pipeline/rollback.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # this script is used to rollback harmony binary/script for deployment 4 | # it should be run on either mainnet or testnet devop hosts 5 | 6 | set -eu 7 | 8 | NETWORK=upgrade 9 | NUM_VER=4 10 | BUCKET=s3://pub.harmony.one/release/linux-x86_64 11 | VERSION= 12 | 13 | usage() { 14 | ME=$(basename "$0") 15 | cat<<-EOU 16 | Usage: $ME [Options] [Actions] 17 | 18 | Options: 19 | -h print this help 20 | -N network specify network type (upgrade, mainnet, lrtn) 21 | (default: $NETWORK) 22 | -v version specify the version to rollback 23 | -n num specify number of version to list 24 | (default: $NUM_VER) 25 | 26 | Actions: 27 | list list all previous version 28 | rollback rollback to the version specified in -v 29 | 30 | EOU 31 | exit 0 32 | } 33 | 34 | list_versions() { 35 | aws s3 ls "${BUCKET}/" | grep PRE | awk -F' ' ' { print $2 } ' | grep ^v | tail -n ${NUM_VER} | tr -d / 36 | } 37 | 38 | rollback_release() { 39 | if [ -z "${VERSION}" ]; then 40 | echo "Please specify the rollback version." 41 | return 42 | fi 43 | read -p "rollback \"${NETWORK}\" to \"${VERSION}\"? (y/n) " yesno 44 | case "$yesno" in 45 | y|Y) aws s3 cp "${BUCKET}/${VERSION}/static/" "${BUCKET}/${NETWORK}/static/" --recursive --acl public-read ;; 46 | *) echo bye... ;; 47 | esac 48 | } 49 | 50 | while getopts ":hN:n:v:" opt; do 51 | case "$opt" in 52 | h) usage ;; 53 | N) NETWORK="${OPTARG}" ;; 54 | n) NUM_VER="${OPTARG}" ;; 55 | v) VERSION="${OPTARG}" ;; 56 | *) usage ;; 57 | esac 58 | done 59 | 60 | shift $(( OPTIND - 1 )) 61 | 62 | ACTION=${1:-usage} 63 | 64 | case "${ACTION}" in 65 | list) list_versions ;; 66 | rollback) rollback_release ;; 67 | *) usage ;; 68 | esac 69 | 70 | # vim: set expandtab ts=2 71 | -------------------------------------------------------------------------------- /pipeline/sync_logs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | unset -v progname progdir 6 | progname="${0##*/}" 7 | case "${0}" in 8 | */*) progdir="${0%/*}";; 9 | *) progdir=".";; 10 | esac 11 | 12 | . "${progdir}/msg.sh" 13 | . "${progdir}/usage.sh" 14 | . "${progdir}/common_opts.sh" 15 | . "${progdir}/util.sh" 16 | . "${progdir}/log.sh" 17 | 18 | log_define -v sync_logs_log_level -l DEBUG sl 19 | 20 | : ${WHOAMI=`id -un`} 21 | 22 | if [ "$WHOAMI" == "ec2-user" ]; then 23 | msg_exit 33 "please set WHOAMI variable, can't use ec2-user" 24 | fi 25 | 26 | export WHOAMI 27 | 28 | unset -v default_bucket default_owner 29 | default_bucket=unique-bucket-bin 30 | default_owner="${WHOAMI}" 31 | 32 | print_usage() { 33 | cat <<- ENDEND 34 | usage: ${progname} ${common_usage} [-q] [-o owner] [-b bucket] [-f folder] 35 | 36 | ${common_usage_desc} 37 | 38 | options: 39 | -q quick mode; do not download logs or databases 40 | -o owner owner name (default: ${default_owner}) 41 | -b bucket bucket to configure into profile json (default: ${default_bucket}) 42 | -f folder folder to configure into profile json (default: same as owner) 43 | ENDEND 44 | } 45 | 46 | unset -v bucket folder owner quick 47 | quick=false 48 | 49 | unset -v OPTIND OPTARG opt 50 | OPTIND=1 51 | while getopts ":b:f:o:q${common_getopts_spec}" opt 52 | do 53 | ! process_common_opts "${opt}" || continue 54 | case "${opt}" in 55 | '?') usage "unrecognized option -${OPTARG}";; 56 | ':') usage "missing argument for -${OPTARG}";; 57 | o) owner="${OPTARG}";; 58 | b) bucket="${OPTARG}";; 59 | f) folder="${OPTARG}";; 60 | q) quick=true;; 61 | *) err 70 "unhandled option -${OPTARG}";; 62 | esac 63 | done 64 | shift $((${OPTIND} - 1)) 65 | default_common_opts 66 | 67 | : ${owner="${default_owner}"} 68 | : ${bucket="${default_bucket}"} 69 | : ${folder="${owner}"} 70 | 71 | sl_info "fetching latest timestamp from S3 log folder" 72 | unset -v latest_uri timestamp session_id 73 | latest_uri="s3://harmony-benchmark/logs/latest-${owner}-${profile}.txt" 74 | timestamp=$(aws s3 cp "${latest_uri}" -) || err 69 "cannot fetch latest timestamp" 75 | sl_debug "timestamp=$(shell_quote "${timestamp}")" 76 | session_id=$(echo "${timestamp}" | sed -n 's@^\([0-9][0-9][0-9][0-9]\)/\([0-9][0-9]\)/\([0-9][0-9]\)/\([0-9][0-9][0-9][0-9][0-9][0-9]\)$@\1\2\3.\4@p') 77 | case "${session_id}" in 78 | "") err 69 "cannot convert timestamp $(shell_quote "${timestamp}") into session ID; is it in YYYY/MM/DD/HHMMSS format?";; 79 | esac 80 | 81 | sl_info "syncing logs from S3" 82 | if ${quick} 83 | then 84 | set -- --exclude='*/tmp_log/*' --exclude='*/db-*.tgz' --exclude='*/soldier-*.log' --exclude='init/*.log' --exclude='harmony_db_*/*' 85 | else 86 | set -- 87 | fi 88 | aws s3 sync "s3://harmony-benchmark/logs/${timestamp}" "${progdir}/logs/${session_id}" "$@" 89 | sl_info "resetting log symlink" 90 | rm -f "${progdir}/logs/${profile}" 91 | ln -sf "${session_id}" "${progdir}/logs/${profile}" 92 | sl_info "finished" 93 | -------------------------------------------------------------------------------- /pipeline/tac.sh: -------------------------------------------------------------------------------- 1 | . "${progdir}/msg.sh" 2 | 3 | unset -v tac 4 | 5 | for tac in $(which -a tac) 'tail -r' 6 | do 7 | case $( 8 | (echo omg; echo wtf; echo bbq) | 9 | ${tac} 2> /dev/null | 10 | tr -d '\n' 11 | ) in 12 | bbqwtfomg) 13 | msg "found working tac: ${tac}" 14 | break 15 | ;; 16 | esac 17 | tac= 18 | done 19 | 20 | case "${tac}" in 21 | "") err 69 "cannot find working tac";; 22 | esac 23 | -------------------------------------------------------------------------------- /pipeline/tmpdir.sh: -------------------------------------------------------------------------------- 1 | . "${progdir}/trap.sh" 2 | 3 | unset -v tmpdir 4 | tmpdir= 5 | 6 | tmpdir_cleanup() { 7 | case "${tmpdir}" in 8 | ?*) 9 | rm -rf "${tmpdir}" 10 | tmpdir= 11 | ;; 12 | esac 13 | } 14 | 15 | trap_setup tmpdir_cleanup EXIT HUP INT TERM 16 | 17 | tmpdir=$(mktemp -d) 18 | -------------------------------------------------------------------------------- /pipeline/trap.sh: -------------------------------------------------------------------------------- 1 | . "${progdir}/util.sh" 2 | . "${progdir}/log.sh" 3 | 4 | log_define -v TRAP_LOG_LEVEL trap 5 | 6 | trap_body() { 7 | local func sig old_trap 8 | func="${1}" 9 | sig="${2}" 10 | shift 2 11 | trap_debug "trap_body: ${sig} caught, running ${func}" >&2 12 | "${func}" 13 | eval "old_trap=\"\${${func}_old_trap_${sig}-\"-\"}\"" 14 | trap_debug "trap_body: old trap is $(shell_quote "${old_trap}")" 15 | case "${sig}" in 16 | EXIT) 17 | case "${old_trap}" in 18 | -) 19 | ;; 20 | *) 21 | eval "${old_trap}" 22 | ;; 23 | esac 24 | ;; 25 | *) 26 | trap -- "${old_trap}" "${sig}" 27 | kill "-${sig}" $$ 28 | ;; 29 | esac 30 | } 31 | 32 | trap_save() { 33 | local func sig 34 | func="${1}" 35 | sig="${2}" 36 | shift 2 37 | eval "set -- $(trap -p "${sig}")" 38 | eval "${func}_old_trap_${sig}=\"\${3-\"-\"}\"" 39 | } 40 | 41 | trap_setup() { 42 | local func sig 43 | func="${1}" 44 | shift 1 45 | trap_debug "setting up trap function ${func} for: $*" 46 | for sig 47 | do 48 | trap_save "${func}" "${sig}" 49 | trap "trap_body $(shell_quote "${func}" "${sig}")" "${sig}" 50 | done 51 | } 52 | -------------------------------------------------------------------------------- /pipeline/update_nodedb.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Assumptions: 4 | # run from the pipeline directory 5 | # experiment-deploy & nodedb repos are set up at the same level 6 | # github credentials for nodedb exist for current user 7 | # ssh watchdog is correctly configured 8 | 9 | base=$(basename `realpath .`) 10 | nodedb=$(realpath ../../nodedb) 11 | logs=$(realpath logs) 12 | watchdog="/home/jl/watchdog/nodedb" 13 | 14 | help() { 15 | echo "" 16 | echo "Usage: ${0} -w [whoami] -t [target nodedb directory] -u -p -r" 17 | echo -e "\t-w WHOAMI (default = OS)" 18 | echo -e "\t-t Target directory in nodedb (default = ostn)" 19 | echo -e "\t-u Update the nodedb repo, if update fails, will try to copy files (default = false)" 20 | echo -e "\t-c Copy shard?.txt files from /logs to nodedb (default = false)" 21 | echo -e "\t-p Push the nodedb update (default = false)" 22 | echo -e "\t-r Restart Watchdog (default = false)" 23 | echo -e "\t-y Force yes (default = false)" 24 | exit 25 | } 26 | 27 | unset OPTARG whoami target update copy restart push yes 28 | whoami="OS" 29 | target="ostn" 30 | update=false 31 | copy=false 32 | push=false 33 | restart=false 34 | yes=false 35 | while getopts "t:w:ucpry" opt 36 | do 37 | case "${opt}" in 38 | w ) whoami="${OPTARG}" ;; 39 | t ) target="${OPTARG}" ;; 40 | u ) update=true ;; 41 | c ) copy=true ;; 42 | p ) push=true ;; 43 | r ) restart=true ;; 44 | y ) yes=true ;; 45 | * ) help ;; 46 | esac 47 | done 48 | 49 | # Sanity check all the assumptions 50 | if [[ "${base}" != "pipeline" ]]; then 51 | echo "[ERROR] Only run this script from experiment-deploy/pipeline" 52 | exit 53 | fi 54 | 55 | if [[ ! -d ${nodedb} ]]; then 56 | echo "[ERROR] Nodedb path does not exist" 57 | exit 58 | fi 59 | 60 | if [[ ! -d ${nodedb}/${target} ]]; then 61 | echo "[ERROR] Target directory must exist in Nodedb" 62 | exit 63 | fi 64 | 65 | # Only one of update or copy is true 66 | if [[ "${copy}" == true ]] && [[ "${update}" == true ]]; then 67 | echo "[WARNING] Cannot use -c & -u at the same time" 68 | echo "[WARNING] Running using -u" 69 | copy=false 70 | fi 71 | 72 | # Update repo & reset 73 | if [[ "${push}" == true ]]; then 74 | pushd ${nodedb} 75 | git reset --hard origin/master 76 | if git remote -v | grep -q nodedb; then 77 | git clean -xdf 78 | git pull 79 | else 80 | echo "[ERROR] Not in nodedb directory" 81 | popd 82 | exit 83 | fi 84 | popd 85 | fi 86 | 87 | if [[ "${update}" == true ]]; then 88 | echo "-- Updating nodedb for ${whoami} --" 89 | if [[ "${whoami}" == "s3" ]]; then 90 | # TODO: Mainnet nodedb update with nodedb.sh 91 | echo "[ERROR] Mainnet nodedb update not implemented" 92 | else 93 | # Run testnet update 94 | pushd ${nodedb} 95 | python3 -u testnet_nodedb.py --profile ${whoami} --network ${target} 96 | status=$? 97 | popd 98 | fi 99 | 100 | if [[ "${status}" == "50" ]]; then 101 | echo "[ERROR] Target directory must exist in nodedb repo" 102 | copy=true 103 | fi 104 | 105 | if [[ "${status}" == "100" ]]; then 106 | echo "[ERROR] Failures detected sorting IP lists" 107 | copy=true 108 | fi 109 | else 110 | echo "-- Skipping nodedb update --" 111 | fi 112 | 113 | if [[ "${copy}" == true ]]; then 114 | echo "-- Copying files to nodedb for ${whoami} --" 115 | if [[ ! -d ${logs}/${whoami,,} ]]; then 116 | echo "[ERROR] Log path does not exist" 117 | exit 118 | fi 119 | # Assuming deploy log directory link is lowercase of WHOAMI 120 | cp ${logs}/${whoami,,}/shard?.txt ${nodedb}/${target} 121 | cp -r ${logs}/${whoami,,}/init ${nodedb}/${target} 122 | fi 123 | 124 | # Push to master on nodedb 125 | if [[ "${push}" == true ]]; then 126 | pushd ${nodedb} 127 | git add ${target}/* 128 | if [[ -z $(git status --porcelain) ]]; then 129 | echo "[INFO] No changes detected in nodedb, skipping commit & push" 130 | else 131 | git diff --cached --stat 132 | if [[ "${yes}" == true ]]; then 133 | echo "-- Pushing nodedb update --" 134 | else 135 | read -rp "Push nodedb update? [Y/N]" reply 136 | echo 137 | if [[ "${reply}" != "Y" ]]; then 138 | exit 139 | popd 140 | fi 141 | fi 142 | git commit -m "[update_nodedb] Updating ip lists & init files for ${target}" 143 | git push -f 144 | fi 145 | popd 146 | fi 147 | 148 | # Restart Watchdog 149 | if [[ "${restart}" == true ]]; then 150 | ./restart_watchdog.sh -a restart -s ${target} -u 151 | fi 152 | -------------------------------------------------------------------------------- /pipeline/usage.sh: -------------------------------------------------------------------------------- 1 | . "${progdir}/msg.sh" 2 | 3 | usage() { 4 | msg "$@" 5 | print_usage >&2 6 | exit 64 # EX_USAGE 7 | } 8 | -------------------------------------------------------------------------------- /pipeline/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harmony-one/experiment-deploy/ec34aecb18457755556b8faa48557475e578ff89/pipeline/utils/__init__.py -------------------------------------------------------------------------------- /pipeline/utils/configuration.txt: -------------------------------------------------------------------------------- 1 | 1,us-east-1,virginia-key-benchmark,virginia-security-group,virginia,ami-b70554c8,sg-04d0b62ee08ce8800 2 | 2,us-east-2,ohio-key-benchmark,ohio-security-group,ohio,ami-8c122be9,sg-0789078f1c76defbe 3 | 3,us-west-1,california-key-benchmark,california-security-group,california,ami-e0ba5c83,sg-0a66ccb6ab9161a14 4 | 4,us-west-2,oregon-key-benchmark,oregon-security-group,oregon,ami-a9d09ed1,sg-020cb5729fa212d43 5 | 5,ap-northeast-1,tokyo-key-benchmark,tokyo-security-group,tokyo,ami-e99f4896,sg-009aeb97f675c1ad5 6 | 6,ap-southeast-1,singapore-key-benchmark,singapore-security-group,singapore,ami-05868579,sg-05f9b60044a19dfb2 7 | 7,eu-central-1,frankfurt-key-benchmark,frankfurt-security-group,frankfurt,ami-7c4f7097,sg-0bb06fcd8b25b5910 8 | 8,eu-west-1,ireland-key-benchmark,ireland-security-group,ireland,ami-466768ac,sg-0aa8954acb79fdb58 -------------------------------------------------------------------------------- /pipeline/utils/launch_template.py: -------------------------------------------------------------------------------- 1 | import utils 2 | 3 | 4 | def get_launch_template_name(region_number): 5 | return 'benchmark-' + utils.CONFIG[region_number][utils.REGION_NAME] 6 | 7 | 8 | def create(ec2_client, region_number): 9 | return ec2_client.create_launch_template( 10 | # DryRun=True, 11 | LaunchTemplateName=get_launch_template_name(region_number), 12 | LaunchTemplateData={ 13 | 'IamInstanceProfile': { 14 | 'Name': utils.IAM_INSTANCE_PROFILE 15 | }, 16 | 'ImageId': utils.CONFIG[region_number][utils.REGION_AMI], 17 | # 'InstanceType': instance_type, 18 | 'KeyName': utils.CONFIG[region_number][utils.REGION_KEY], 19 | 'UserData': utils.USER_DATA_BASE64, 20 | 'SecurityGroupIds': [ 21 | utils.CONFIG[region_number][utils.REGION_SECURITY_GROUP_ID] 22 | ], 23 | # 'InstanceInitiatedShutdownBehavior': 'stop', 24 | 'TagSpecifications': [ 25 | { 26 | 'ResourceType': 'instance', 27 | 'Tags': [ 28 | { 29 | 'Key': 'LaunchTemplate', 30 | 'Value': 'Yes' 31 | } 32 | ] 33 | } 34 | ], 35 | # 'InstanceMarketOptions': { 36 | # 'MarketType': 'spot', 37 | # 'SpotOptions': { 38 | # 'MaxPrice': 'string', 39 | # 'SpotInstanceType': 'one-time'|'persistent', 40 | # 'BlockDurationMinutes': 123, 41 | # 'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate' 42 | # } 43 | # }, 44 | } 45 | ) 46 | -------------------------------------------------------------------------------- /pipeline/utils/mylogger.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | logging.basicConfig(level=logging.INFO, 4 | format='%(threadName)s %(asctime)s - %(name)s - %(levelname)s - %(message)s') 5 | 6 | def getLogger(file): 7 | LOGGER = logging.getLogger(file) 8 | LOGGER.setLevel(logging.INFO) 9 | return LOGGER -------------------------------------------------------------------------------- /pipeline/utils/scripting.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import os 3 | import sys 4 | import logging 5 | import readline 6 | from threading import Lock 7 | 8 | from pyhmy.util import ( 9 | Typgpy 10 | ) 11 | 12 | ipv4_regex = r"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" 13 | _interaction_lock = Lock() 14 | 15 | 16 | def setup_logger(log_file, logger_name, do_print=True, verbose=True): 17 | """ 18 | Setup the logger for the snapshot package and returns the logger. 19 | """ 20 | os.makedirs(os.path.dirname(log_file), exist_ok=True) 21 | logger = logging.getLogger(logger_name) 22 | file_handler = logging.FileHandler(log_file) 23 | file_handler.setFormatter( 24 | logging.Formatter(f"(%(threadName)s)[%(asctime)s] %(message)s")) 25 | logger.addHandler(file_handler) 26 | if do_print: 27 | logger.addHandler(logging.StreamHandler(sys.stdout)) 28 | logger.setLevel(logging.DEBUG) 29 | logger.debug("===== NEW LOG =====") 30 | if verbose: 31 | print(f"Logs saved to: {log_file}") 32 | return logger 33 | 34 | 35 | def interact(prompt, selection_list, sort=True): 36 | """ 37 | Prompt the user with `prompt` and an enumerated selection from a possibly sorted `selection_list`. 38 | Take in an integer, n, such that 0 <= n < len(`selection_list`). 39 | If a `log` is provided, log the interaction and all errors at the info and error level respectively. 40 | 41 | Keeps prompting user for input if input is invalid. 42 | Prints user interaction before returning. 43 | 44 | Note that all new lines from `prompt` and `selection_list` will be removed. 45 | 46 | Returns n and corresponding selection string from `selection_list`. 47 | """ 48 | _interaction_lock.acquire() 49 | if not selection_list: 50 | return 51 | input_prompt = f"{Typgpy.BOLD}Select option (number):{Typgpy.ENDC}\n> " 52 | 53 | prompt, selection_list = prompt.replace("\n", ""), [e.replace("\n", "") for e in selection_list] 54 | if sort: 55 | selection_list = sorted(selection_list, reverse=True) 56 | prompt_new_line_count = sum(1 for el in selection_list if el) + 3 # 1 for given prompt, 2 for input prompt 57 | if prompt: 58 | prompt_new_line_count += 1 59 | printed_new_line_count = 0 60 | print() 61 | try: 62 | while True: 63 | if prompt: 64 | print(prompt) 65 | for i, selection in enumerate(selection_list): 66 | print(f"{Typgpy.BOLD}[{i}]{Typgpy.ENDC}\t{selection}") 67 | user_input = input(input_prompt) 68 | printed_new_line_count += prompt_new_line_count 69 | try: 70 | n = int(user_input) 71 | if n >= len(selection_list): 72 | continue 73 | selection_report = f"{prompt} {Typgpy.BOLD}[{n}]{Typgpy.ENDC} {selection_list[n]}".strip() 74 | for i in range(printed_new_line_count): 75 | sys.stdout.write("\033[K") 76 | if i + 1 < printed_new_line_count: 77 | sys.stdout.write("\033[F") 78 | print(selection_report) 79 | return selection_list[n] 80 | except ValueError: 81 | pass 82 | finally: 83 | _interaction_lock.release() 84 | 85 | 86 | def input_prefill(prompt, prefill=''): 87 | """ 88 | Read an input with some prefilled data. 89 | 90 | Note that this only works on Unix based systems. 91 | """ 92 | readline.set_startup_hook(lambda: readline.insert_text(prefill)) 93 | try: 94 | return input(prompt) 95 | finally: 96 | readline.set_startup_hook() 97 | 98 | 99 | def aws_s3_ls(path): 100 | """ 101 | AWS command to list contents of an s3 bucket anonymously. 102 | Assumes AWS CLI is setup on machine. 103 | 104 | Raises subprocess.CalledProcessError if aws command fails. 105 | """ 106 | cmd = ['aws', 's3', 'ls', path] 107 | return [n.replace('PRE', '').replace("/", "").strip() for n in 108 | subprocess.check_output(cmd, env=os.environ, timeout=60).decode().split("\n") if "PRE" in n] 109 | -------------------------------------------------------------------------------- /pipeline/utils/utils_test.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from utils import generate_distribution_config 4 | 5 | class TestCreateAndDeploy(unittest.TestCase): 6 | 7 | def test_generate_config_file(self): 8 | ips = ["102.000.000.1", "102.000.000.2", "102.000.000.3", "102.000.000.4", "102.000.000.5", "102.000.000.6"] 9 | generate_distribution_config(2, 2, ips, "config_test.txt") 10 | with open("config_test.txt", "r") as fin: 11 | lines = fin.readlines() 12 | collection = {} 13 | collection['ip'] = [] 14 | collection['client'] = {} 15 | leader_count, validator_count, client_count = 0, 0, 0 16 | for line in lines: 17 | strs = line.split(" ") 18 | assert(not strs[0] in collection['ip']) 19 | collection['ip'].append(strs[0]) 20 | if strs[2] == "client": 21 | client_count = client_count + 1 22 | elif strs[2] == "leader": 23 | leader_count = leader_count + 1 24 | elif strs[2] == "validator": 25 | validator_count = validator_count + 1 26 | assert(validator_count == 2) 27 | assert(leader_count == 2) 28 | assert(client_count == 2) 29 | 30 | if __name__ == '__main__': 31 | unittest.main() -------------------------------------------------------------------------------- /testnet/stn/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SHARD=2 4 | SLOT=10 5 | KEY=1 6 | NETWORK=testnet 7 | 8 | HOSTFILE=$(pwd)/stn.json 9 | KEYPATH=~/tmp/blskeys-tn 10 | 11 | DEPLOYDIR=~/go/src/github.com/harmony-one/experiment-deploy 12 | 13 | ansible --list-hosts p2p | tail -n +2 | tr -d " " | jq -R -s -c 'split("\n")[:-1]' > $HOSTFILE 14 | 15 | $DEPLOYDIR/bin/genbls \ 16 | -host $HOSTFILE \ 17 | -network $NETWORK \ 18 | -shard $SHARD \ 19 | -slot $SLOT \ 20 | -key $KEY \ 21 | -pass ~/tmp/bls.nopass \ 22 | -keypath $KEYPATH 23 | 24 | rsync -av files $DEPLOYDIR/ansible/playbooks/roles/node 25 | 26 | for (( s=0; s<$SHARD; s++ )); do 27 | python3 $DEPLOYDIR/pipeline/r53update.py stn $s $(ansible --list-hosts p2ps${s} | tail -n +2 | tr -d " " | tr "\n" " ") 28 | done 29 | 30 | pushd ~/go/src/github.com/harmony-one/harmony 31 | export WHOAMI=stressnet 32 | ./scripts/go_executable_build.sh 33 | ./scripts/go_executable_build.sh release 34 | popd 35 | 36 | pushd $DEPLOYDIR/ansible 37 | 38 | # setup sysctl 39 | ansible-playbook playbooks/sysctl-setup.yml -e 'inventory=p2p user=hmy' 40 | 41 | # install node_exporter 42 | ansible-playbook playbooks/install-node-exporter.yml -e 'inventory=p2p user=hmy' 43 | 44 | # install harmony node 45 | ansible-playbook playbooks/install-node.yml -e 'inventory=p2p network=stn user=hmy' --vault-password-file ${DEPLOYDIR}/ansible/.vaultpass-lc 46 | 47 | # install explorer node 48 | ansible-playbook playbooks/install-node.yml -e 'inventory=p2pexp user=ec2-user network=stressnet' 49 | 50 | # do upgrade 51 | # ansible-playbook playbooks/upgrade-node.yml -e 'inventory=p2p upgrade=stressnet user=hmy' 52 | 53 | popd 54 | -------------------------------------------------------------------------------- /tools/.gitignore: -------------------------------------------------------------------------------- 1 | accounts.txt 2 | wallet 3 | *.log 4 | -------------------------------------------------------------------------------- /tools/.hmy/keystore.beta/one1shzkj8tty2wu230wsjc7lp9xqkwhch2ea7sjhc.key: -------------------------------------------------------------------------------- 1 | {"address":"85c5691d6b229dc545ee84b1ef84a6059d7c5d59","crypto":{"cipher":"aes-128-ctr","ciphertext":"bd2acfda6339c8e109a793e77ad6316398d18af29a5140bba3a2b2dec395ccc0","cipherparams":{"iv":"13c4781fd82e048c5d0cf1894657b705"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"5f9cb37fa8831699e3cab965784df58ae94e7e65780411af46fd204bcdf45d40"},"mac":"131d35ebe3b8ca03917a48ddb0fb7683c675ddddc48603af0dd323edad7cf4c8"},"id":"6611ad3c-e531-4efc-a10f-6793d2f885f0","version":3} -------------------------------------------------------------------------------- /tools/.hmy/keystore.beta/one1vjywuur8ckddmc4dsyx6qdgf590eu07ag9fg4a.key: -------------------------------------------------------------------------------- 1 | {"address":"6488ee7067c59adde2ad810da03509a15f9e3fdd","crypto":{"cipher":"aes-128-ctr","ciphertext":"a372160b102aaa5ee5f8a6a4441b78c19fb359b9f9cffa4ae5dd719f84a429b0","cipherparams":{"iv":"1a91fb7f3297644a9773887570086b69"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"a2c79945f1c18d3f3951cac3fd6de399c35509f09ce93e28eb5add4da5869370"},"mac":"cc25e1aae3834fd0a2cf15d83e69b50a42b6c8500443c68a752407f915e86eaf"},"id":"13c56630-fb10-487c-9543-3ac060bb8a83","version":3} -------------------------------------------------------------------------------- /tools/.hmy/keystore.beta/one1wh4p0kuc7unxez2z8f82zfnhsg4ty6dupqyjt2.key: -------------------------------------------------------------------------------- 1 | {"address":"75ea17db98f7266c89423a4ea12677822ab269bc","crypto":{"cipher":"aes-128-ctr","ciphertext":"32e9fe4252b1249bc9fa3b572dc11a9ac1e987a01b2c7290dc30c7d9236bcb55","cipherparams":{"iv":"f8c229a014ebd067894b79229319260f"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"3c8df20d3ebf026ee9f243f98c1f8d64f0835df1637cde1963836ca00ecd823e"},"mac":"dbd6b99b3c46139b7d6723bef117466de2a94d9876c5a9abef712327f34867cc"},"id":"c179a1a4-bfeb-43f6-b4e9-2033fab2eec0","version":3} -------------------------------------------------------------------------------- /tools/.hmy/keystore.beta/one1yc06ghr2p8xnl2380kpfayweguuhxdtupkhqzw.key: -------------------------------------------------------------------------------- 1 | {"address":"261fa45c6a09cd3faa277d829e91d9473973357c","crypto":{"cipher":"aes-128-ctr","ciphertext":"41a2d708c251b457208ee22c0be124f7414e1774906430cb7704104a341854fd","cipherparams":{"iv":"0351a57d7e4db65f1275f2fbb55b967f"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"44397f67bf3c725df23764faeb62c8374e1ffbc902f4bbaf03cda5ebecfe1fa3"},"mac":"e4cb3ace79f1d001b0a9794a96340a201e06645c30844564cd4d4aa2b213dbb5"},"id":"119472f6-08c2-4f50-bfcd-5802cd6db32b","version":3} -------------------------------------------------------------------------------- /tools/.hmy/keystore.newacc/one13nttw7ucw23fwnanj04tv26uj5xpvha4jazeum.key: -------------------------------------------------------------------------------- 1 | {"address":"8cd6b77b9872a2974fb393eab62b5c950c165fb5","crypto":{"cipher":"aes-128-ctr","ciphertext":"c2103c39c3c72cded0f93295616dfba680f742c12d36f1bd8e777cbd39440376","cipherparams":{"iv":"efef50c2bb13a1a63f4f7d104cfa7506"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"98ccd08318b2a75a383cb680ced496a45e8af6eca8d010418a4e29e7900e870a"},"mac":"11ba6c83cae9bdea55f9701e6a382d5192b5a4dd33dbf40b072257676e2023ad"},"id":"4eec7290-dac6-4dde-b644-7b696edc142c","version":3} -------------------------------------------------------------------------------- /tools/.hmy/keystore.newacc/one17nhypqtfk88v6suutntjcy84lwrdyckdpz5sz0.key: -------------------------------------------------------------------------------- 1 | {"address":"f4ee408169b1cecd439c5cd72c10f5fb86d262cd","crypto":{"cipher":"aes-128-ctr","ciphertext":"2a927899b38ff59efb7ede9315c1d6a34c67f122c1e77ee99708ecee192d7562","cipherparams":{"iv":"982f6bc8d3c5cee5f9f301a01c1623dc"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"9702e189ea6262bc0a310675f18a3da5099cba1e8732e0be9cb2613119676c11"},"mac":"1b9be37c2b812cdcee545d4ecb3144d63177b05d2b710719cdbc1fa92bf76908"},"id":"29807425-ee97-415f-bf25-859907ab83d9","version":3} -------------------------------------------------------------------------------- /tools/.hmy/keystore.newacc/one1kuyxefj99lhc3yn3nmn6m48jhthzul45r6xpha.key: -------------------------------------------------------------------------------- 1 | {"address":"b7086ca6452fef8892719ee7add4f2baee2e7eb4","crypto":{"cipher":"aes-128-ctr","ciphertext":"19d3286aa08d2ef6fa19b5b7a974dcc11cc623682479577ae9bb6f590cabee5f","cipherparams":{"iv":"f2c5187463bb365fd5c397acdf53c7c9"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"404dc10bd96959a626e384832b8e4dd6755552690715be187b24a1fe5695f6da"},"mac":"b1b4faa9d6776d016e4e0aa03d1e60e733306d173dc560e4dfb50739e7c39530"},"id":"62b902d5-a85a-495b-bc13-3fc68224e049","version":3} -------------------------------------------------------------------------------- /tools/.hmy/keystore.newacc/one1mqcy64xeaeyrxp2gyq8a9tjreqzg9xyvwhqllr.key: -------------------------------------------------------------------------------- 1 | {"address":"d8304d54d9ee48330548200fd2ae43c80482988c","crypto":{"cipher":"aes-128-ctr","ciphertext":"aef4c80413c243c32820ee45be1edb2a6efba09f30643383a96e75e8a035fbf6","cipherparams":{"iv":"0fb3ebc71817b33e6e73944753ea5d40"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"ce798df1026643c9038f76c1dac15217271e1f03af83efeb27c3853a0c65ef9a"},"mac":"1910bd6a18a6d92878bef3f587681e0908736bea205164ca6a5e754c06a71758"},"id":"6bc39f93-f66a-442d-a0c4-8553e7948065","version":3} -------------------------------------------------------------------------------- /tools/.hmy/keystore.newacc/one1rq5a7j2g7aa355ywm2zzjm2hew7f43hg2ym89y.key: -------------------------------------------------------------------------------- 1 | {"address":"1829df4948f77b1a508eda84296d57cbbc9ac6e8","crypto":{"cipher":"aes-128-ctr","ciphertext":"2cc4ae525a27abfd3e34833b785f5498da52a490eec963976d2cea40abe19f2a","cipherparams":{"iv":"0610da7e9e5a836e55a41e171255ccc8"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"84d5f470101d5edaa33cafd7d406b7727fc112209785217a7a2443696a130ab9"},"mac":"10ad602cfdf96b40df86e3f6316604a0ddc1b357ed451c0c9232642ae46c01c0"},"id":"24c2e8df-d7b6-4258-8b52-31fd0731cc73","version":3} -------------------------------------------------------------------------------- /tools/.hmy/wallet.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | bootnode = /ip4/100.26.90.187/tcp/9874/p2p/Qmdfjtk6hPoyrH1zVD9PEH4zfWLo38dP2mDvvKXfh3tnEv 3 | bootnode = /ip4/54.213.43.194/tcp/9874/p2p/QmZJJx6AdaoEkGLrYG4JeLCKeCKDjnFz2wfHNHxAqFSGA9 4 | bootnode = /ip4/13.113.101.219/tcp/12019/p2p/QmQayinFSgMMw5cSpDUiD9pQ2WeP6WNmGxpZ6ou3mdVFJX 5 | bootnode = /ip4/99.81.170.167/tcp/12019/p2p/QmRVbTpEYup8dSaURZfF6ByrMTSKa4UyUzJhSjahFzRqNj 6 | shards = 4 7 | 8 | [default.shard0.rpc] 9 | rpc = l0.t.hmny.io:14555 10 | rpc = s0.t.hmny.io:14555 11 | 12 | [default.shard1.rpc] 13 | rpc = l1.t.hmny.io:14555 14 | rpc = s1.t.hmny.io:14555 15 | 16 | [default.shard2.rpc] 17 | rpc = l2.t.hmny.io:14555 18 | rpc = s2.t.hmny.io:14555 19 | 20 | [default.shard3.rpc] 21 | rpc = l3.t.hmny.io:14555 22 | rpc = s3.t.hmny.io:14555 23 | 24 | [local] 25 | bootnode = /ip4/127.0.0.1/tcp/19876/p2p/Qmc1V6W7BwX8Ugb42Ti8RnXF1rY5PF7nnZ6bKBryCgi6cv 26 | shards = 2 27 | 28 | [local.shard0.rpc] 29 | rpc = 127.0.0.1:14555 30 | rpc = 127.0.0.1:14557 31 | rpc = 127.0.0.1:14559 32 | 33 | [local.shard1.rpc] 34 | rpc = 127.0.0.1:14556 35 | rpc = 127.0.0.1:14558 36 | rpc = 127.0.0.1:14560 37 | 38 | [beta] 39 | bootnode = /ip4/54.213.43.194/tcp/9868/p2p/QmZJJx6AdaoEkGLrYG4JeLCKeCKDjnFz2wfHNHxAqFSGA9 40 | bootnode = /ip4/100.26.90.187/tcp/9868/p2p/Qmdfjtk6hPoyrH1zVD9PEH4zfWLo38dP2mDvvKXfh3tnEv 41 | bootnode = /ip4/13.113.101.219/tcp/12018/p2p/QmQayinFSgMMw5cSpDUiD9pQ2WeP6WNmGxpZ6ou3mdVFJX 42 | shards = 2 43 | 44 | [beta.shard0.rpc] 45 | rpc = l0.b.hmny.io:14555 46 | rpc = s0.b.hmny.io:14555 47 | 48 | [beta.shard1.rpc] 49 | rpc = l1.b.hmny.io:14555 50 | rpc = s1.b.hmny.io:14555 51 | 52 | [pangaea] 53 | bootnode = /ip4/100.26.90.187/tcp/9867/p2p/Qmdfjtk6hPoyrH1zVD9PEH4zfWLo38dP2mDvvKXfh3tnEv 54 | bootnode = /ip4/54.213.43.194/tcp/9867/p2p/QmZJJx6AdaoEkGLrYG4JeLCKeCKDjnFz2wfHNHxAqFSGA9 55 | bootnode = /ip4/13.113.101.219/tcp/9867/p2p/QmQayinFSgMMw5cSpDUiD9pQ2WeP6WNmGxpZ6ou3mdVFJX 56 | bootnode = /ip4/99.81.170.167/tcp/9867/p2p/QmRVbTpEYup8dSaURZfF6ByrMTSKa4UyUzJhSjahFzRqNj 57 | shards = 4 58 | 59 | [pangaea.shard0.rpc] 60 | rpc = l0.p.hmny.io:14555 61 | rpc = s0.p.hmny.io:14555 62 | 63 | [pangaea.shard1.rpc] 64 | rpc = l1.p.hmny.io:14555 65 | rpc = s1.p.hmny.io:14555 66 | 67 | [pangaea.shard2.rpc] 68 | rpc = l2.p.hmny.io:14555 69 | rpc = s2.p.hmny.io:14555 70 | 71 | [pangaea.shard3.rpc] 72 | rpc = l3.p.hmny.io:14555 73 | rpc = s3.p.hmny.io:14555 74 | 75 | [cm] 76 | bootnode = /ip4/54.213.43.194/tcp/9877/p2p/QmZJJx6AdaoEkGLrYG4JeLCKeCKDjnFz2wfHNHxAqFSGA9 77 | bootnode = /ip4/100.26.90.187/tcp/9877/p2p/Qmdfjtk6hPoyrH1zVD9PEH4zfWLo38dP2mDvvKXfh3tnEv 78 | shards = 2 79 | 80 | [cm.shard0.rpc] 81 | rpc = l0.cm.hmny.io:14555 82 | rpc = s0.cm.hmny.io:14555 83 | 84 | [cm.shard1.rpc] 85 | rpc = l1.cm.hmny.io:14555 86 | rpc = s1.cm.hmny.io:14555 87 | 88 | -------------------------------------------------------------------------------- /tools/Makefile: -------------------------------------------------------------------------------- 1 | PUBBUCKET:=s3://haochen-harmony-pub/pub 2 | SHELL:=/usr/bin/bash 3 | 4 | systemd_release: harmony.service.template enable-systemd-service.sh 5 | aws s3 cp enable-systemd-service.sh $(PUBBUCKET)/systemd/install.sh --acl public-read 6 | aws s3 cp harmony.service.template $(PUBBUCKET)/systemd/harmony.service.template --acl public-read 7 | 8 | exporter_release: install-node_exporter.sh 9 | aws s3 cp install-node_exporter.sh $(PUBBUCKET)/node_exporter/install.sh --acl public-read 10 | 11 | snapshot_release: install-db-snapshot.sh 12 | aws s3 cp install-db-snapshot.sh $(PUBBUCKET)/db_snapshot/install.sh --acl public-read 13 | aws s3 cp mainnet.snapshot.json $(PUBBUCKET)/db_snapshot/default.json --acl public-read 14 | aws s3 cp test.only.json $(PUBBUCKET)/db_snapshot/test.only.json --acl public-read 15 | (pushd snapshots; ./upload.sh) 16 | 17 | lsof_release: check_lsof.sh 18 | aws s3 cp check_lsof.sh $(PUBBUCKET)/check_lsof/install.sh --acl public-read 19 | 20 | removekey_release: remove_blskey.sh 21 | aws s3 cp remove_blskey.sh $(PUBBUCKET)/keyclean/install.sh --acl public-read 22 | 23 | PHONY: systemd_release exporter_release snapshot_release lsof_release removekey_release 24 | -------------------------------------------------------------------------------- /tools/check_lsof.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script is used to check the open files on the node 4 | # 5 | # [Release] 6 | # make lsof_release 7 | # 8 | # [Usage] 9 | # bash <(curl -sSL https://haochen-harmony-pub.s3.amazonaws.com/pub/check_lsof/install.sh) 10 | 11 | usage() { 12 | cat <<-EOU 13 | bash <(curl -sSL https://haochen-harmony-pub.s3.amazonaws.com/pub/check_lsof/install.sh) 14 | 15 | EOU 16 | exit 1 17 | } 18 | 19 | case "$1" in 20 | "-h"|"-H"|"-?"|"--help") 21 | usage;; 22 | esac 23 | 24 | NOW=$(date +%F.%T) 25 | lsof_log="latest/lsof.${NOW}.log" 26 | p2p_log="latest/p2p.${NOW}.log" 27 | syncing_log="latest/syncing.${NOW}.log" 28 | 29 | sudo lsof -np "$(pgrep harmony)" > "${lsof_log}" 30 | 31 | grep cslistener "${lsof_log}" | awk -F'[:>]' ' { print $3 }' | sort -u > "${p2p_log}" 32 | grep x11 "${lsof_log}" | awk -F'[:>]' ' { print $3 }' | sort -u > "${syncing_log}" 33 | 34 | sleep 1 35 | sync 36 | 37 | /usr/bin/wc -l latest/{lsof,p2p,syncing}.${NOW}.log 38 | 39 | rm -f latest/{lsof,p2p,syncing}.${NOW}.log 40 | -------------------------------------------------------------------------------- /tools/empty.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harmony-one/experiment-deploy/ec34aecb18457755556b8faa48557475e578ff89/tools/empty.txt -------------------------------------------------------------------------------- /tools/harmony.service.template: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=harmony service 3 | After=network.target 4 | 5 | [Service] 6 | Type=simple 7 | Restart=always 8 | RestartSec=1 9 | User=%%USER%% 10 | WorkingDirectory=%%HOME%% 11 | ExecStart=%%HOME%%/node.sh -1 -S -P -M -D -N %%NETWORK%% -p %%HOME%%/%%BLSPASS%% -T %%NODETYPE%% %%EXTRA%% 12 | StandardError=syslog 13 | SyslogIdentifier=harmony 14 | StartLimitInterval=0 15 | LimitNOFILE=65536 16 | LimitNPROC=65536 17 | 18 | [Install] 19 | WantedBy=multi-user.target 20 | -------------------------------------------------------------------------------- /tools/install-node.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script installs a harmony node (for internally ran nodes). 4 | # The following assumptions are made: 5 | # 1) BLS keys are in the path set by local var in the `launch_validator` function of launch-node.sh 6 | # 2) BLS passphrase for all keys are the same & passphrases are taken as a plain text by the file 7 | # at a path set by local var in the `launch_validator` function of launch-node.sh 8 | # 3) Files controlled by the daemon are in the home directory for the user of the harmony node daemon. 9 | # 4) This install script is ran as the user for the harmony node daemon. 10 | # 11 | # Usage: 12 | # bash <(curl -s https://raw.githubusercontent.com/harmony-one/experiment-deploy/master/tools/install-node.sh) 13 | # 14 | # Example: 15 | # bash <(curl -s https://raw.githubusercontent.com/harmony-one/experiment-deploy/master/tools/install-node.sh) -N mainnet -n validator 16 | # bash <(curl -s https://raw.githubusercontent.com/harmony-one/experiment-deploy/master/tools/install-node.sh) -N mainnet -n validator -a 17 | # bash <(curl -s https://raw.githubusercontent.com/harmony-one/experiment-deploy/master/tools/install-node.sh) -N mainnet -n explorer -s 1 18 | 19 | set -e 20 | 21 | function install_daemon(){ 22 | local launch_script_source="https://raw.githubusercontent.com/harmony-one/experiment-deploy/master/tools/launch-node.sh" 23 | local launch_script_path="$HOME/launch-node.sh" 24 | local service_file_path="/lib/systemd/system/harmony.service" 25 | local env_file_path="$HOME/launchargs" 26 | local service_file="[Unit] 27 | Description=harmony service 28 | After=network.target 29 | 30 | [Service] 31 | Type=simple 32 | Restart=on-failure 33 | RestartSec=1 34 | StartLimitInterval=0 35 | StartLimitBurst=0 36 | User=$USER 37 | WorkingDirectory=$HOME 38 | EnvironmentFile=$env_file_path 39 | StandardError=syslog 40 | SyslogIdentifier=harmony 41 | ExecStart=$launch_script_path -N \$NETWORK -n \$NODE_TYPE -s \$SHARD -a \$ARCHIVAL 42 | LimitNOFILE=65536 43 | LimitNPROC=65536 44 | 45 | [Install] 46 | WantedBy=multi-user.target 47 | " 48 | local launchargs="NETWORK=$1 49 | NODE_TYPE=$2 50 | SHARD=$3 51 | ARCHIVAL=$4 52 | " 53 | echo "$launchargs" > "$env_file_path" 54 | curl -o "$launch_script_path" "$launch_script_source" -L 55 | chmod +x "$launch_script_path" 56 | sudo echo "$service_file" | sudo tee "$service_file_path" > /dev/null 57 | sudo chmod 644 "$service_file_path" 58 | sudo systemctl enable harmony 59 | sudo systemctl daemon-reload 60 | } 61 | 62 | function install_node_sh(){ 63 | local node_sh_source="https://raw.githubusercontent.com/harmony-one/harmony/main/scripts/node.sh" 64 | local node_sh_path="$HOME/node.sh" 65 | if [ ! -f "$node_sh_path" ]; then 66 | echo "node.sh not found at $node_sh_path , downloading it from $node_sh_source ..." 67 | curl -o "$node_sh_path" "$node_sh_source" -L 68 | fi 69 | chmod +x "$node_sh_path" 70 | sudo "$node_sh_path" -s 71 | } 72 | 73 | 74 | # Script Main 75 | if (( "$EUID" == 0 )); then 76 | echo "do not install as root, exiting..." 77 | exit 1 78 | fi 79 | 80 | unset node_type node_shard network archival OPTIND OPTARG opt 81 | network=mainnet 82 | node_type=validator 83 | node_shard=-1 84 | archival=false 85 | while getopts N:n:s:a opt; do 86 | case "${opt}" in 87 | N) network="${OPTARG}" ;; 88 | n) node_type="${OPTARG}" ;; 89 | s) node_shard="${OPTARG}" ;; 90 | a) archival=true ;; 91 | *) 92 | echo " 93 | Internal node install script help message 94 | 95 | Examples: 96 | install-node.sh -N mainnet -n validator 97 | install-node.sh -N mainnet -n explorer -s 2 98 | 99 | Option: Help: 100 | -N specify node network (options are from node.sh; default: mainnet) 101 | -n specify node type (options are from node.sh; default: validator) 102 | -s specify node shard (only required for explorer node type) 103 | -a toggle node is archival (explorer is always archival)" 104 | exit 105 | ;; 106 | esac 107 | done 108 | shift $((${OPTIND} - 1)) 109 | 110 | if [ $# -ne 0 ]; then 111 | echo "arguments provided, script only takes options. Exiting..." 112 | exit 2 113 | fi 114 | 115 | if pgrep harmony; then 116 | echo "harmony process is running, stop process before installing..." 117 | exit 3 118 | fi 119 | 120 | install_node_sh 121 | install_daemon "$network" "$node_type" "$node_shard" "$archival" 122 | -------------------------------------------------------------------------------- /tools/install-node_exporter.sh: -------------------------------------------------------------------------------- 1 | # This script is used to install node_exporter on any nodes using systemd service. 2 | # Noted the port 9100 has to be open to your prometheus server. 3 | # 4 | # [Release] 5 | # aws s3 cp install-node_exporter.sh s3://haochen-harmony-pub/pub/node_exporter/install.sh --acl public-read 6 | # 7 | # [Usage] 8 | # bash <(curl -s -S -L https://haochen-harmony-pub.s3.amazonaws.com/pub/node_exporter/install.sh) 9 | 10 | if pgrep node_exporter; then 11 | echo node_exporter is running, exiting ... 12 | exit 13 | fi 14 | 15 | NE=node_exporter-0.18.1.linux-amd64 16 | 17 | curl -LO https://github.com/prometheus/node_exporter/releases/download/v0.18.1/${NE}.tar.gz 18 | tar xfz ${NE}.tar.gz 19 | 20 | sudo mv -f ${NE}/node_exporter /usr/local/bin 21 | sudo useradd -rs /bin/false node_exporter 22 | rm -f ${NE}.tar.gz 23 | rm -rf ${NE} 24 | 25 | curl -LO https://haochen-harmony-pub.s3.amazonaws.com/pub/node_exporter/node_exporter.service 26 | sudo mv -f node_exporter.service /lib/systemd/system/node_exporter.service 27 | 28 | sudo systemctl daemon-reload 29 | sudo systemctl enable node_exporter 30 | sudo systemctl start node_exporter 31 | -------------------------------------------------------------------------------- /tools/launch-node.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # NOTE: This script is meant to be consumed by the harmony daemon 4 | 5 | set -e 6 | 7 | node_file_dir="$HOME" 8 | node_sh_path="$node_file_dir/node.sh" 9 | 10 | function check_node_type() { 11 | case $1 in 12 | validator) 13 | echo "node type is validator" 14 | ;; 15 | explorer) 16 | if [ -z "$2" ]; then 17 | echo "explorer shard not provided, exiting..." 18 | exit 2 19 | fi 20 | echo "node type is explorer for shard $2" 21 | ;; 22 | *) 23 | echo "unknown node type, exiting..." 24 | exit 1 25 | ;; 26 | esac 27 | } 28 | 29 | function check_node_sh() { 30 | local node_sh_source=https://harmony.one/node.sh 31 | if [ ! -f "$node_sh_path" ]; then 32 | echo "node.sh not found at $node_sh_path . Downloading..." 33 | curl -oL "$node_sh_path" $node_sh_source 34 | fi 35 | chmod +x "$node_sh_path" 36 | } 37 | 38 | function launch_validator() { 39 | local network=$1 40 | local archival=$2 41 | local bls_pass=$HOME/bls.pass 42 | local bls_keys_dir="$HOME/.hmy/blskeys" 43 | if [ ! -d "$bls_keys_dir" ]; then 44 | echo "bls keys directory not found at $bls_keys_dir , exiting..." 45 | exit 3 46 | fi 47 | if ! find "$bls_keys_dir" -type f -name '*.key'; then 48 | echo "no file key ending with .key found in $bls_keys_dir , exiting..." 49 | exit 4 50 | fi 51 | if [ ! -f "$bls_pass" ]; then 52 | echo "bls passphrase file not found at $bls_pass , exiting..." 53 | exit 5 54 | fi 55 | if [ "$archival" == "true" ]; then 56 | $node_sh_path -1 -N "$network" -S -P -p "$bls_pass" -M -D -f "$bls_keys_dir" -A 57 | else 58 | $node_sh_path -1 -N "$network" -S -P -p "$bls_pass" -M -D -f "$bls_keys_dir" 59 | fi 60 | } 61 | 62 | function launch_explorer() { 63 | local network=$1 64 | local shard=$2 65 | local bls_key="$node_file_dir/bls.key" # Dummy keys 66 | local bls_pass="$node_file_dir/bls.pass" # Dummy keys 67 | echo >"$bls_key" 68 | echo >"$bls_pass" 69 | $node_sh_path -1 -N "$network" -S -P -D -T explorer -i "$shard" -k "$bls_key" -p "$bls_pass" -A 70 | } 71 | 72 | # Script Main 73 | unset node_type node_shard network archival OPTIND OPTARG opt 74 | network=mainnet 75 | node_type=validator 76 | node_shard= 77 | archival=false 78 | while getopts N:n:s:a: opt; do 79 | case "${opt}" in 80 | N) network="${OPTARG}" ;; 81 | n) node_type="${OPTARG}" ;; 82 | s) node_shard="${OPTARG}" ;; 83 | a) archival="${OPTARG}" ;; 84 | *) 85 | echo " 86 | Internal node launch script help message 87 | 88 | Examples: 89 | launch-node.sh -N mainnet -n validator 90 | launch-node.sh -N mainnet -n explorer -s 2 91 | 92 | Option: Help: 93 | -N specify node network (options are from node.sh; default: mainnet) 94 | -n specify node type (options are from node.sh; default: validator) 95 | -s specify node shard (only required for explorer node type) 96 | -a true|false specify node is archival (explorer is always archival)" 97 | exit 98 | ;; 99 | esac 100 | done 101 | shift $((${OPTIND} - 1)) 102 | 103 | if [ $# -ne 0 ]; then 104 | echo "arguments provided, script only takes options. Exiting..." 105 | exit 6 106 | fi 107 | 108 | check_node_type "$node_type" "$node_shard" 109 | check_node_sh 110 | if [ "$node_type" == "validator" ]; then 111 | launch_validator "$network" "$archival" 112 | else 113 | launch_explorer "$network" "$node_shard" 114 | fi 115 | -------------------------------------------------------------------------------- /tools/mainnet.snapshot.json: -------------------------------------------------------------------------------- 1 | { 2 | "bucket": "pub.harmony.one", 3 | "folder": "mainnet.min", 4 | "snapshot": "snapshot.20200504", 5 | "shard": "all", 6 | "cleanup": true 7 | } 8 | -------------------------------------------------------------------------------- /tools/mydesktop.sh: -------------------------------------------------------------------------------- 1 | exec ssh -i ~/.ssh/keys/california-key-benchmark.pem ec2-user@54.215.251.240 2 | -------------------------------------------------------------------------------- /tools/remove_blskey.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | HARMONYGO=harmony.go 4 | HARMONYDB=https://raw.githubusercontent.com/harmony-one/harmony/main/internal/genesis/${HARMONYGO} 5 | 6 | # This script is used to remove extra blskeys on harmony internal nodes 7 | # This script requires jq package, will install them automatically 8 | # 9 | # [Release] 10 | # aws s3 cp remove_blskey.sh s3://haochen-harmony-pub/pub/keyclean/install.sh --acl public-read 11 | # || 12 | # make removekey_release 13 | # 14 | # [Usage] 15 | # curl -sSfL https://haochen-harmony-pub.s3.amazonaws.com/pub/keyclean/install.sh | bash 16 | # 17 | # curl -sSfL https://haochen-harmony-pub.s3.amazonaws.com/pub/keyclean/install.sh | bash -s 90 18 | 19 | usage() { 20 | ME=$(basename "$0") 21 | cat <<-EOU 22 | Usage: $ME MAX_SLOT 23 | The script will remove unused blskeys/pass and restart harmony process. 24 | 25 | MAX_SLOT: 130/90 (default: 130) 26 | 27 | Example: 28 | curl -sSfL https://haochen-harmony-pub.s3.amazonaws.com/pub/keyclean/install.sh | bash 29 | curl -sSfL https://haochen-harmony-pub.s3.amazonaws.com/pub/keyclean/install.sh | bash -s 90 30 | 31 | EOU 32 | exit 1 33 | } 34 | 35 | check_env() { 36 | if ! command -v jq > /dev/null; then 37 | echo "installing jq" 38 | curl -sSfL https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o "$HOME/jq" || return $? 39 | chmod +x "$HOME/jq" 40 | fi 41 | } 42 | 43 | download_harmony_go() { 44 | curl -sSfLO ${HARMONYDB} || return $? 45 | } 46 | 47 | find_valid_blskey() { 48 | curl --connect-timeout 5 --max-time 10 --location -s --request POST "http://127.0.0.1:9500/" \ 49 | --header 'Content-Type: application/json' \ 50 | --data-raw '{ 51 | "jsonrpc": "2.0", 52 | "method": "hmy_getNodeMetadata", 53 | "params": [ ], 54 | "id": 1 55 | }' | jq -r .result.blskey > metadata.json 56 | } 57 | 58 | remove_unused_keys() { 59 | mkdir -p .hmy/oldblskeys 60 | for i in {0..9}; do 61 | pk=$(jq -r .[$i] metadata.json) 62 | if [ "${pk}" != "null" ]; then 63 | index=$(grep -F "$pk" "$HARMONYGO" | grep -oE 'Index:."[[:space:]]*[0-9]+[[:space:]]*"' | grep -oE '[0-9]+') 64 | num=$(( index / 4 )) 65 | if [ "${num}" -ge "${MAX_SLOT}" ]; then 66 | echo "moving $index/$num/$pk" 67 | mv -f .hmy/blskeys/"${pk}".* .hmy/oldblskeys 68 | fi 69 | fi 70 | done 71 | } 72 | 73 | restart_harmony() { 74 | if systemctl list-unit-files harmony.service | grep -q enabled; then 75 | sudo systemctl restart harmony || return $? 76 | else 77 | echo "WARN: can only restart harmony service using systemd" 78 | echo "please manually restart harmony process" 79 | fi 80 | } 81 | 82 | case "$1" in 83 | "-h"|"-H"|"-?"|"--help") 84 | usage;; 85 | esac 86 | 87 | MAX_SLOT=${1:-130} 88 | case "$MAX_SLOT" in 89 | 130|90) ;; 90 | *) usage ;; 91 | esac 92 | 93 | check_env || exit 2 94 | 95 | if ! download_harmony_go; then 96 | echo "Failed to download harmony.go: ${HARMONYDB}" 97 | exit 3 98 | fi 99 | 100 | find_valid_blskey 101 | 102 | remove_unused_keys || exit 6 103 | 104 | # restart_harmony || exit 7 105 | 106 | # rm -rf metadata.json ${HARMONYGO} 107 | -------------------------------------------------------------------------------- /tools/setup_clouddesktop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | REGION=us-west-1 4 | AWS="aws --profile harmony-ec2 --region $REGION" 5 | TODAY=$(date +%m-%d) 6 | SCRIPT=mydesktop.sh 7 | 8 | echo -n "Enter your Harmony email and press [ENTER]: " 9 | read email 10 | 11 | ALIAS=$(echo $email | cut -f 1 -d@) 12 | 13 | echo launching instance .. 14 | i_id=$($AWS ec2 run-instances \ 15 | --launch-template LaunchTemplateId=lt-0490d5a13c3534767 \ 16 | --count=1 \ 17 | --disable-api-termination \ 18 | --tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=$ALIAS-DevDesktop-$TODAY}]" \ 19 | --user-data "sed -i 's/export WHOAMI=.*/export WHOAMI=$ALIAS/' /home/ec2-user/.bashrc" \ 20 | --query ' Instances[0].InstanceId ' | tr -d \") 21 | 22 | echo waiting for instance launch. sleeping 30s .. 23 | sleep 30 24 | 25 | $AWS ec2 associate-iam-instance-profile --instance-id $i_id --iam-instance-profile 'Name=harmony-ec2-s3-role' 26 | 27 | i_ip=$($AWS ec2 describe-instances --instance-ids $i_id --query ' Reservations[0].Instances[0].PublicIpAddress ' | tr -d \") 28 | 29 | ssh -i ~/.ssh/keys/california-key-benchmark.pem ec2-user@$i_ip "sed -i 's/export WHOAMI=.*/export WHOAMI=$ALIAS/' /home/ec2-user/.bashrc" 30 | 31 | echo Please use $SCRIPT to login to your desktop. 32 | echo "exec ssh -i ~/.ssh/keys/california-key-benchmark.pem ec2-user@$i_ip" > $SCRIPT 33 | chmod +x $SCRIPT 34 | -------------------------------------------------------------------------------- /tools/snapshot/jenkins.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Simple script for a Jenkins job to hook into. 3 | # 4 | # Assumes 'snapshot' is the SSH config for the remote snapshot machine. 5 | # Assumes remote machines has requirements installed. 6 | # Assumes $remote_dir has 'rclone.conf' for testnets and 'snapshot.py'. 7 | # Assumes jenkins machine has jq. 8 | # 9 | # Note that this is only used for testnets. 10 | 11 | set -e 12 | 13 | remote_dir="\$HOME/snapshot" 14 | 15 | unset network machines_path conditions_path OPTIND OPTARG opt 16 | machines_path="./machines.json" 17 | conditions_path="./conditions.json" 18 | network="testnet" 19 | while getopts N:m:c:d: opt; do 20 | case "${opt}" in 21 | N) network="${OPTARG}" ;; 22 | m) machines_path="${OPTARG}" ;; 23 | c) conditions_path="${OPTARG}" ;; 24 | *) 25 | echo " 26 | Snapshot jenkins job script 27 | 28 | Option: Help: 29 | -N Desired Network. 30 | -m Path to machines JSON file. 31 | -c Path to conditions JSON file. 32 | " 33 | exit 34 | ;; 35 | esac 36 | done 37 | shift $((${OPTIND} - 1)) 38 | 39 | 40 | # shellcheck disable=SC2016 41 | config_template='{ 42 | "ssh_key": { 43 | "use_existing_agent": false, 44 | "path": "~/.ssh/harmony-testnet.pem", 45 | "passphrase": null 46 | }, 47 | "machines": , 48 | "rsync": { 49 | "config_path_on_host": "./rclone.conf", 50 | "config_path_on_client": "$HOME/snapshot_rclone.conf", 51 | "snapshot_bin": "snapshot:harmony-snapshot/" 52 | }, 53 | "condition": , 54 | "pager_duty": { 55 | "ignore": true, 56 | "service_key_v1": null 57 | } 58 | }' 59 | machines_string=$(cat "$machines_path") 60 | conditions_string=$(cat "$conditions_path") 61 | config=${config_template//$machines_string} 62 | config=${config//$conditions_string} 63 | config=${config//$network} 64 | 65 | config_remote_path="$remote_dir/config.$(date +%Y%m%d%H%M%S).json" 66 | echo "Config for snapshot: $config" 67 | echo "Remote directory for snapshot: '$remote_dir'" 68 | echo "Config path on snapshot machine: '$config_remote_path'" 69 | 70 | tmp_bash_script_content="#!/bin/bash 71 | echo '$config' > $config_remote_path 72 | cd $remote_dir && ./snapshot.py --config $config_remote_path --bucket-sync && rm $config_remote_path 73 | " 74 | echo "$tmp_bash_script_content" | ssh snapshot "bash -s" 75 | -------------------------------------------------------------------------------- /tools/snapshot/rclone.conf: -------------------------------------------------------------------------------- 1 | [snapshot] 2 | type = s3 3 | provider = AWS 4 | env_auth = false 5 | region = us-east-1 6 | acl = public-read 7 | server_side_encryption = AES256 8 | storage_class = REDUCED_REDUNDANCY 9 | -------------------------------------------------------------------------------- /tools/snapshot/requirements.txt: -------------------------------------------------------------------------------- 1 | pyhmy==20.5.5 2 | pexpect==4.8.0 3 | dnspython==1.16.0 4 | pagerduty-api==0.3 -------------------------------------------------------------------------------- /tools/snapshot/testnet_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ssh_key": { 3 | "use_existing_agent": false, 4 | "path": "~/.ssh/harmony-testnet.pem", 5 | "passphrase": null 6 | }, 7 | "machines": [ 8 | { 9 | "shard": 0, 10 | "ip": "3.84.58.192", 11 | "user": "ec2-user", 12 | "db_directory": "~/" 13 | }, 14 | { 15 | "shard": 1, 16 | "ip": "54.175.84.96", 17 | "user": "ec2-user", 18 | "db_directory": "~/" 19 | }, 20 | { 21 | "shard": 2, 22 | "ip": "54.163.169.195", 23 | "user": "ec2-user", 24 | "db_directory": "~/" 25 | }, 26 | { 27 | "shard": 3, 28 | "ip": "52.90.21.187", 29 | "user": "ec2-user", 30 | "db_directory": "~/" 31 | } 32 | ], 33 | "rsync": { 34 | "config_path_on_host": "./rclone.conf", 35 | "config_path_on_client": "$HOME/snapshot_rclone.conf", 36 | "snapshot_bin": "snapshot:harmony-snapshot/testnet" 37 | }, 38 | "condition": { 39 | "force": false, 40 | "max_seconds_since_last_block": 150, 41 | "role": "Validator", 42 | "network": "testnet", 43 | "is_leader": false, 44 | "is_archival": false, 45 | "is_snapdb": false 46 | }, 47 | "pager_duty": { 48 | "ignore": true, 49 | "service_key_v1": null 50 | } 51 | } -------------------------------------------------------------------------------- /tools/snapshots/main.all.0501.json: -------------------------------------------------------------------------------- 1 | { 2 | "bucket": "pub.harmony.one", 3 | "folder": "mainnet.min", 4 | "snapshot": "snapshot.20200501", 5 | "shard": "all", 6 | "restart": true, 7 | "cleanup": true 8 | } 9 | -------------------------------------------------------------------------------- /tools/snapshots/main.all.0504.json: -------------------------------------------------------------------------------- 1 | { 2 | "bucket": "pub.harmony.one", 3 | "folder": "mainnet.min", 4 | "snapshot": "snapshot.20200504", 5 | "shard": "all", 6 | "restart": true, 7 | "cleanup": true 8 | } 9 | -------------------------------------------------------------------------------- /tools/snapshots/main.s0.0501.json: -------------------------------------------------------------------------------- 1 | { 2 | "bucket": "pub.harmony.one", 3 | "folder": "mainnet.min", 4 | "snapshot": "snapshot.20200501", 5 | "shard": "0", 6 | "restart": false, 7 | "cleanup": true 8 | } 9 | -------------------------------------------------------------------------------- /tools/snapshots/main.s1.0504.json: -------------------------------------------------------------------------------- 1 | { 2 | "bucket": "pub.harmony.one", 3 | "folder": "mainnet.min", 4 | "snapshot": "snapshot.20200504", 5 | "shard": "1", 6 | "restart": false, 7 | "cleanup": true 8 | } 9 | -------------------------------------------------------------------------------- /tools/snapshots/main.s2.0505.json: -------------------------------------------------------------------------------- 1 | { 2 | "bucket": "pub.harmony.one", 3 | "folder": "mainnet.min", 4 | "snapshot": "snapshot.20200505", 5 | "shard": "2", 6 | "restart": false, 7 | "cleanup": true 8 | } 9 | -------------------------------------------------------------------------------- /tools/snapshots/main.s3.0505.json: -------------------------------------------------------------------------------- 1 | { 2 | "bucket": "pub.harmony.one", 3 | "folder": "mainnet.min", 4 | "snapshot": "snapshot.20200505", 5 | "shard": "3", 6 | "restart": false, 7 | "cleanup": true 8 | } 9 | -------------------------------------------------------------------------------- /tools/snapshots/upload.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for s in *.json; do 4 | aws s3 cp "${s}" s3://haochen-harmony-pub/pub/db_snapshot/"${s}" --acl public-read 5 | done 6 | -------------------------------------------------------------------------------- /tools/test.only.json: -------------------------------------------------------------------------------- 1 | { 2 | "bucket": "pub.harmony.one", 3 | "folder": "ostn", 4 | "snapshot": "crash/0409", 5 | "shard": "all", 6 | "cleanup": false 7 | } 8 | --------------------------------------------------------------------------------