@@ -13,7 +13,8 @@ NOTE: Tracker Server must be started first before starting any blockchain node i
1313
1414#### Local
1515
16- - Clone this repository and install npm packages
16+ - Clone this repository and install yarn packages
17+ - Highly recommend to use node version >= 12
1718```
1819git clone https://github.com/ainblockchain/ain-blockchain.git
1920cd ain-blockchain/tracker-server/
@@ -38,7 +39,7 @@ sh deploy_blockchain_gcp.sh {dev|spring|summer} <YOUR_GCP_USER_NAME> <NUMBER_OF_
3839```
3940sh setup_blockchain_ubuntu.sh
4041```
41- - Copy files to a sharable folder & install npm packages
42+ - Copy files to a sharable folder & install yarn packages
4243```
4344source setup_tracker_gcp.sh
4445```
@@ -84,17 +85,18 @@ Operates a single peer node instance of the AIN blockchain. A single blockchain
8485
8586#### Local
8687
87- - Clone this repository and install npm packages
88+ - Clone this repository and install yarn packages
89+ - Highly recommend to use node version >= 12
8890```
8991git clone https://github.com/ainblockchain/ain-blockchain.git
9092cd ain-blockchain/
9193yarn install
9294```
9395- Run blockchain nodes
9496```
95- MIN_NUM_VALIDATORS=3 ACCOUNT_INDEX=0 DEBUG=false STAKE=250 CONSOLE_LOG=true ENABLE_DEV_CLIENT_API=true node client/index.js
96- MIN_NUM_VALIDATORS=3 ACCOUNT_INDEX=1 DEBUG=false STAKE=250 CONSOLE_LOG=true ENABLE_DEV_CLIENT_API=true node client/index.js
97- MIN_NUM_VALIDATORS=3 ACCOUNT_INDEX=2 DEBUG=false STAKE=250 CONSOLE_LOG=true ENABLE_DEV_CLIENT_API=true node client/index.js
97+ MIN_NUM_VALIDATORS=3 ACCOUNT_INDEX=0 DEBUG=false STAKE=250 CONSOLE_LOG=true ENABLE_DEV_CLIENT_API=true ENABLE_GAS_FEE_WORKAROUND=true node client/index.js
98+ MIN_NUM_VALIDATORS=3 ACCOUNT_INDEX=1 DEBUG=false STAKE=250 CONSOLE_LOG=true ENABLE_DEV_CLIENT_API=true ENABLE_GAS_FEE_WORKAROUND=true node client/index.js
99+ MIN_NUM_VALIDATORS=3 ACCOUNT_INDEX=2 DEBUG=false STAKE=250 CONSOLE_LOG=true ENABLE_DEV_CLIENT_API=true ENABLE_GAS_FEE_WORKAROUND=true node client/index.js
98100```
99101You can override default port numbering system by setting ` PORT ` and ` P2P_PORT ` environment variables.
100102Before starting node jobs, remove existing blockchain files and logs if necessary:
@@ -105,17 +107,7 @@ The default minimum size of the validator whitelist is 3. Change MIN_NUM_VALIDAT
105107the genesis-configs/base/genesis.json to change this value. You may also need to modify the GENESIS_WHITELIST and GENESIS_VALIDATORS accordingly.
106108The genesis configs directory used is ` genesis-configs/base ` by default and it can be altered using ` GENESIS_CONFIGS_DIR ` env variable. For example, afan shard cluster can use the following command line:
107109```
108- GENESIS_CONFIGS_DIR=genesis-configs/afan-shard MIN_NUM_VALIDATORS=1 ACCOUNT_INDEX=0 DEBUG=false STAKE=250 CONSOLE_LOG=true ENABLE_DEV_CLIENT_API=true node client/index.js
109- ```
110-
111- ### How to run tests
112-
113- Please check your node version before running the below tests. Tests has passed node version 10.15.*
114-
115- ```
116- npm run test_unit
117- npm run test_smoke
118- npm run test_integration
110+ GENESIS_CONFIGS_DIR=genesis-configs/afan-shard MIN_NUM_VALIDATORS=1 ACCOUNT_INDEX=0 DEBUG=false STAKE=250 CONSOLE_LOG=true ENABLE_DEV_CLIENT_API=true ENABLE_GAS_FEE_WORKAROUND=true node client/index.js
119111```
120112
121113#### On Google Coud Platform (GCP)
@@ -130,7 +122,7 @@ sh deploy_blockchain_gcp.sh {dev|spring|summer} <YOUR_GCP_USER_NAME> <NUMBER_OF_
130122```
131123sh setup_blockchain_ubuntu.sh
132124```
133- - Copy files to a sharable folder & install npm packages
125+ - Copy files to a sharable folder & install yarn packages
134126```
135127source setup_node_gcp.sh
136128```
@@ -172,10 +164,29 @@ cat logger/logs/8080/<log_file>
172164
173165### How to run tests
174166
167+ Please check your node version before running the below tests. Tests has passed node version 12.*
168+
169+ How to run unit test and integration test all around.
175170```
176- npm run test_unit
177- npm run test_smoke
178- npm run test_integration
171+ yarn run test_unit
172+ yarn run test_integration
173+ ```
174+
175+ Some individual tests already definded in the package.json.
176+ ```
177+ yarn run test_chain_util
178+ yarn run test_state_util
179+ yarn run test_block_pool
180+ yarn run test_db
181+ yarn run test_node
182+ yarn run test_blockchain
183+ yarn run test_dapp
184+ yarn run test_sharding
185+ ```
186+
187+ The load test is also supported.
188+ ```
189+ yarn run loadtest
179190```
180191
181192### Client API for development and debugging
@@ -291,6 +302,13 @@ and can be stopped all at once using `stop_servers.sh` like:
291302sh stop_servers.sh
292303```
293304
305+ ## Versions
306+
307+ Please check the latest versions below:
308+ - API_VERSION: [ Release] ( https://github.com/ainblockchain/ain-blockchain/releases )
309+ - DATA_PROTOCOL_VERSION: [ README.md] ( ./p2p/README.md )
310+ - CONSENSUS_PROTOCOL_VERSION: [ README.md] ( ./consensus/README.md )
311+
294312## Contribution
295313
296314Please read the [ CONTRIBUTING.md] ( ./CONTRIBUTING.md ) for details on our code of conduct, and the process for submitting pull requests to us.
0 commit comments