Skip to content

HairyBoy/Solana-RPC-Performance-Monitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solana RPC Performance Monitor

This project compares the response time of multiple RPC endpoints and then plots the results on a graph. A live example site can be checked out here: https://monitor.solanavibestation.com

image

🚀 Features

  • Monitors multiple Solana RPCs concurrently (async, non-blocking)
  • Stores 1 hour of RPC metrics
  • Calculates RPC response time metrics and visualizes this data on a time chart
  • Web UI served with Axum (/static/index.html)

🛠 Installation & Setup

1️⃣ Clone the Repository

2️⃣ Install Rust (If Not Installed)

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Verify installation:

rustc --version
cargo --version

3️⃣ Install Dependencies

sudo apt install pkg-config
sudo apt install librust-openssl-dev
cargo build

⚙️ Configuration

Edit config.toml

Before running the project, configure the Solana RPC endpoints in config.toml Configure websocket endpoints as well, if desired:

[rpc]
endpoints = [
    { url = "https://api.mainnet-beta.solana.com", nickname = "Mainnet" },
    { url = "https://api.devnet.solana.com", nickname = "Devnet" },
    { url = "https://solana-api.projectserum.com", nickname = "ProjectSerum" },
    { url = "https://rpc.ankr.com/solana", nickname = "Ankr" }
]

[ws]
endpoints = [
    { url = 'ws://elite.swqos.solanavibestation.com/?api_key=<YOUR-API-KEY-GOES-HERE>', nickname = 'EliteStakedSVS' },
    { url = 'ws://basic.rpc.solanavibestation.com/?api_key=e<YOUR-API-KEY-GOES-HERE>', nickname = 'BasicSVS' },
]
  • You can add/remove endpoints as needed.
  • Each endpoint must have a nickname for easier identification.

▶️ Running the Program

Run the program with:

cargo run

It will start monitoring Solana RPCs and provide API access.

Example output:

Starting RPC monitoring...
Querying Mainnet: https://api.mainnet-beta.solana.com
Querying Devnet: https://api.devnet.solana.com
Querying ProjectSerum: https://solana-api.projectserum.com
Querying Ankr: https://rpc.ankr.com/solana
[Mainnet] Slot: 202832145, Blockhash: G6sj1rBdL2Kt... (120ms)
...
Server running on http://localhost:3000

📊 Web UI

A basic web interface is available at:

http://localhost:3000/static/index.html

🛠 Troubleshooting

rocksdb: IO error

Fix: Ensure the database directory is writable and restart the application.

Server not starting

Fix: Check if port 3000 is free or specify another:

📜 License

This project is licensed under the MIT License.


🤝 Contributing

Feel free to submit issues or pull requests to improve this project!


🔗 Resources


About

Solana RPC performance monitoring web GUI.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 56.5%
  • HTML 33.2%
  • JavaScript 10.3%