Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keep-starknet-strange/gomu-gomu-no-gatling
Blazing fast tool to benchmark Starknet sequencers 🦀
https://github.com/keep-starknet-strange/gomu-gomu-no-gatling
Last synced: 21 days ago
JSON representation
Blazing fast tool to benchmark Starknet sequencers 🦀
- Host: GitHub
- URL: https://github.com/keep-starknet-strange/gomu-gomu-no-gatling
- Owner: keep-starknet-strange
- License: mit
- Created: 2023-07-06T16:43:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-27T19:18:16.000Z (about 2 months ago)
- Last Synced: 2024-10-27T20:51:58.554Z (about 2 months ago)
- Language: Rust
- Size: 10.2 MB
- Stars: 21
- Watchers: 4
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starknet - Gomu Gomu no Gatling - Benchmark tools for sequencers. (Additional developer resources)
README
Gomu Gomu no Gatling
[![GitHub Workflow Status](https://github.com/keep-starknet-strange/gomu-gomu-no-gatling/actions/workflows/push.yml/badge.svg)](https://github.com/keep-starknet-strange/gomu-gomu-no-gatling/actions/workflows/push.yml)
[![Project license](https://img.shields.io/github/license/keep-starknet-strange/gomu-gomu-no-gatling.svg?style=flat-square)](LICENSE)
[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/keep-starknet-strange/gomu-gomu-no-gatling/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
[![Rust docs](https://docs.rs/anthropic/badge.svg)](https://docs.rs/gatling)
[![Rust crate](https://img.shields.io/crates/v/galing.svg)](https://crates.io/crates/gatling)[![Exploration_Team](https://img.shields.io/badge/Exploration_Team-29296E.svg?&style=for-the-badge&logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJhIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9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jYsMTUuMTVjLTMuMTEtLjc4LTYuMDktMS41NS05LjE5LTIuNTktMS43OC0uMzQtMy42MSwuMy00Ljc5LDEuNjhsLTEyLjk1LDEzLjg2Yy0uNzYsLjg1LTEuNDUsMS43Ni0yLjA3LDIuNzJoLS42NWMxLjMtNS4zMSwyLjcyLTEwLjYyLDQuMDEtMTUuOGwxLjY4LTYuNzNjLjg0LTIuMTgsLjE1LTQuNjUtMS42OC02LjA5bC0xMi45NS0xNC4xMmMtLjY0LS40NS0xLjE0LTEuMDgtMS40Mi0xLjgxbDE5LjA0LDUuMTgsMi41OSwuNzhjMi4wNCwuNzYsNC4zMywuMTQsNS43LTEuNTVsMTIuOTUtMTQuMzhzLjc4LTEuMDQsMS42OC0xLjE3Yy0xLjgxLDYuNi0yLjk4LDE0LjEyLTUuNDQsMjAuNDYtMS4wOCwyLjk2LS4wOCw2LjI4LDIuNDYsOC4xNiw0LjI3LDQuMTQsOC4yOSw4LjU1LDEyLjk1LDEyLjk1LDAsMCwxLjMsLjkxLDEuNDIsMi4wN2wtMTMuMzQtMy42M1oiLz48L3N2Zz4=)](https://github.com/keep-starknet-strange)
Blazing fast tool to benchmark Starknet sequencers 🦀.
## Installation
### From source
```bash
git clone https://github.com/keep-starknet-strange/gomu-gomu-no-gatling
cd gomu-gomu-no-gatling
cargo install --path .
```### From crates.io
```bash
cargo install --locked gatling
```### Run debug
```bash
RUST_LOG=debug cargo run -- shoot -c config/default.yaml
```## Usage
```bash
gatling --help
```For Katana, currently you need to increase the `DEFAULT_PREFUNDED_ACCOUNT_BALANCE` in constants to `0xffffffffffffffffffffffffffffffff`
and run the node with flag `--no-validate`.### Configuration
Gomu gomu's configuration is specified as a yaml file.
You can find example configurations under the [config](./config) folder.> As it uses the `config` crate under the hood, the configuration could be specified as any other file type such as TOML or JSON.
The configuration is defined by the following spec
- `rpc`
- `url`: Starknet RPC url, should be compliant with the specification
- `setup`
> `v0` and `v1` CAN'T be specified at the same time
- `erc20_contract`: ERC20 contract used to benchmark transfers
- `v0`: Path to Cairo Zero contract artifact
- `v1`:- `path`: Path to Cairo contract sierra artifact
- `casm_path`: Path to Cairo contract casm artifact- `erc721_contract`: ERC721 contract used to benchmark mints
...- `account_contract`: Account contract used to send transactions
...- `fee_token_address`: Contract address of the fee token on the target chain
- `num_accounts`: Number of accounts sending transactions- `run`
- `concurrency`: How many transactions to do simultaneously
- `shooter`: A list of write shooter benchmarks to run- `name`: The name of the shooter, must be either `transfer` or `mint`
- `shoot`: How many transactions to do- `read_benches`: A list of read benchmarks to run
- `name`: The name to write on the output report
- `num_requests`: How many times to call this request
- `method`: What method to call on the rpc node
- `parameters_location`: A file with a array of multiple parameters to use for requests- `report`
- `num_blocks`: Number of last blocks to take into account in the report
- `output_location`: Path to the file where to save the reports- `deployer`
- `salt`: Salt used to compute deployment addresses
- `address`: Address of the deployer account (should be pre-funded)
- `signing_key`: Private key of the deployer signer### Run a load test
```bash
gatling shoot -c config/default.yaml
```For read tests:
```bash
gatling read -c config/default.yaml
```### Output
The main output of gomu gomu is the report output location specified in specified in the configuration file.
At the end of all benchmarks gomu gomu will collect the results into a single json file with the following structure:
- `users`: The amount of goose users used to do the benchmarks, changed by `concurrency`
- `all_bench_report`: A report over all benchmarks done, has a portion of metrics that `benches` has
- `benches`: A array of reports for all benchmarks
- `name`: The name of the benchmark
- `amount`: How many times this benchmark was ran
- `metrics`: Metrics over the whole benchmark- `name`: The name of the metric
- `unit`: The unit of the metric, empty when there is no unit
- `value`: The metrics value, a number- For floats, `Infinite` and `NaN` are not JSON numbers and thus will be turned into `null`
- Values gotten from submission time are calculated from the latency to add a new transaction to the node
- Values gotten from verification time are calculated from the latency to get the transaction receipt after the transactions have been processed- `last_x_blocks_metrics`: Metrics over the last blocks of the benchmark
- `num_blocks`: The amount of last transactions that were measured
- `metrics`: An array of metrics- `extra`: Extra information for this run
Gomu gomu will also display into the console information about each step in the benchmark.
## Resources
- Gomu Gomu is originally inspired from [Flood](https://github.com/paradigmxyz/flood)
- (Aptos load-testing tool)[https://github.com/aptos-labs/aptos-multi-region-bench]
- (Starknet RPC specs)[https://github.com/starkware-libs/starknet-specs/blob/master/api/starknet_api_openrpc.json]## Contributors
Abdel @ StarkWare
💻
0xevolve
💻
Oak
💻
drspacemn
💻
Haroune | Quadratic
💻
Daniel Bejarano
💻
nbz
💻