Mev-inspect-py RPC URL requirements

thanks so much for the list! do you know if mev-inspect-py requires running an eth node? I’m a little bit confused about what the RPC_URL needs to be, thanks!

β€œmev-inspect-py currently requires an RPC with support for OpenEthereum / Erigon traces (not geth)”, this can be found at the Install Guidelines

If you don’t have access to an archive node, you can use some service like QuickNode.

This is also a good resource to have a better understanding: Flashbots: mev-inspect-py walkthrough

2 Likes

Has anyone tried to use an RPC_URL through an SSH tunnel? I have an Erigon node running in the cloud and am trying to connect though an SSH Tunnel and getting access errors.

My command line output:

alexmead@Alexs-MacBook-Air-2 mev-inspect-py % ./mev inspect 12914944
Inspecting block 12914944
Skipping virtualenv creation, as specified in config file.
ERROR:mev_inspect.retry:Request for method eth_getBlockByNumber, params: (β€˜0xc51100’, False), retrying: 0/5
ERROR:mev_inspect.retry:Request for method eth_getBlockReceipts, params: (12914944,), retrying: 0/5
ERROR:mev_inspect.retry:Request for method trace_block, params: (β€˜0xc51100’,), retrying: 0/5
ERROR:mev_inspect.retry:Request for method eth_feeHistory, params: (1, β€˜0xc51100’, None), retrying: 0/5
ERROR:mev_inspect.retry:Request for method eth_getBlockByNumber, params: (β€˜0xc51100’, False), retrying: 1/5
ERROR:mev_inspect.retry:Request for method eth_getBlockReceipts, params: (12914944,), retrying: 1/5
ERROR:mev_inspect.retry:Request for method trace_block, params: (β€˜0xc51100’,), retrying: 1/5
ERROR:mev_inspect.retry:Request for method eth_feeHistory, params: (1, β€˜0xc51100’, None), retrying: 1/5
ERROR:mev_inspect.retry:Request for method eth_feeHistory, params: (1, β€˜0xc51100’, None), retrying: 2/5
ERROR:mev_inspect.retry:Request for method eth_getBlockReceipts, params: (12914944,), retrying: 2/5
ERROR:mev_inspect.retry:Request for method trace_block, params: (β€˜0xc51100’,), retrying: 2/5
ERROR:mev_inspect.retry:Request for method eth_getBlockByNumber, params: (β€˜0xc51100’, False), retrying: 2/5
ERROR:mev_inspect.retry:Request for method trace_block, params: (β€˜0xc51100’,), retrying: 3/5
ERROR:mev_inspect.retry:Request for method eth_getBlockByNumber, params: (β€˜0xc51100’, False), retrying: 3/5
ERROR:mev_inspect.retry:Request for method eth_feeHistory, params: (1, β€˜0xc51100’, None), retrying: 3/5
ERROR:mev_inspect.retry:Request for method eth_getBlockReceipts, params: (12914944,), retrying: 3/5
ERROR:mev_inspect.retry:Request for method eth_getBlockByNumber, params: (β€˜0xc51100’, False), retrying: 4/5
Traceback (most recent call last):
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/aiohttp/connector.py”, line 985, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File β€œ/usr/local/lib/python3.9/asyncio/base_events.py”, line 1065, in create_connection
raise exceptions[0]
File β€œ/usr/local/lib/python3.9/asyncio/base_events.py”, line 1050, in create_connection
sock = await self._connect_sock(
File β€œ/usr/local/lib/python3.9/asyncio/base_events.py”, line 961, in _connect_sock
await self.sock_connect(sock, address)
File β€œ/usr/local/lib/python3.9/asyncio/selector_events.py”, line 500, in sock_connect
return await fut
File β€œ/usr/local/lib/python3.9/asyncio/selector_events.py”, line 535, in _sock_connect_cb
raise OSError(err, f’Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed (β€˜127.0.0.1’, 8545)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File β€œβ€, line 1, in
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/click/core.py”, line 1137, in call
return self.main(*args, **kwargs)
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/click/core.py”, line 1062, in main
rv = self.invoke(ctx)
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/click/core.py”, line 763, in invoke
return __callback(*args, **kwargs)
File β€œ/app/mev_inspect/concurrency.py”, line 18, in wrapper
loop.run_until_complete(f(*args, **kwargs))
File β€œ/usr/local/lib/python3.9/asyncio/base_events.py”, line 647, in run_until_complete
return future.result()
File β€œ/app/cli.py”, line 45, in inspect_block_command
await inspector.inspect_single_block(
File β€œ/app/mev_inspect/inspector.py”, line 56, in inspect_single_block
return await inspect_block(
File β€œ/app/mev_inspect/inspect_block.py”, line 68, in inspect_block
await inspect_many_blocks(
File β€œ/app/mev_inspect/inspect_block.py”, line 105, in inspect_many_blocks
block = await create_from_block_number(
File β€œ/app/mev_inspect/block.py”, line 31, in create_from_block_number
block_timestamp, receipts, traces, base_fee_per_gas = await asyncio.gather(
File β€œ/app/mev_inspect/block.py”, line 60, in _find_or_fetch_block_timestamp
return await _fetch_block_timestamp(w3, block_number)
File β€œ/app/mev_inspect/block.py”, line 105, in _fetch_block_timestamp
block_json = await w3.eth.get_block(block_number)
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/web3/eth.py”, line 298, in get_block
return await self._get_block(block_identifier, full_transactions) # type: ignore
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/web3/module.py”, line 72, in caller
result = await w3.manager.coro_request(method_str,
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/web3/manager.py”, line 202, in coro_request
response = await self._coro_make_request(method, params)
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/web3/manager.py”, line 157, in _coro_make_request
return await request_func(method, params)
File β€œ/app/mev_inspect/retry.py”, line 60, in middleware
return await make_request(method, params)
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/web3/providers/async_rpc.py”, line 73, in make_request
raw_response = await async_make_post_request(
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/web3/_utils/request.py”, line 59, in async_make_post_request
async with session.post(endpoint_uri,
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/aiohttp/client.py”, line 1140, in aenter
self._resp = await self._coro
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/aiohttp/client.py”, line 535, in _request
conn = await self._connector.connect(
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/aiohttp/connector.py”, line 543, in connect
proto = await self._create_connection(req, traces, timeout)
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/aiohttp/connector.py”, line 906, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/aiohttp/connector.py”, line 1205, in _create_direct_connection
raise last_exc
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/aiohttp/connector.py”, line 1174, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File β€œ/home/flashbot/.local/lib/python3.9/site-packages/aiohttp/connector.py”, line 991, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:8545 ssl:default [Connect call failed (β€˜127.0.0.1’, 8545)]
command terminated with exit code 1