Go to file
Aniket Prajapati e5923753ae
Merge pull request #1 from blockworks-foundation/aniket_wip
Bencher with getBlock and getSlot
2023-05-11 18:57:11 +05:30
configure adding configuration for openbook-v2 2023-05-10 21:33:13 +02:00
src log fix 2023-05-11 18:47:14 +05:30
thirdparty adding configuration for openbook-v2 2023-05-10 21:33:13 +02:00
.gitignore wip 2023-05-11 18:41:03 +05:30
.gitmodules adding configuration for openbook-v2 2023-05-10 21:33:13 +02:00
Cargo.lock all 2023-05-11 18:41:06 +05:30
Cargo.toml all 2023-05-11 18:41:06 +05:30
README.md Update readme.md 2023-05-08 09:54:03 +02:00
deploy_contracts.sh adding configuration for openbook-v2 2023-05-10 21:33:13 +02:00
package.json wip 2023-05-11 18:41:03 +05:30
tsconfig.json fmt and package.json with other deps 2023-05-08 13:14:51 +05:30
yarn.lock wip 2023-05-11 18:41:03 +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: config.json]

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

To configure cluster:

cd configure
ts-node configure_all.ts -a /home/user/.config/solana/id.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