Skip to content

Commit

Permalink
jsutil: put all js utils in one file (#2748)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzckck authored Nov 5, 2024
1 parent caa9e79 commit 5b50dd0
Show file tree
Hide file tree
Showing 6 changed files with 282 additions and 336 deletions.
35 changes: 3 additions & 32 deletions cmd/jsutils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,9 @@ Install node.js dependency:
```shell script
npm install
```
## Run
### 1.Get Validator's Information: Version, MinGasPrice
mainnet validators version
```bash
npm run startMainnet
```
testnet validators version
```bash
npm run startTestnet
```

### 2.Get Transaction Count
```bash
node gettxcount.js --rpc ${url} --startNum ${start} --endNum ${end} --miner ${miner} (optional)
```

### 3. Get Performance
```bash
node get_perf.js --rpc ${url} --startNum ${start} --endNum ${end}
```
output as following
```bash
Get the performance between [ 19470 , 19670 )
txCountPerBlock = 3142.81 txCountTotal = 628562 BlockCount = 200 avgBlockTime = 3.005 inturnBlocksRatio = 0.975 justifiedBlocksRatio = 0.98
txCountPerSecond = 1045.8602329450914 avgGasUsedPerBlock = 250.02062627 avgGasUsedPerSecond = 83.20153952412646
## Run
Run according to the usage:
```
### 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}
node getchainstatus.js --help
```
51 changes: 0 additions & 51 deletions cmd/jsutils/check_blobtx.js

This file was deleted.

49 changes: 0 additions & 49 deletions cmd/jsutils/faucet_request.js

This file was deleted.

70 changes: 0 additions & 70 deletions cmd/jsutils/get_perf.js

This file was deleted.

Loading

0 comments on commit 5b50dd0

Please sign in to comment.