ethereum-etl icon indicating copy to clipboard operation
ethereum-etl copied to clipboard

Problem when run export_traces command of ethereum-etl

Open xingyushu opened this issue 3 years ago • 3 comments

ethereum-etl  1.10.0
python 3.8
go-ethereum 1.10.12

When I run the method of export_traces :


  ethereumetl export_traces --start-block 0 --end-block 500000 --provider-uri file://$HOME/geth-1.12/geth.ipc --output traces.csv

I met the error:

Traceback (most recent call last): File "/home/alice/.local/bin/ethereumetl", line 8, in <module> sys.exit(cli()) File "/home/alice/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/alice/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/alice/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/alice/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/alice/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/cli/export_traces.py", line 66, in export_traces job.run() File "/home/alice/.local/lib/python3.8/site-packages/blockchainetl/jobs/base_job.py", line 30, in run self._end() File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/jobs/export_traces_job.py", line 105, in _end self.batch_work_executor.shutdown() File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/executors/batch_work_executor.py", line 97, in shutdown self.executor.shutdown() File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/executors/fail_safe_executor.py", line 39, in shutdown self._check_completed_futures() File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/executors/fail_safe_executor.py", line 47, in _check_completed_futures future.result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result return self.__get_result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result raise self._exception File "/home/alice/.local/lib/python3.8/site-packages/blockchainetl/jobs/base_job.py", line 28, in run self._export() File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/jobs/export_traces_job.py", line 65, in _export self.batch_work_executor.execute( File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/executors/batch_work_executor.py", line 59, in execute self.executor.submit(self._fail_safe_execute, work_handler, batch) File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/executors/fail_safe_executor.py", line 31, in submit self._check_completed_futures() File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/executors/fail_safe_executor.py", line 47, in _check_completed_futures future.result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result return self.__get_result() File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result raise self._exception File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/executors/batch_work_executor.py", line 63, in _fail_safe_execute work_handler(batch) File "/home/alice/.local/lib/python3.8/site-packages/ethereumetl/jobs/export_traces_job.py", line 89, in _export_batch json_traces = self.web3.parity.traceBlock(block_number) File "/home/alice/.local/lib/python3.8/site-packages/web3/parity.py", line 44, in traceBlock return self.web3.manager.request_blocking( File "/home/alice/.local/lib/python3.8/site-packages/web3/manager.py", line 112, in request_blocking raise ValueError(response["error"]) ValueError: {'code': -32601, 'message': 'the method trace_block does not exist/is not available'}

Is the export_traces exclude from ethereumetl?Or what is the problem when I run the command?Thanks

xingyushu avatar Jan 08 '22 13:01 xingyushu

Try ethereumetl export_geth_traces command

medvedev1088 avatar Jan 08 '22 14:01 medvedev1088

Try ethereumetl export_geth_traces command

when I try:

ethereumetl export_geth_traces --start-block 13402955 --end-block 13588188 --provider-uri http://localhost:8545/ --batch-size 5 --output geth_traces1028.json

I also met the problem:

ValueError: result is None in response {'jsonrpc': '2.0', 'id': 0, 'error': {'code': -32601, 'message': 'the method debug_traceBlockByNumber does not exist/is not available'}}.

How can I fix it ?Thanks

xingyushu avatar Jan 09 '22 08:01 xingyushu

use ipc path in provider-uri or you have to enable debug namespaces in http-api to get debug methods

GauthamramRavichandran avatar Jun 24 '22 09:06 GauthamramRavichandran