NethermindEth / entro

Library Interacting with Blockchains
MIT License
22 stars 1 forks source link

Error running entro backfill #7

Closed stranger80 closed 1 week ago

stranger80 commented 1 month ago

Env: Windows 11+Python 3.12, Ubuntu 20+Python 3.10

Running entro backfill starknet full-blocks --from-block 600000 --to-block 600500 --block-file=blocks.csv --transaction-file=transactions.csv --event-file=events.csv throws error after ca 60 blocks:


 ----  Unexpected Error Processing Blocks 600060 - 600070  ----
[
    'Traceback (most recent call last):\n',
    '  File "/home/mbarwicki/.local/lib/python3.10/site-packages/nethermind/entro/backfill/planner.py", line 191, in execute_backfill\n    batch_dataclasses = self.importer(\n',
    '  File "/home/mbarwicki/.local/lib/python3.10/site-packages/nethermind/entro/backfill/importers.py", line 29, in starknet_transaction_importer\n    return asyncio.run(_get_rpc_block_data())\n',
    '  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run\n    return loop.run_until_complete(main)\n',
    '  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete\n    return future.result()\n',
    '  File "/home/mbarwicki/.local/lib/python3.10/site-packages/nethermind/entro/backfill/importers.py", line 22, in _get_rpc_block_data\n    blocks, transactions, events = await get_blocks_with_txns(\n',
    '  File "/home/mbarwicki/.local/lib/python3.10/site-packages/nethermind/idealis/rpc/starknet/core.py", line 121, in get_blocks_with_txns\n    response_data: tuple[tuple[BlockResponse, list[TransactionResponse],
list[Event]]] = await asyncio.gather(\n',
    '  File "/home/mbarwicki/.local/lib/python3.10/site-packages/nethermind/idealis/rpc/starknet/core.py", line 111, in _get_block\n    block_json = await parse_eth_rpc_async_response(block_response)\n',
    '  File "/home/mbarwicki/.local/lib/python3.10/site-packages/nethermind/idealis/rpc/base/async_rpc.py", line 62, in parse_eth_rpc_async_response\n    return response_json["result"]\n',
    "KeyError: 'result'\n"
]
Backfill StarkNet Full Blocks ⠧ ━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  12% 0:00:05 0:00:41 Searched: 60/500 Searching Block: 600060
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f5aa9859c00>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f5aaa102d40>, 354.3663075), (<aiohttp.client_proto.ResponseHandler object at 0x7f5aaa100760>, 354.3667649)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f5aa9872d10>