https://github.com/chainbound/mev-boost-relay-bids-py
https://github.com/chainbound/mev-boost-relay-bids-py
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/chainbound/mev-boost-relay-bids-py
- Owner: chainbound
- License: mit
- Created: 2024-01-17T16:19:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-17T17:55:11.000Z (over 2 years ago)
- Last Synced: 2025-01-24T06:29:47.298Z (over 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Relay Bids Retrieval
====================================
This Python script allows you to retrieve relay bids metadata from various relays using the `httpx` library. The script fetches data for a range of block numbers and saves it in a Parquet file. It is designed to work with a virtual environment to manage dependencies.
Installation
------------
To set up and run this script, follow these steps:
### 1\. Clone the Repository
Clone this repository to your local machine:
```
git clone https://github.com/your-username/relay-bids-retrieval.git
```
### 2\. Create a Virtual Environment
Navigate to the project directory and create a virtual environment:
```
cd relay-bids-retrieval python -m venv venv
```
Activate the virtual environment:
On macOS and Linux:
```
source venv/bin/activate
```
On Windows:
```
venv\Scripts\activate
```
### 3\. Install Required Packages
Install the required packages listed in `requirements.txt`:
```
pip install -r requirements.txt
```
### 4\. Configure the Script
Edit the `RELAYS` dictionary and other parameters within the `main.py` script to configure it according to your requirements.
You can also specify the number of concurrent requests by setting the `CONCURRENT_REQ` variable.
### 5\. Run the Script
Execute the `main.py` script with the following command, replacing `from_block`, `to_block` with your desired values:
```
python src/main.py from_block to_block
```
For example:
```
python main.py 100 200
```
This command will retrieve relay bids metadata for block numbers from 100 to 200 and save it to unique Parquet file per block_number in `outputs` folder.
Output
------
The script will log information about the progress and errors. It will save the retrieved data in Parquet format, splitting it into multiple files if the number of records exceeds a specified limit.