Measure and compare the performance of different Ethereum WebSocket (WS) RPC providers by monitoring how quickly they broadcast new block events.
Developed by Aero25x.
- Connects to multiple Ethereum RPC WebSocket endpoints
- Subscribes to new block headers (
eth_subscribe) - Logs the time each provider receives a new block
- Ranks providers based on first notification time
- Provides block count statistics over a customizable duration
- CLI interface for test duration
-
Python 3.7+
-
Dependencies:
pip install websockets
Optional: Use a virtual environment for isolation:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activateOpen the script and edit the RPC_PROVIDERS list. Replace <API_KEY> placeholders with your actual keys:
RPC_PROVIDERS = [
RPCProvider(
name="Alchemy",
ws_url="wss://eth-mainnet.g.alchemy.com/v2/<API_KEY>"
),
...
]❗ Some providers require an API key or project ID. Make sure it's active and has WS access.
Run the script:
python rpc_speed_test.pyYou’ll be prompted to enter a test duration in minutes (default is 5). The script will then connect to each provider, listen for new blocks, and display the results.
🏆 RANKING BY FIRST BLOCK NOTIFICATION:
1. Alchemy
First block: #17945231
Total blocks received: 23
Delay from fastest: 0.000s
2. QuickNode
First block: #17945231
Total blocks received: 22
Delay from fastest: 0.224s
...
📊 SUMMARY:
Fastest provider: Alchemy
Total providers tested: 4
Average blocks received: 21.5
- Uses WebSocket connections to subscribe to
newHeads - Measures time of first block notification per provider
- Accumulates total block notifications over the duration
- Ranks and compares performance
- This tool is designed for educational and diagnostic purposes.
- Provider speeds may vary due to region, load, and network latency.
- Add or remove providers by modifying the
RPC_PROVIDERSlist.
Aero25x
📬 Telegram: @hidden_coding
This project is released under the MIT License. Feel free to use and modify it for your own benchmarking needs.
🏆 RANKING BY FIRST BLOCK NOTIFICATION:
----------------------------------------
_ _ _ _ _ _____ _
| | | (_) | | | | / ____| | |
| |__| |_ __| | __| | ___ _ __ | | ___ __| | ___
| __ | |/ _` |/ _` |/ _ \ '_ \| | / _ \ / _` |/ _ \
| | | | | (_| | (_| | __/ | | | |___| (_) | (_| | __/
|_| |_|_|\__,_|\__,_|\___|_| |_|\_____\___/ \__,_|\___|
SpeedTest by Aero25x
Join us to get more scripts
https://t.me/hidden_coding
1. QuickNode
First block: #23195245
Total blocks received: 5
Delay from fastest: 0.000s
2. Alchemy
First block: #23195245
Total blocks received: 5
Delay from fastest: 0.089s
📊 SUMMARY:
Fastest provider: QuickNode
Total providers tested: 2
Average blocks received: 5.0