- NodeJs >= 18 (use nvm)
- Fill the .env file with the correct values(see .env.example)
- Install dependencies
- Build the project
npm install
make clean && make
This checklist describes how to setup chain profiling
-
export RPC=<rpc endpoint>
-
export NUM_ACCOUNTS=<number of accounts to create>
-
export ACCOUNTS_DIR=<directory containing generated accounts>
-
export ACCOUNTS_PASSWORD=<password to unlock accounts>
- Create accounts for chain profiling
bin/chainprof chainprof accounts \
--accounts-dir $ACCOUNTS_DIR \
--num-accounts $NUM_ACCOUNTS \
--password $ACCOUNTS_PASSWORD \
--rpc $RPC
-
export KEY=<path to keyfile of account to fund>
-
export VALUE=<value to send to accounts>
- Send Transaction to fund accounts with Native Token
bin/chainprof account fund \
--rpc $RPC \
--keyfile $KEY \
--accounts-dir $ACCOUNTS_DIR \
--value $VALUE
Output: Transaction Hashes
-
export RECIPIENT=<address to send funds to>
- Send Transaction to Transfer all Native Token balance from created accounts to recipient
bin/chainprof account drain \
--rpc $RPC \
--send-to $RECIPIENT \
--accounts-dir $ACCOUNTS_DIR \
--password $ACCOUNTS_PASSWORD
Output: Transaction Hashes
-
export NUM_TRANSACTIONS=<number of transactions to send>
-
export CALLDATA=<calldata to send in transactions>
-
export OUTFILE=<output file to write results to>
-
export TO=<address to send transactions to>
-
export KEY=<path to keyfile of account to send transactions from>
- Send Transactions to evaluate chain performance
bin/chainprof chainprof evaluate \
--rpc $RPC \
--accounts-dir $ACCOUNTS_DIR \
--password $ACCOUNTS_PASSWORD \
--value $VALUE \
--transactions-per-account $NUM_TRANSACTIONS \
--calldata $CALLDATA \
--outfile $OUTFILE \
--to $TO
Output: Results written to file