Skip to content

Commit 9ca9812

Browse files
author
platfowner
authored
Merge pull request #1153 from ainblockchain/release/v1.0.13
Release/v1.0.13
2 parents 7c1be49 + e52775d commit 9ca9812

12 files changed

+52
-36
lines changed

.github/workflows/github-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-latest, macos-latest]
21-
node-version: [ '14.x', '16.x' ]
21+
node-version: [ '18.x' ]
2222
runs-on: ${{ matrix.os }}
2323
steps:
2424
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ You can use some environment variables, and these have the following options.
173173
```
174174
After the node is executed, you should inject your account into the node.
175175
```
176-
node inject_account_gcp.js <NODE_ENDPOINT_URL> --private-key
177-
node inject_account_gcp.js <NODE_ENDPOINT_URL> --keystore
178-
node inject_account_gcp.js <NODE_ENDPOINT_URL> --mnemonic
176+
node inject_node_account.js <NODE_ENDPOINT_URL> --private-key
177+
node inject_node_account.js <NODE_ENDPOINT_URL> --keystore
178+
node inject_node_account.js <NODE_ENDPOINT_URL> --mnemonic
179179
```
180180
If you want to inject your account automatically, add one of these environment variables before running the node.
181181
```

client/protocol_versions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,8 @@
113113
},
114114
"1.0.12": {
115115
"min": "1.0.0"
116+
},
117+
"1.0.13": {
118+
"min": "1.0.0"
116119
}
117120
}

deploy_blockchain_genesis_gcp.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
if [[ $# -lt 2 ]] || [[ $# -gt 8 ]]; then
44
printf "Usage: bash deploy_blockchain_genesis_gcp.sh [dev|staging|sandbox|exp|spring|summer|mainnet] <# of Shards> [--setup] [--keystore|--mnemonic|--private-key] [--keep-code|--no-keep-code] [--keep-data|--no-keep-data] [--full-sync|--fast-sync] [--chown-data|--no-chown-data] [--kill-only|--skip-kill]\n"
5-
printf "Example: bash deploy_blockchain_genesis_gcp.sh dev 0 --setup --keystore --no-keep-code --no-chown-data\n"
5+
printf "Example: bash deploy_blockchain_genesis_gcp.sh dev 0 --keystore --no-keep-code --keep-data\n"
6+
printf "Example: bash deploy_blockchain_genesis_gcp.sh dev 0 --keystore --keep-code --keep-data\n"
7+
printf "Example: bash deploy_blockchain_genesis_gcp.sh dev 0 --setup --keystore --no-keep-code\n"
68
printf "\n"
79
exit
810
fi
@@ -158,7 +160,7 @@ function inject_account() {
158160
echo $KEYSTORE_FILE_PATH
159161
sleep 1
160162
echo $PASSWORD
161-
} | node inject_account_gcp.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
163+
} | node inject_node_account.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
162164
elif [[ "$ACCOUNT_INJECTION_OPTION" = "--mnemonic" ]]; then
163165
local MNEMONIC=${MNEMONIC_LIST[${node_index}]}
164166
printf "\n* >> Injecting an account for node $node_index ********************\n\n"
@@ -167,7 +169,7 @@ function inject_account() {
167169
echo $MNEMONIC
168170
sleep 1
169171
echo 0
170-
} | node inject_account_gcp.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
172+
} | node inject_node_account.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
171173
else
172174
printf "\n* >> Injecting an account for node $node_index ********************\n\n"
173175
printf "node_ip_addr='$node_ip_addr'\n"
@@ -176,7 +178,7 @@ function inject_account() {
176178
GENESIS_ACCOUNTS_PATH="blockchain-configs/testnet-prod/genesis_accounts.json"
177179
fi
178180
PRIVATE_KEY=$(cat $GENESIS_ACCOUNTS_PATH | jq -r '.others['$node_index'].private_key')
179-
echo $PRIVATE_KEY | node inject_account_gcp.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
181+
echo $PRIVATE_KEY | node inject_node_account.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
180182
fi
181183
}
182184

