Go to file
Godmode Galactus d169ff34a5
adding scripts to bench and plot data points
2023-05-16 18:41:29 +02:00
configure improving script to handle large number of users 2023-05-15 17:00:23 +02:00
src Updating bencher and stats 2023-05-16 16:10:10 +02:00
thirdparty Implementing openbook_v2 place orders in rust 2023-05-13 16:56:30 +02:00
.gitignore refactor to run from root and format 2023-05-14 21:44:47 +02:00
.gitmodules configuring users to trade on openbook 2023-05-11 20:12:31 +02:00
Cargo.lock refactor bencher to collect stats 2023-05-14 23:38:36 +02:00
Cargo.toml refactor bencher to collect stats 2023-05-14 23:38:36 +02:00
README.md refactor to run from root and format 2023-05-14 21:44:47 +02:00
bench-rpc-by-threads.sh adding scripts to bench and plot data points 2023-05-16 18:41:29 +02:00
deploy_contracts.sh serializing and deserializing config file correctly 2023-05-11 21:14:05 +02:00
package.json refactor to run from root and format 2023-05-14 21:44:47 +02:00
plot_data.py adding scripts to bench and plot data points 2023-05-16 18:41:29 +02:00
tsconfig.json fmt and package.json with other deps 2023-05-08 13:14:51 +05:30
yarn.lock remove npm lockfile 2023-05-14 19:51:26 +02:00

README.md

Solana RPC Testing

This repository aims stress / torture test the solana rpc server. This is done by sending multiple requests to the solana rpc and measure time to serve all the requests.

Please feel free to add more tests to the repository.

Current tests :

  1. getMultipleAccount : Creating multiple requests by N tasks to get 100 account. The accounts could be exisiting of non-existing.
  2. sendTransaction: Send a light weight memo transactions to the server.
  3. getSignatureStatuses: Get signature statuses for the light weight memo transactions.

Configuration

The cluster should be configured before testing. The configuraton script will deploy the necessary programs, create necessary accounts, create few payers and fund them some SOLs.

The configuration could be done using the script configure_all.ts.

Here are arguments required by the script, all the arguments are optional:

--url, -u <str>                 - RPC url [optional][default: http://127.0.0.1:8899]
--number-of-accounts <number>   - a number [optional][default: 1024]
--authority, -a <str>           - a string [optional][default: ~/.config/solana/id.json]
--number-of-payers, -p <number> - Number of payers used for testing [optional][default: 10]
--payer-balance, -b <number>    - Balance of payer in SOLs [optional][default: 1 SOLs]
--output-file, -o <str>         - a string [optional][default: configure/config.json]

Once the cluster configuration is successfully done we create a json file config.json

To configure cluster:

cd configure
yarn configure -a ../solana_configure_local_cluster/faucet.json
cd ..

Running tests

After compiling the rust code a seperate executable will be created to test the solana rpc. We can run individual tests either accounts-fetching or send-and-confirm-transaction or we can test all of them in parallel.

-c, --config-file <CONFIG_FILE>                  [default: configure/config.json]
    --accounts-fetching                          To test account fetching
    --send-and-confirm-transaction               To test send and confirm transactions
-a, --test-all                                   To test all
-r, --rpc-addr <RPC_ADDR>                        [default: http://127.0.0.1:8899]
-d, --duration-in-seconds <DURATION_IN_SECONDS>  [default: 60]

To run all the tests :

cargo run -- -a