ethereum-etl
ethereum-etl copied to clipboard
export_all "RetriableValueError ... Make sure Ethereum node is synced"
When attempting to export the first million blocks in blocks of 100,000, the blocks and transactions exported fine, but when attempting to export the receipts, an unrecoverable exception occurs (and repeats itself a few dozen times as the exporter attempts to retry and fails). The exception is:
2021-06-24 17:10:29,801 - export_all [INFO] - Exporting receipts and logs from blocks 00000000-00099999 to /mnt/datalake/ethereum/receipts/start_block=00000000/end_block=00099999/receipts_00000000_00099999.csv and /mnt/datalake/ethereum/logs/start_block=00000000/end_block=00099999/logs_00000000_00099999.csv
2021-06-24 17:10:29,902 - ProgressLogger [INFO] - Started work.
2021-06-24 17:10:30,179 - BatchWorkExecutor [ERROR] - An exception occurred while executing work_handler.
Traceback (most recent call last):
File "/code/ethereum-etl/ethereumetl/executors/batch_work_executor.py", line 63, in _fail_safe_execute
work_handler(batch)
File "/code/ethereum-etl/ethereumetl/jobs/export_receipts_job.py", line 69, in _export_receipts
receipts = [self.receipt_mapper.json_dict_to_receipt(result) for result in results]
File "/code/ethereum-etl/ethereumetl/jobs/export_receipts_job.py", line 69, in <listcomp>
receipts = [self.receipt_mapper.json_dict_to_receipt(result) for result in results]
File "/code/ethereum-etl/ethereumetl/utils.py", line 71, in rpc_response_batch_to_results
yield rpc_response_to_result(response_item)
File "/code/ethereum-etl/ethereumetl/utils.py", line 82, in rpc_response_to_result
raise RetriableValueError(error_message)
ethereumetl.misc.retriable_value_error.RetriableValueError: result is None in response {'jsonrpc': '2.0', 'id': 0, 'result': None}. Make sure Ethereum node is synced.
The exact command I'm using is:
ethereumetl export_all -s 0 -e 1000000 -b 100000 -p http://10.1.102.239:8545 -o output
When I attach to the geth node on 10.1.102.239, I can see that it's syncing:
$ geth attach
Welcome to the Geth JavaScript console!
instance: Geth/v1.10.4-stable-aa637fd3/linux-amd64/go1.16.5
at block: 0 (Thu Jan 01 1970 00:00:00 GMT+0000 (UTC))
datadir: /root/.ethereum
modules: admin:1.0 debug:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
To exit, press ctrl-d
> eth.syncing
{
currentBlock: 12697817,
highestBlock: 12697882,
knownStates: 0,
pulledStates: 0,
startingBlock: 12686155
}
> ^D
I'm not as familiar with geth as I'd like, so I'm not sure if my chain sync has been corrupted or something. This node is used for nothing other than syncing from the mainnet.
Any idea why I'm getting the message Make sure Ethereum node is synced.? Any way to recover?
When attempting to export the first million blocks in blocks of 100,000, the blocks and transactions exported fine, but when attempting to export the receipts, an unrecoverable exception occurs (and repeats itself a few dozen times as the exporter attempts to retry and fails). The exception is:
2021-06-24 17:10:29,801 - export_all [INFO] - Exporting receipts and logs from blocks 00000000-00099999 to /mnt/datalake/ethereum/receipts/start_block=00000000/end_block=00099999/receipts_00000000_00099999.csv and /mnt/datalake/ethereum/logs/start_block=00000000/end_block=00099999/logs_00000000_00099999.csv 2021-06-24 17:10:29,902 - ProgressLogger [INFO] - Started work. 2021-06-24 17:10:30,179 - BatchWorkExecutor [ERROR] - An exception occurred while executing work_handler. Traceback (most recent call last): File "/code/ethereum-etl/ethereumetl/executors/batch_work_executor.py", line 63, in _fail_safe_execute work_handler(batch) File "/code/ethereum-etl/ethereumetl/jobs/export_receipts_job.py", line 69, in _export_receipts receipts = [self.receipt_mapper.json_dict_to_receipt(result) for result in results] File "/code/ethereum-etl/ethereumetl/jobs/export_receipts_job.py", line 69, in <listcomp> receipts = [self.receipt_mapper.json_dict_to_receipt(result) for result in results] File "/code/ethereum-etl/ethereumetl/utils.py", line 71, in rpc_response_batch_to_results yield rpc_response_to_result(response_item) File "/code/ethereum-etl/ethereumetl/utils.py", line 82, in rpc_response_to_result raise RetriableValueError(error_message) ethereumetl.misc.retriable_value_error.RetriableValueError: result is None in response {'jsonrpc': '2.0', 'id': 0, 'result': None}. Make sure Ethereum node is synced.
The exact command I'm using is:
ethereumetl export_all -s 0 -e 1000000 -b 100000 -p http://10.1.102.239:8545 -o output
When I attach to the geth node on 10.1.102.239, I can see that it's syncing:
$ geth attach Welcome to the Geth JavaScript console! instance: Geth/v1.10.4-stable-aa637fd3/linux-amd64/go1.16.5 at block: 0 (Thu Jan 01 1970 00:00:00 GMT+0000 (UTC)) datadir: /root/.ethereum modules: admin:1.0 debug:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0 To exit, press ctrl-d > eth.syncing { currentBlock: 12697817, highestBlock: 12697882, knownStates: 0, pulledStates: 0, startingBlock: 12686155 } > ^D
I'm not as familiar with geth as I'd like, so I'm not sure if my chain sync has been corrupted or something. This node is used for nothing other than syncing from the mainnet.
Any idea why I'm getting the message Make sure Ethereum node is synced.? Any way to recover?
Have you solved this problem? I have the same problem now
From the docs:
- You can export blocks below currentBlock, there is no need to wait until the full sync as the state is not needed (unless you also need contracts bytecode and token details; for those you need to wait until the full sync).
I just hit this - it looks like Geth stopped indexing old transactions, so older blocks were returning null receipts 100% of the time. You can disable this in Geth with --txlookuplimit=0
. See here for more details: https://www.reddit.com/r/ethdev/comments/mq2fsq/geth_node_in_fast_mode_returns_null_for_existing/
I'm still seeing this problem as well even with setting txlookuplimit
My mistake, I think it just takes a long time before geth loads all of the older transactions. I'll wait a couple hours and followup.
Works now! To be reiterate 1) Restart Geth with txlookuplimit=0 and let it sit for a couple hrs 2) Run the export job