deploy_blockchain_incremental_gcp.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
if [[ $# -lt 4 ]] || [[ $# -gt 11 ]]; then
44
printf "Usage: bash deploy_blockchain_incremental_gcp.sh [dev|staging|sandbox|exp|spring|summer|mainnet] <# of Shards> <Begin Parent Node Index> <End Parent Node Index> [--setup] [--keystore|--mnemonic|--private-key] [--keep-code|--no-keep-code] [--keep-data|--no-keep-data] [--full-sync|--fast-sync] [--chown-data|--no-chown-data]\n"
5-
printf "Example: bash deploy_blockchain_incremental_gcp.sh dev 0 -1 1 --setup --keystore --no-keep-code --full-sync --no-chown-data\n"
5+
printf "Example: bash deploy_blockchain_incremental_gcp.sh dev 0 -1 9 --keystore --no-keep-code --keep-data\n"
6+
printf "Example: bash deploy_blockchain_incremental_gcp.sh dev 0 0 0 --keystore --keep-code --keep-data\n"
7+
printf "Example: bash deploy_blockchain_incremental_gcp.sh dev 0 0 0 --setup --keystore --no-keep-code --keep-data\n"
8+
printf "Example: bash deploy_blockchain_incremental_gcp.sh dev 0 -1 -1 --setup --keystore --no-keep-code\n"
69
printf "Note: <Begin Parent Node Index> = -1 is for tracker\n"
710
printf "Note: <End Parent Node Index> is inclusive\n"
811
printf "\n"
@@ -266,7 +269,7 @@ function deploy_node() {
266269
echo $KEYSTORE_FILE_PATH
267270
sleep 1
268271
echo $PASSWORD
269-
} | node inject_account_gcp.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
272+
} | node inject_node_account.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
270273
elif [[ $ACCOUNT_INJECTION_OPTION = "--mnemonic" ]]; then
271274
local node_ip_addr=${IP_ADDR_LIST[${node_index}]}
272275
local MNEMONIC=${MNEMONIC_LIST[${node_index}]}
@@ -277,7 +280,7 @@ function deploy_node() {
277280
echo $MNEMONIC
278281
sleep 1
279282
echo 0
280-
} | node inject_account_gcp.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
283+
} | node inject_node_account.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
281284
else
282285
local node_ip_addr=${IP_ADDR_LIST[${node_index}]}
283286
printf "\n* >> Injecting an account for node $node_index ($node_target_addr) ********************\n\n"
@@ -287,7 +290,7 @@ function deploy_node() {
287290
GENESIS_ACCOUNTS_PATH="blockchain-configs/testnet-prod/genesis_accounts.json"
288291
fi
289292
PRIVATE_KEY=$(cat $GENESIS_ACCOUNTS_PATH | jq -r '.others['$node_index'].private_key')
290-
echo $PRIVATE_KEY | node inject_account_gcp.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
293+
echo $PRIVATE_KEY | node inject_node_account.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
291294
fi
292295

293296
# 5. Wait until node is synced

deploy_blockchain_sandbox_gcp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function inject_account() {
100100
printf "\n* >> Injecting an account for node $node_index ********************\n\n"
101101
printf "node_ip_addr='$node_ip_addr'\n"
102102
PRIVATE_KEY=$(cat $GENESIS_ACCOUNTS_PATH | jq -r '.others['$node_index'].private_key')
103-
echo $PRIVATE_KEY | node inject_account_gcp.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
103+
echo $PRIVATE_KEY | node inject_node_account.js $node_ip_addr $ACCOUNT_INJECTION_OPTION
104104
}
105105

106106
# GCP node address

deploy_monitoring_gcp.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/bash
22

3-
if [[ "$#" -lt 2 ]]; then
4-
printf "Usage: bash deploy_monitoring_gcp.sh [dev|staging|sandbox|exp|spring|summer|mainnet] <GCP Username> [--setup]\n"
5-
printf "Example: bash deploy_monitoring_gcp.sh dev gcp_user \n"
3+
if [[ "$#" -lt 1 ]]; then
4+
printf "Usage: bash deploy_monitoring_gcp.sh [dev|staging|sandbox|exp|spring|summer|mainnet] [--setup]\n"
5+
printf "Example: bash deploy_monitoring_gcp.sh dev --setup\n"
6+
printf "Example: bash deploy_monitoring_gcp.sh dev\n"
67
printf "\n"
78
exit
89
fi
@@ -24,10 +25,10 @@ fi
2425
printf "SEASON=$SEASON\n"
2526
printf "PROJECT_ID=$PROJECT_ID\n"
2627

27-
GCP_USER="$2"
28+
GCP_USER="runner"
2829
printf "GCP_USER=$GCP_USER\n"
2930

30-
OPTIONS="$3"
31+
OPTIONS="$2"
3132
printf "OPTIONS=$OPTIONS\n"
3233

3334
# Get confirmation.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async function processArguments() {
142142
}
143143

