Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get token The method trace_block does not exist/is not available #239

Open
sunysen opened this issue Mar 6, 2021 · 4 comments
Open

get token The method trace_block does not exist/is not available #239

sunysen opened this issue Mar 6, 2021 · 4 comments

Comments

@sunysen
Copy link

sunysen commented Mar 6, 2021

command

ethereumetl stream --start-block 11982481 -e token --log-file log.txt \
--provider-uri https://mainnet.infura.io/v3/7aef3f0cd1f64408b163814b22cc643c
2021-03-06 11:53:29,539 - root [ERROR] - An exception occurred while syncing block data.
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/blockchainetl/streaming/streamer.py", line 77, in _do_stream
    synced_blocks = self._sync_cycle()
  File "/usr/local/lib/python3.6/dist-packages/blockchainetl/streaming/streamer.py", line 98, in _sync_cycle
    self.blockchain_streamer_adapter.export_all(self.last_synced_block + 1, target_block)
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/streaming/eth_streamer_adapter.py", line 61, in export_all
    traces = self._export_traces(start_block, end_block)
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/streaming/eth_streamer_adapter.py", line 157, in _export_traces
    job.run()
  File "/usr/local/lib/python3.6/dist-packages/blockchainetl/jobs/base_job.py", line 30, in run
    self._end()
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/jobs/export_traces_job.py", line 104, in _end
    self.batch_work_executor.shutdown()
                                                                                                                                                                            1,1           Top
    synced_blocks = self._sync_cycle()
  File "/usr/local/lib/python3.6/dist-packages/blockchainetl/streaming/streamer.py", line 98, in _sync_cycle
    self.blockchain_streamer_adapter.export_all(self.last_synced_block + 1, target_block)
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/streaming/eth_streamer_adapter.py", line 61, in export_all
    traces = self._export_traces(start_block, end_block)
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/streaming/eth_streamer_adapter.py", line 157, in _export_traces
    job.run()
  File "/usr/local/lib/python3.6/dist-packages/blockchainetl/jobs/base_job.py", line 30, in run
    self._end()
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/jobs/export_traces_job.py", line 104, in _end
    self.batch_work_executor.shutdown()
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/executors/batch_work_executor.py", line 97, in shutdown
    self.executor.shutdown()
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/executors/fail_safe_executor.py", line 39, in shutdown
    self._check_completed_futures()
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/executors/fail_safe_executor.py", line 47, in _check_completed_futures
    future.result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/executors/batch_work_executor.py", line 63, in _fail_safe_execute
    work_handler(batch)
  File "/usr/local/lib/python3.6/dist-packages/ethereumetl/jobs/export_traces_job.py", line 89, in _export_batch
    json_traces = self.web3.parity.traceBlock(block_number)
  File "/usr/local/lib/python3.6/dist-packages/web3/parity.py", line 46, in traceBlock
    [block_identifier]
  File "/usr/local/lib/python3.6/dist-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'}
@medvedev1088
Copy link
Member

medvedev1088 commented Mar 6, 2021

Infura doesn't open this method unfortunately. You will need to run your own node or use something like https://www.quiknode.io/ if you need traces, contracts or tokens with stream

@sunysen
Copy link
Author

sunysen commented Mar 7, 2021

echo '{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}' | nc -U /data/eth/data/geth.ipc
{
	"jsonrpc": "2.0",
	"id": 1,
	"result": {
		"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"
	}
}
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/blockchainetl/streaming/streamer.py", line 77, in _do_stream
    synced_blocks = self._sync_cycle()
  File "/usr/local/lib/python3.6/site-packages/blockchainetl/streaming/streamer.py", line 98, in _sync_cycle
    self.blockchain_streamer_adapter.export_all(self.last_synced_block + 1, target_block)
  File "/usr/local/lib/python3.6/site-packages/ethereumetl/streaming/eth_streamer_adapter.py", line 61, in export_all
    traces = self._export_traces(start_block, end_block)
  File "/usr/local/lib/python3.6/site-packages/ethereumetl/streaming/eth_streamer_adapter.py", line 157, in _export_traces
    job.run()
  File "/usr/local/lib/python3.6/site-packages/blockchainetl/jobs/base_job.py", line 30, in run
    self._end()
  File "/usr/local/lib/python3.6/site-packages/ethereumetl/jobs/export_traces_job.py", line 104, in _end
    self.batch_work_executor.shutdown()
  File "/usr/local/lib/python3.6/site-packages/ethereumetl/executors/batch_work_executor.py", line 97, in shutdown
    self.executor.shutdown()
  File "/usr/local/lib/python3.6/site-packages/ethereumetl/executors/fail_safe_executor.py", line 39, in shutdown
    self._check_completed_futures()
  File "/usr/local/lib/python3.6/site-packages/ethereumetl/executors/fail_safe_executor.py", line 47, in _check_completed_futures
    future.result()
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/ethereumetl/executors/batch_work_executor.py", line 63, in _fail_safe_execute
    work_handler(batch)
  File "/usr/local/lib/python3.6/site-packages/ethereumetl/jobs/export_traces_job.py", line 89, in _export_batch
    json_traces = self.web3.parity.traceBlock(block_number)
  File "/usr/local/lib/python3.6/site-packages/web3/parity.py", line 46, in traceBlock
    [block_identifier]
  File "/usr/local/lib/python3.6/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'}

To build a node, do I have to use parity,Why do you need to use the trace_block method to get the token

@kdoda
Copy link

kdoda commented Mar 18, 2022

@sunysen did you ever find a solution to your issue?

@theweilu
Copy link

Is streaming contracts only possible through using a parity node? It seems so by looking at the Traceback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants