https://github.com/flashbots/rbuilder-relay-measurement
A script to pull data for a specific block number and builder public key from the relay and compare them against those from the builder logs
https://github.com/flashbots/rbuilder-relay-measurement
Last synced: 29 days ago
JSON representation
A script to pull data for a specific block number and builder public key from the relay and compare them against those from the builder logs
- Host: GitHub
- URL: https://github.com/flashbots/rbuilder-relay-measurement
- Owner: flashbots
- Created: 2024-05-14T13:10:11.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T12:00:44.000Z (almost 2 years ago)
- Last Synced: 2025-02-25T15:16:46.339Z (over 1 year ago)
- Language: Python
- Size: 283 KB
- Stars: 1
- Watchers: 16
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rbuilder-relay-measurement
A script to pull data for a specific block number and builder public key from the relay and compare them against those from the builder logs
# Example for compare_builder_relay.py
```python compare_builder_relay.py 0xa1aa1ad4f2ad89f3cd2da667259022763ce7d22f75582fc824cd6cc8c56a89edb6a922e64ab95666f4bdeb2c309052ef 19867351 builder.json```
# Preparations
1. fetch the builder logs for the specific relay and preferably filter for a specific block number (see builder.json), for example
```
journalctl --since "1 hour ago" -u rbuilder -o cat | grep "\"relay\":\"ultrasound\"" | grep "\"message\":\"Block submitted to the relay successfully\"" > builder.json
```
2. run the script with the builders pubkey, block number and the builder.json that you extracted from the previous step.
# Example for compare_winenr.py
```python compare_winner.py 0xa1aa1ad4f2ad89f3cd2da667259022763ce7d22f75582fc824cd6cc8c56a89edb6a922e64ab95666f4bdeb2c309052ef```
# Example for analyse_slot.py
```python3 analyse_slot.py 0xa1aa1ad4f2ad89f3cd2da667259022763ce7d22f75582fc824cd6cc8c56a89edb6a922e64ab95666f4bdeb2c309052ef 9085513```
You can also optionally pass a base url to specify which relay you want to fetch the data from.
This script will internal call the ```fetch_slot_data.py```. It will fetch the data and put them into the folder ```slot_data``` to be later used in the analysis.