From b8b19351ddd59cb4232acd7bc58a2b73f50c7e26 Mon Sep 17 00:00:00 2001 From: Godmode Galactus Date: Sat, 11 Mar 2023 09:51:55 +0100 Subject: [PATCH] Updating readme file --- README.md | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 39b0ec8..0d54788 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ -# Mango bencher - stress solana cluster by simulating mango markets +# Simulate Mango - test solana cluster by simulating mango markets This project is use to stress a solana cluster like devnet, testnet or local solana cluster by simulating mango markets. This code requires ids.json which describe mango group for a cluster and accounts.json file which has preconfigured user accounts in mango. +To create a new configuration for mango for your cluster please check the following project: + + The code then will create transaction request (q) requests per seconds for (n) seconds per perp market perp user. Each transaction request will contains remove following instruction CancelAllPerpOrders and two PlacePerpOrder (one for bid and another for ask). For the best results to avoid limits by quic it is better to fill the argument "identity" of a valid staked validator for the cluster you are testing with. @@ -10,55 +13,51 @@ For the best results to avoid limits by quic it is better to fill the argument " Clone repo ```sh -git clone https://github.com/godmodegalactus/mango_bencher -``` - -Update submodules -```sh -git submodule update --init --recursive -``` - -Set solana version in deps (replace v1.14.3 with require solana version) -```sh -cd deps/solana && git checkout v1.14.3 +https://github.com/blockworks-foundation/simulate_mango_v3.git ``` Build ```sh -cargo build -j8 +cargo build ``` ## Run ```sh -cargo run --bin solana-bench-mango -- -u http://localhost:8899 --identity authority.json --accounts accounts-20.json --mango ids.json --mango-cluster localnet --duration 10 -q 2 --transaction_save_file tlog.csv --block_data_save_file blog.csv +cargo run --bin solana-bench-mango -- -u http://localhost:8899 --identity validator-identity.json --keeper-authority authority.json --accounts accounts.json --mango ids.json --mango-cluster localnet --duration 10 -q 2 --transaction_save_file tlog.csv --block_data_save_file blog.csv ``` -help will give following results +Details for each argument: ``` USAGE: - solana-bench-mango [FLAGS] [OPTIONS] --accounts --mango + simulate-mango-v3 [OPTIONS] --accounts --mango FLAGS: - --airdrop-accounts Airdrop all MM accounts before stating - -h, --help Prints help information - -V, --version Prints version information + -h, --help Prints help information + -V, --version Prints version information OPTIONS: -a, --accounts Read account keys from JSON file generated with mango-client-v3 - -b, --block_data_save_file To save details of all block containing mm transactions + --batch-size If specified, transactions are send in batches of specified size + -b, --block-data-save-file To save details of all block containing mm transactions -C, --config Configuration file to use [default: /home/galactus/.config/solana/cli/config.yml] -d, --duration Seconds to run benchmark, then exit; default is forever -n, --entrypoint Rendezvous with the cluster at this entry point; defaults to 127.0.0.1:8001 - -i, --identity File containing a client identity (keypair) + -i, --identity Identity used in the QUIC connection. Identity with a lot of stake has a + better chance to send transaction to the leader -u, --url URL for Solana's JSON RPC or moniker (or their first letter): [mainnet- beta, testnet, devnet, localhost] + -k, --keeper-authority If specified, authority keypair would be used to pay for keeper + transactions -c, --mango-cluster Name of mango cluster from ids.json -m, --mango Read mango keys from JSON file generated with mango-client-v3 - -q, --qoutes_per_second Number of quotes per second - -t, --transaction_save_file To save details of all transactions during a run + --markets-per-mm Number of markets a market maker will trade on at a time + --prioritization-fees Takes percentage of transaction we want to add random prioritization fees + to, prioritization fees are random number between 100-1000 + -q, --quotes-per-second Number of quotes per second + -t, --transaction-save-file To save details of all transactions during a run --ws WebSocket URL for the solana cluster ```