Skip to content

Commit e5738f4

Browse files
committed
local testnet boot bios scripts update
1 parent 9e8ec3e commit e5738f4

File tree

3 files changed

+58
-38
lines changed

3 files changed

+58
-38
lines changed

infrablockchain-bios/infrablockchain_bios_local_testnet.sh renamed to infrablockchain-bios/local_testnet_boot_bios_infrablockchain.sh

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
1-
#!/usr/bin/env zsh
2-
# chmod +x ./infrablockchain_bios_local_testnet.sh
1+
#!/usr/bin/env bash
2+
# chmod +x ./local_testnet_boot_bios_infrablockchain.sh
33

44
setopt shwordsplit
55

6+
export SCRIPT_DIR=$(dirname $(realpath "$0"))
7+
export INFRABLOCKCHAIN_HOME=$(realpath "$SCRIPT_DIR/..")
8+
#export INFRABLOCKCHAIN_HOME=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain-2-git
9+
610
export INFRA_NODE_BIN_NAME=infra-node
711
export INFRA_CLI_BIN_NAME=infra-cli
812
export INFRA_KEYCHAIN_BIN_NAME=infra-keychain
913

10-
export INFRABLOCKCHAIN_HOME=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain-2-git
14+
export INFRA_BLOCKCHAIN_DATA_BASE_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data
15+
export INFRA_BLOCKCHAIN_LOG_BASE_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/log
1116

12-
export INFRA_NODE=$INFRABLOCKCHAIN_HOME/build/bin/$INFRA_NODE_BIN_NAME
13-
export INFRA_NODE_LOG_FILE=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/log/$INFRA_NODE_BIN_NAME.log
17+
export INFRA_NODE=${INFRABLOCKCHAIN_HOME}/build/bin/$INFRA_NODE_BIN_NAME
18+
export INFRA_NODE_LOG_FILE=${INFRA_BLOCKCHAIN_LOG_BASE_DIR}/$INFRA_NODE_BIN_NAME.log
1419

