Giter Site home page Giter Site logo

memobench's Introduction

memobench

Solana RPC benchmarking tool

This is a simple CLI tool that allows you to send transactions to an RPC endpoint and measure their success rate and confirmation time. The goal of this tool is to test the success rate of transactions landing on chain with any specified Solana RPC endpoint.

Note

Make sure you have enough SOL in your test account to cover the transaction fees.

Caution

This tool works by sending transactions to the blockchain, if configured with a high transaction count and/or high priority fees, it can lead to draining your test accounts. USE WITH CAUTION!

Usage

  • Download the latest release for your OS and architecture from the releases page.
  • Execute the binary in a command prompt or terminal.
    • Upon first execution it will create a sample config.json file and exit
    • Edit the config.json file as needed
  • Execute the binary again to start the benchmark

Configuration

  • private_key: The private key of the test account (in base58 format)
  • rpc_url: The RPC endpoint to benchmark
  • ws_url: The WS endpoint to listen for transactions (optional, if omitted, the RPC URL will be used)
  • send_rpc_url: The RPC endpoint to send transactions (optional, if omitted, the RPC URL will be used)
  • rate_limit: The rate limit (in requests per second)
  • tx_count: The number of transactions to send
  • prio_fee: The priority fee in Lamports per Compute Unit (optional, if omitted, no priority fee will be used)
  • node_retries: The number of retries the RPC will rebroadcast the transaction

Important

The priority fee is in lamports not microlamports

How does it work?

This tool works by sending a predefined number (tx_count) of unique transactions to the specified RPC (send_rpc_url or rpc_url). And count how many of them made it to the blockchain.

The transactions are sent all at once in parallel if possible, the tool will make sure to stay under the defined rate_limit to avoid getting 429 errors from the RPC.

The transactions sent are simple memo program transactions that each contain a unique memo in the form of memobench: Test <number> [<id>]. The <number> part is used to ensure the memo is unique and by extension the transaction is unique, the <id> part is used to differentiate between individual tests.

You like this tool ?

Buy me a coffee โ˜• CoffeeFpEteoCSPgHeoj98Sb6LCzoG36PGdRbYwqSvLd

or hire me ;)

Discord Badge Telegram Badge Protonmail Badge Github Badge

memobench's People

Contributors

benjiewheeler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.