144144
function usage() {
145-
console.log('\nExample commandlines:\n node inject_account_gcp.js <ENDPOINT_URL> <ACCOUNT_INJECTION_OPTION>\n');
145+
console.log('\nExample commandlines:\n node inject_node_account.js <ENDPOINT_URL> <ACCOUNT_INJECTION_OPTION>\n');
146146
process.exit(0);
147147
}
148148

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ain-blockchain",
33
"description": "AI Network Blockchain",
4-
"version": "1.0.12",
4+
"version": "1.0.13",
55
"private": true,
66
"license": "MIT",
77
"author": "dev@ainetwork.ai",
@@ -10,7 +10,7 @@
1010
"url": "https://github.com/ainblockchain/ain-blockchain"
1111
},
1212
"engines": {
13-
"node": ">=14"
13+
"node": ">=18"
1414
},
1515
"scripts": {
1616
"client": "UNSAFE_PRIVATE_KEY=b22c95ffc4a5c096f7d7d0487ba963ce6ac945bdc91c79b64ce209de289bec96 DEBUG=true node ./client/index.js",

setup_blockchain_ubuntu.sh

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22

33
printf "\n[[[[[ setup_blockchain_ubuntu.sh ]]]]]\n\n"
44

5-
printf 'Upgrading apt..\n'
5+
printf '\n[[ Upgrading apt.. ]]\n'
66
sudo apt update
77
# skip prompting (see https://serverfault.com/questions/527789/how-to-automate-changed-config-files-during-apt-get-upgrade-in-ubuntu-12)
8-
apt-get --yes --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
8+
sudo apt-get --yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
99

10-
printf 'Installing NodeJS..\n'
10+
printf '\n[[ Uninstalling NodeJS.. ]]\n'
11+
sudo apt-get -y purge nodejs
12+
sudo apt-get -y autoremove
13+
14+
printf '\n[[ Installing NodeJS.. ]]\n'
1115
sudo apt update
1216
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
13-
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
14-
sudo apt -y install nodejs
17+
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
18+
# skip prompting for daemon restart (see https://askubuntu.com/questions/1367139/apt-get-upgrade-auto-restart-services)
19+
sudo NEEDRESTART_MODE=a apt -y install nodejs
1520

1621
printf 'node -v\n'
1722
node -v
@@ -20,29 +25,30 @@ printf 'npm --version\n'
2025
npm --version
2126

2227

23-
printf 'Installing yarn..\n'
28+
printf '\n[[ Installing yarn.. ]]\n'
2429
sudo npm install -g yarn
2530

2631
printf 'yarn --version\n'
2732
sudo yarn --version
2833

2934

30-
printf 'Installing make..\n'
35+
printf '\n[[ Installing make.. ]]\n'
3136
sudo apt update
32-
sudo apt-get install -y build-essential
37+
# skip prompting for daemon restart (see https://askubuntu.com/questions/1367139/apt-get-upgrade-auto-restart-services)
38+
sudo NEEDRESTART_MODE=a apt-get install -y build-essential
3339

3440
printf 'make --version\n'
3541
make --version
3642

3743

38-
printf 'Installing vim..\n'
44+
printf '\n[[ Installing vim.. ]]\n'
3945
sudo apt update
4046
sudo apt install -y vim
4147

4248
printf 'vim --version\n'
4349
vim --version
4450

45-
printf 'Installing jq..\n'
51+
printf '\n[[ Installing jq.. ]]\n'
4652
sudo apt update
4753
sudo apt install -y jq
4854

0 commit comments

Comments
 (0)