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
- 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)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shVerify installation:
rustc --version
cargo --versionsudo apt install pkg-config
sudo apt install librust-openssl-dev
cargo buildBefore running the project, configure the Solana RPC endpoints in config.toml:
[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" }
]
[server]
listen_ip = "0.0.0.0"
port = 3000
- You can add/remove endpoints as needed.
- Each endpoint must have a nickname for easier identification.
- You can set the ip and port or leave at default
Run the program with:
cargo runYou can overide the host with the below:
cargo run -- --listen-ip 127.0.0.1 --port 5000Use this for quick build:
cargo checkThen run:
cargo runIt 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
A basic web interface is available at:
http://localhost:3000/static/index.htmlFix: Ensure the database directory is writable and restart the application.
Fix: Check if port 3000 is free or specify another:
This project is licensed under the MIT License.
Feel free to submit issues or pull requests to improve this project!
