Go to file
Godmode Galactus cd625f97e1
Merge branch 'main' into feature
2023-07-03 15:04:06 +02:00
configure size fixed 2023-07-03 05:52:14 +05:30
src size fixed 2023-07-03 05:52:14 +05:30
thirdparty Implementing openbook_v2 place orders in rust 2023-05-13 16:56:30 +02:00
.gitignore ignore metrics 2023-07-03 05:52:46 +05:30
.gitmodules configuring users to trade on openbook 2023-05-11 20:12:31 +02:00
Cargo.lock custom rpc 2023-06-14 07:55:55 +05:30
Cargo.toml custom rpc 2023-06-14 07:55:55 +05:30
README.md refactor to run from root and format 2023-05-14 21:44:47 +02:00
bench-rpc-by-threads.sh 200 threads and run in release 2023-06-15 19:32:18 +05:30
compare_results_and_plot_data.py changes in comparing results 2023-06-09 11:32:31 +02:00
deploy_contracts.sh serializing and deserializing config file correctly 2023-05-11 21:14:05 +02:00
jest.config.js ws test 2023-06-06 16:22:39 +05:30
package.json ws test 2023-06-06 16:22:39 +05:30
plot_data.py adding scripts to bench and plot data points 2023-05-16 18:41:29 +02:00
run_bench.sh size fixed 2023-07-03 05:52:14 +05:30
tsconfig.json fmt and package.json with other deps 2023-05-08 13:14:51 +05:30
ws.test.ts ws test 2023-06-06 16:22:39 +05:30
yarn.lock ws test 2023-06-06 16:22:39 +05:30

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