1520
export INFRA_CLI=($INFRABLOCKCHAIN_HOME/build/bin/$INFRA_CLI_BIN_NAME --wallet-url http://127.0.0.1:8900/)
16-
export INFRA_KEYCHAIN=$INFRABLOCKCHAIN_HOME/build/bin/$INFRA_KEYCHAIN_BIN_NAME
17-
export INFRA_KEYCHAIN_LOG_FILE=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/log/$INFRA_KEYCHAIN_BIN_NAME.log
18-
export INFRABLOCKCHAIN_DEV_WALLET_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/infrablockchain_dev_wallet
21+
export INFRA_KEYCHAIN=${INFRABLOCKCHAIN_HOME}/build/bin/$INFRA_KEYCHAIN_BIN_NAME
22+
export INFRA_KEYCHAIN_LOG_FILE=${INFRA_BLOCKCHAIN_LOG_BASE_DIR}/$INFRA_KEYCHAIN_BIN_NAME.log
23+
export INFRABLOCKCHAIN_DEV_WALLET_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/infrablockchain_dev_wallet
1924
export INFRA_KEYCHAIN_WALLET_PASSWORD=PW5JcN2AfwXxAV12W1mofb7pbeyJEwwie4JsCaTZvMx5kt38P8TP1
2025
export INFRA_KEYCHAIN_WALLET_NAME=local-testnet
2126

22-
export INFRA_NODE_CONFIG=$INFRABLOCKCHAIN_HOME/infrablockchain-bios/config/config_infrablockchain_local_testnet.ini
23-
export INFRA_NODE_GENESIS_JSON=$INFRABLOCKCHAIN_HOME/infrablockchain-bios/config/genesis_infrablockchain_local_testnet.json
24-
export INFRA_NODE_DATA_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/infra_node_data
27+
export INFRA_NODE_CONFIG=${INFRABLOCKCHAIN_HOME}/infrablockchain-bios/config/config_infrablockchain_local_testnet.ini
28+
export INFRA_NODE_GENESIS_JSON=${INFRABLOCKCHAIN_HOME}/infrablockchain-bios/config/genesis_infrablockchain_local_testnet.json
29+
export INFRA_NODE_DATA_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/infra_node_data
2530

26-
export INFRABLOCKCHAIN_CONTRACTS_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain.contracts-git/build/contracts
31+
export INFRABLOCKCHAIN_CONTRACTS_DIR=${INFRABLOCKCHAIN_HOME}/contracts/contracts
2732

2833
export SYS_ACCOUNT=eosio
2934
#export SYS_ACCOUNT=infrasys
@@ -76,6 +81,9 @@ print_section_title() {
7681
set -x
7782
}
7883

84+
mkdir -p ${INFRA_BLOCKCHAIN_DATA_BASE_DIR}
85+
mkdir -p ${INFRA_BLOCKCHAIN_LOG_BASE_DIR}
86+
7987
{ print_section_title "Reset infra-node data"; } 2>/dev/null
8088

8189
pgrep $INFRA_NODE_BIN_NAME
@@ -132,7 +140,7 @@ curl -X POST ${INFRA_NODE_API_ENDPOINT}/v1/producer/schedule_protocol_feature_ac
132140
{ print_section_title "Install InfraBlockchain BOOT Contract"; } 2>/dev/null
133141

134142
sleep 2
135-
$INFRA_CLI set contract ${SYS_ACCOUNT} $INFRABLOCKCHAIN_HOME/build/contracts/contracts/eosio.boot/ -p ${SYS_ACCOUNT}@active
143+
$INFRA_CLI set contract ${SYS_ACCOUNT} $INFRABLOCKCHAIN_CONTRACTS_DIR/eosio.boot/bin eosio.boot.wasm eosio.boot.abi -p ${SYS_ACCOUNT}@active
136144
sleep 2
137145

138146
# Activate Protocol Feature for InfraBlockchain
@@ -162,14 +170,14 @@ $INFRA_CLI create account ${SYS_ACCOUNT} sys.txfee PUB_K1_73E1bUPyVMTb7gjvvhk3bh
162170
{ print_section_title "Install InfraBlockchain System Contract"; } 2>/dev/null
163171

164172
sleep 2
165-
$INFRA_CLI set contract ${SYS_ACCOUNT} $INFRABLOCKCHAIN_CONTRACTS_DIR/infra.system/ -p ${SYS_ACCOUNT}@active --txfee-payer ${SYS_ACCOUNT}
173+
$INFRA_CLI set contract ${SYS_ACCOUNT} $INFRABLOCKCHAIN_CONTRACTS_DIR/infra.system/bin infra.system.wasm infra.system.abi -p ${SYS_ACCOUNT}@active --txfee-payer ${SYS_ACCOUNT}
166174
sleep 2
167175

168176

169177
{ print_section_title "Install Standard Token ABI Interface System Contract"; } 2>/dev/null
170178

171179
sleep 2
172-
$INFRA_CLI set contract sys.tokenabi $INFRABLOCKCHAIN_CONTRACTS_DIR/sys.tokenabi/ -p sys.tokenabi@active --txfee-payer ${SYS_ACCOUNT}
180+
$INFRA_CLI set contract sys.tokenabi $INFRABLOCKCHAIN_CONTRACTS_DIR/sys.tokenabi/bin sys.tokenabi.wasm sys.tokenabi.abi -p sys.tokenabi@active --txfee-payer ${SYS_ACCOUNT}
173181
sleep 2
174182

175183

infrablockchain-bios/start_infrablockchain_testnet_node_local.sh renamed to infrablockchain-bios/local_testnet_start_infrablockchain_node.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
1-
#!/usr/bin/env zsh
2-
# chmod +x ./start_infrablockchain_testnet_node_local.sh
1+
#!/usr/bin/env bash
2+
# chmod +x ./local_testnet_start_infrablockchain_node.sh
33

44
setopt shwordsplit
55

6+
export SCRIPT_DIR=$(dirname $(realpath "$0"))
7+
export INFRABLOCKCHAIN_HOME=$(realpath "$SCRIPT_DIR/..")
8+
#export INFRABLOCKCHAIN_HOME=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain-2-git
9+
610
export INFRA_NODE_BIN_NAME=infra-node
711
export INFRA_CLI_BIN_NAME=infra-cli
812
export INFRA_KEYCHAIN_BIN_NAME=infra-keychain
913

10-
export INFRABLOCKCHAIN_HOME=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain-2-git
14+
export INFRA_BLOCKCHAIN_DATA_BASE_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data
15+
export INFRA_BLOCKCHAIN_LOG_BASE_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/log
1116

12-
export INFRA_NODE=$INFRABLOCKCHAIN_HOME/build/bin/$INFRA_NODE_BIN_NAME
13-
export INFRA_NODE_LOG_FILE=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/log/$INFRA_NODE_BIN_NAME.log
17+
export INFRA_NODE=${INFRABLOCKCHAIN_HOME}/build/bin/$INFRA_NODE_BIN_NAME
18+
export INFRA_NODE_LOG_FILE=${INFRA_BLOCKCHAIN_LOG_BASE_DIR}/$INFRA_NODE_BIN_NAME.log
1419

1520
export INFRA_CLI=($INFRABLOCKCHAIN_HOME/build/bin/$INFRA_CLI_BIN_NAME --wallet-url http://127.0.0.1:8900/)
16-
export INFRA_KEYCHAIN=$INFRABLOCKCHAIN_HOME/build/bin/$INFRA_KEYCHAIN_BIN_NAME
17-
export INFRA_KEYCHAIN_LOG_FILE=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/log/$INFRA_KEYCHAIN_BIN_NAME.log
18-
export INFRABLOCKCHAIN_DEV_WALLET_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/infrablockchain_dev_wallet
21+
export INFRA_KEYCHAIN=${INFRABLOCKCHAIN_HOME}/build/bin/$INFRA_KEYCHAIN_BIN_NAME
22+
export INFRA_KEYCHAIN_LOG_FILE=${INFRA_BLOCKCHAIN_LOG_BASE_DIR}/$INFRA_KEYCHAIN_BIN_NAME.log
23+
export INFRABLOCKCHAIN_DEV_WALLET_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/infrablockchain_dev_wallet
1924
export INFRA_KEYCHAIN_WALLET_PASSWORD=PW5JcN2AfwXxAV12W1mofb7pbeyJEwwie4JsCaTZvMx5kt38P8TP1
2025
export INFRA_KEYCHAIN_WALLET_NAME=local-testnet
2126

22-
export INFRA_NODE_CONFIG=$INFRABLOCKCHAIN_HOME/infrablockchain-bios/config/config_infrablockchain_local_testnet.ini
23-
export INFRA_NODE_GENESIS_JSON=$INFRABLOCKCHAIN_HOME/infrablockchain-bios/config/genesis_infrablockchain_local_testnet.json
24-
export INFRA_NODE_DATA_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/infra_node_data
27+
export INFRA_NODE_CONFIG=${INFRABLOCKCHAIN_HOME}/infrablockchain-bios/config/config_infrablockchain_local_testnet.ini
28+
export INFRA_NODE_GENESIS_JSON=${INFRABLOCKCHAIN_HOME}/infrablockchain-bios/config/genesis_infrablockchain_local_testnet.json
29+
export INFRA_NODE_DATA_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/infra_node_data
2530

26-
export INFRABLOCKCHAIN_CONTRACTS_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain.contracts-git/build/contracts
31+
export INFRABLOCKCHAIN_CONTRACTS_DIR=${INFRABLOCKCHAIN_HOME}/contracts/contracts
2732

2833
export SYS_ACCOUNT=eosio
34+
#export SYS_ACCOUNT=infrasys
2935

3036
export INFRA_NODE_API_ENDPOINT=http://127.0.0.1:8888
3137

infrablockchain-bios/stop_infrablockchain_testnet_node_local.sh renamed to infrablockchain-bios/local_testnet_stop_infrablockchain_node.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
11
#!/usr/bin/env bash
2-
# chmod +x ./stop_infrablockchain_testnet_node.sh
2+
# chmod +x ./local_testnet_stop_infrablockchain_node.sh
33

44
#YSMT_TESTNET_SSH_KEY_FILE=~/Documents/__HalfDomeChain__/AWS/ssh_key/ysmt_testnet_dev_server_ap_northeast_seoul.pem
55
#YSMT_TESTNET_NODE_USER_HOST=ubuntu@ec2-13-124-23-23.ap-northeast-2.compute.amazonaws.com
66
#scp -i ${YSMT_TESTNET_SSH_KEY_FILE} ./stop_infrablockchain_testnet_node.sh ${YSMT_TESTNET_NODE_USER_HOST}:/mnt/infrablockchain_testnet_mgmt/stop_infrablockchain_testnet_node.sh
77

88
setopt shwordsplit
99

10+
export SCRIPT_DIR=$(dirname $(realpath "$0"))
11+
export INFRABLOCKCHAIN_HOME=$(realpath "$SCRIPT_DIR/..")
12+
#export INFRABLOCKCHAIN_HOME=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain-2-git
13+
1014
export INFRA_NODE_BIN_NAME=infra-node
1115
export INFRA_CLI_BIN_NAME=infra-cli
1216
export INFRA_KEYCHAIN_BIN_NAME=infra-keychain
1317

14-
export INFRABLOCKCHAIN_HOME=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain-2-git
18+
export INFRA_BLOCKCHAIN_DATA_BASE_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data
19+
export INFRA_BLOCKCHAIN_LOG_BASE_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/log
1520

16-
export INFRA_NODE=$INFRABLOCKCHAIN_HOME/build/bin/$INFRA_NODE_BIN_NAME
17-
export INFRA_NODE_LOG_FILE=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/log/$INFRA_NODE_BIN_NAME.log
21+
export INFRA_NODE=${INFRABLOCKCHAIN_HOME}/build/bin/$INFRA_NODE_BIN_NAME
22+
export INFRA_NODE_LOG_FILE=${INFRA_BLOCKCHAIN_LOG_BASE_DIR}/$INFRA_NODE_BIN_NAME.log
1823

1924
export INFRA_CLI=($INFRABLOCKCHAIN_HOME/build/bin/$INFRA_CLI_BIN_NAME --wallet-url http://127.0.0.1:8900/)
20-
export INFRA_KEYCHAIN=$INFRABLOCKCHAIN_HOME/build/bin/$INFRA_KEYCHAIN_BIN_NAME
21-
export INFRA_KEYCHAIN_LOG_FILE=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/log/$INFRA_KEYCHAIN_BIN_NAME.log
22-
export INFRABLOCKCHAIN_DEV_WALLET_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/infrablockchain_dev_wallet
25+
export INFRA_KEYCHAIN=${INFRABLOCKCHAIN_HOME}/build/bin/$INFRA_KEYCHAIN_BIN_NAME
26+
export INFRA_KEYCHAIN_LOG_FILE=${INFRA_BLOCKCHAIN_LOG_BASE_DIR}/$INFRA_KEYCHAIN_BIN_NAME.log
27+
export INFRABLOCKCHAIN_DEV_WALLET_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/infrablockchain_dev_wallet
2328
export INFRA_KEYCHAIN_WALLET_PASSWORD=PW5JcN2AfwXxAV12W1mofb7pbeyJEwwie4JsCaTZvMx5kt38P8TP1
2429
export INFRA_KEYCHAIN_WALLET_NAME=local-testnet
2530

26-
export INFRA_NODE_CONFIG=$INFRABLOCKCHAIN_HOME/infrablockchain-bios/config/config_infrablockchain_local_testnet.ini
27-
export INFRA_NODE_GENESIS_JSON=$INFRABLOCKCHAIN_HOME/infrablockchain-bios/config/genesis_infrablockchain_local_testnet.json
28-
export INFRA_NODE_DATA_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain_local_testnet_data/infra_node_data
31+
export INFRA_NODE_CONFIG=${INFRABLOCKCHAIN_HOME}/infrablockchain-bios/config/config_infrablockchain_local_testnet.ini
32+
export INFRA_NODE_GENESIS_JSON=${INFRABLOCKCHAIN_HOME}/infrablockchain-bios/config/genesis_infrablockchain_local_testnet.json
33+
export INFRA_NODE_DATA_DIR=${INFRA_BLOCKCHAIN_DATA_BASE_DIR}/infra_node_data
2934

30-
export INFRABLOCKCHAIN_CONTRACTS_DIR=/Users/bwlim/Documents/__InfraBlockchain__/infrablockchain.contracts-git/build/contracts
35+
export INFRABLOCKCHAIN_CONTRACTS_DIR=${INFRABLOCKCHAIN_HOME}/contracts/contracts
3136

3237
export SYS_ACCOUNT=eosio
38+
#export SYS_ACCOUNT=infrasys
3339

3440
export INFRA_NODE_API_ENDPOINT=http://127.0.0.1:8888
3541

0 commit comments

Comments
 (0)