2023-12-08 08:44:16 +03:00
|
|
|
## Requirement
|
|
|
|
|
2024-01-19 11:44:56 +03:00
|
|
|
- nodejs >= v16.20.2
|
|
|
|
- npm >= v8.19.4
|
2023-12-08 08:44:16 +03:00
|
|
|
|
|
|
|
## Prepare
|
|
|
|
Recommend use [nvm](https://github.com/nvm-sh/nvm) to manage node version.
|
|
|
|
|
|
|
|
Install node.js dependency:
|
|
|
|
```shell script
|
|
|
|
npm install
|
|
|
|
```
|
|
|
|
## Run
|
2024-03-21 06:35:16 +03:00
|
|
|
### 1.Get Validator's Information: Version, MinGasPrice
|
2023-12-08 08:44:16 +03:00
|
|
|
mainnet validators version
|
|
|
|
```bash
|
|
|
|
npm run startMainnet
|
|
|
|
```
|
|
|
|
testnet validators version
|
|
|
|
```bash
|
|
|
|
npm run startTestnet
|
|
|
|
```
|
2024-03-21 06:35:16 +03:00
|
|
|
|
|
|
|
### 2.Get Transaction Count
|
2023-12-08 08:44:16 +03:00
|
|
|
```bash
|
2024-01-19 11:44:56 +03:00
|
|
|
node gettxcount.js --rpc ${url} --startNum ${start} --endNum ${end} --miner ${miner} (optional)
|
2024-06-28 08:48:17 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
### 3. Get Performance
|
|
|
|
```bash
|
|
|
|
node get_perf.js --rpc ${url} --startNum ${start} --endNum ${end}
|
|
|
|
```
|
|
|
|
output as following
|
|
|
|
```bash
|
|
|
|
Get the performance between [ 19470 , 19670 )
|
2024-07-19 05:20:53 +03:00
|
|
|
txCountPerBlock = 3142.81 txCountTotal = 628562 BlockCount = 200 avgBlockTime = 3.005 inturnBlocksRatio = 0.975 justifiedBlocksRatio = 0.98
|
2024-06-28 08:48:17 +03:00
|
|
|
txCountPerSecond = 1045.8602329450914 avgGasUsedPerBlock = 250.02062627 avgGasUsedPerSecond = 83.20153952412646
|
2024-07-08 17:37:05 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
### 4. Get validators slash count
|
|
|
|
```bash
|
|
|
|
use the latest block
|
|
|
|
node getslashcount.js --Rpc ${ArchiveRpc}
|
|
|
|
use a block number
|
|
|
|
node getslashcount.js --Rpc ${ArchiveRpc} --Num ${blockNum}
|
|
|
|
```
|
|
|
|
|