mev-boost-py
Python wrapper for querying mev-boost data. This tool provides easy access to Ethereum proposer payload data from Flashbots relays, allowing users to query both "holesky" and "mainnet" networks. It supports fetching data for specific slot ranges or the most recent slots. This is most useful for streaming the most recent 200 mev-boost slots directly to a json file.
Features
- Fetch proposer payloads from Flashbots relays
- Supports both "holesky" and "mainnet" networks
- Specify slot ranges or fetch the most recent data
- Save data to JSON files for flexible analysis
Installation
To install mev-boost-py, use pip pip install mev-boost-py
Usage Instructions:
Run from CLI:
python src/mev_boost_py/proposer_payload.py --network mainnet --start_slot 2447969 --end_slot 2448969 --directory output_folder
This command will fetch proposer payloads from the "mainnet" network for the specified slot range and save them in the "output_folder". If output_folder is not specified, it will default to "data" folder.
Run from Python Code:
from mev_boost_py.proposer_payload import ProposerPayloadFetcher, Network
# Create an instance with the desired configuration
fetcher = ProposerPayloadFetcher(
network=Network.HOLESKY,
start_slot=2447969,
end_slot=2448969,
directory="output_folder"
)
# Execute the fetch operation
fetcher.run()
Example Json File:
{
"slot": 2447969,
"parent_hash": "0x...",
"block_hash": "0x...",
"builder_pubkey": "0x...",
"proposer_pubkey": "0x...",
"proposer_fee_recipient": "0x...",
"gas_limit": 30000000,
"gas_used": 21000,
"value": 1000000000000000000,
"num_tx": 1,
"block_number": 12345678
},
...
]
Example DataFrame Output:
Schema:
Schema({'slot': String, 'parent_hash': String, 'block_hash': String, 'builder_pubkey': String, 'proposer_pubkey': String, 'proposer_fee_recipient': String, 'gas_limit': String, 'gas_used': String, 'value': String, 'num_tx': String, 'block_number': String})
Data:
│ slot ┆ parent_hash ┆ block_hash ┆ builder_pubkey ┆ … ┆ gas_used ┆ value ┆ num_tx ┆ block_number │
│ --- ┆ --- ┆ --- ┆ --- ┆ ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ str ┆ ┆ str ┆ str ┆ str ┆ str │
╞═════════╪═════════════════════════════════╪═════════════════════════════════╪═════════════════════════════════╪═══╪══════════╪═══════════════════╪════════╪══════════════╡
│ 2451003 ┆ 0x3739ec860534152c1c16c0fe375e… ┆ 0xc52774ef565609df07506bc4693c… ┆ 0xa3ad1da9373ae97c21274629668d… ┆ … ┆ 5874398 ┆ 9193837799832420 ┆ 39 ┆ 2258300 │
│ 2450989 ┆ 0xf7cab7c264373654e233db6a6124… ┆ 0x17b6a32b12b617b97867c6da88e1… ┆ 0x8cafae64383b537561650b2e3893… ┆ … ┆ 3558221 ┆ 9013912242542186 ┆ 19 ┆ 2258287 │
│ 2450982 ┆ 0x326c13991cf5b4ac6708be98ff15… ┆ 0x274271bb3c0b60c9fd99b05e51ae… ┆ 0x9400cb1e7c0fa7120ea0e4a7fcce… ┆ … ┆ 5751748 ┆ 18445048399967342 ┆ 35 ┆ 2258281 │
│ 2450974 ┆ 0xb0587362a27183e4a0e67a76fd81… ┆ 0x3e5776f98ccd447f478b150b7c7e… ┆ 0xa3ad1da9373ae97c21274629668d… ┆ … ┆ 4211778 ┆ 6062918999738481 ┆ 29 ┆ 2258274 │
│ 2450966 ┆ 0x24148e3b1ae003c5cb981653fd62… ┆ 0x7a8e508c671808cf25c835a67632… ┆ 0x9400cb1e7c0fa7120ea0e4a7fcce… ┆ … ┆ 4765098 ┆ 16225500999853000 ┆ 32 ┆ 2258267 │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ 2449791 ┆ 0x99a3d7228237038aff3b0f7cd55d… ┆ 0xfc224a4d9c0b84b35f6a55274124… ┆ 0x8cafae64383b537561650b2e3893… ┆ … ┆ 5308725 ┆ 18187345999853000 ┆ 31 ┆ 2257186 │
│ 2449787 ┆ 0x34d567e910b719e2a8fe0796b85a… ┆ 0x132fedf886b25e9018ee50f1ba58… ┆ 0x8cafae64383b537561650b2e3893… ┆ … ┆ 4510283 ┆ 17028919999853000 ┆ 29 ┆ 2257182 │
│ 2449776 ┆ 0x0606e5fdb340780a5a0e53ad7a6f… ┆ 0x387f87adfdc8e9f027c9b89d5c05… ┆ 0x9400cb1e7c0fa7120ea0e4a7fcce… ┆ … ┆ 7415437 ┆ 15136000097096026 ┆ 47 ┆ 2257171 │
│ 2449763 ┆ 0x6a5fec654d5c46905031a1e49455… ┆ 0x3fe0bc5893a0e7950426fbd018aa… ┆ 0x9400cb1e7c0fa7120ea0e4a7fcce… ┆ … ┆ 1347531 ┆ 12233676999853000 ┆ 10 ┆ 2257160 │
│ 2449762 ┆ 0x33ee162a56062162d337e71be7a5… ┆ 0x6a5fec654d5c46905031a1e49455… ┆ 0x9400cb1e7c0fa7120ea0e4a7fcce… ┆ … ┆ 4844588 ┆ 17795490999853000 ┆ 27 ┆ 2257159 │
└─────────┴─────────────────────────────────┴─────────────────────────────────┴─────────────────────────────────┴───┴──────────┴───────────────────┴────────┴──────────────┘
Metadata
Release files for mev-boost-py 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mev_boost_py-0.1.2.tar.gz | 11.3 kB | Without provenance | Details for mev_boost_py-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mev_boost_py-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for mev_boost_py-0.1.2-py3-none-any.whl |
Total release size: 18.1 kB
Release files / mev_boost_py-0.1.2.tar.gz
| Download URL | mev_boost_py-0.1.2.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e1c032288b1c5c4f859c6f21aebd25e50f5b9b178b240e9809e28e7805da849
|
|
BLAKE2b-256 checksum How to use checksums |
614aa74b8ba27180a3b4e7489495a696c03e13c01a46a8dc14695d1a2849597d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / mev_boost_py-0.1.2-py3-none-any.whl
| Download URL | mev_boost_py-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
165137c6b8a487579c5eb67852c655f721288d3f7b78c142febd8f1972ef56bc
|
|
BLAKE2b-256 checksum How to use checksums |
7a3ad92f89cfb0cb690a2630895b284807676a4de262ce0b3465101fdad1d1bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for mev-boost-py 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.