Tweaking fetchers

Greetings, I have followed instructions for manual installations and I am successfully running an explorer on Digital Ocean.

However, on the console I keep seeing failed to fetch internal transactions for blocks: econnrefused error. I tried tweaking the batch size on file /apps/indexer/lib/indexer/fetcher/internal_transaction.ex howerver the error is still there if though I set both values to 1. And it keeps logging maybe 200 entries per second (it doesn’t timeout).

This error causes my explorer page to constantly show Indexing Tokens - We're indexing this chain right now. Some of the counts may be inaccurate. error.

How do I get around this indexer timeout? I am currently using http RPC endpoints, should I switch to web socket?

Hi, what archive node did you set up for the explorer? Is this Geth, Open Ethereum, or Nethermind? Did you enable traces on the archive node? I am posting here the recommended parameters for different kinds of archive nodes just in case: Client Settings (Parity, OpenEthereum, Hyperledger Besu, Geth, Ganache) - BlockScout.

I was using Besu instance with ENV variable set as export ETHEREUM_JSONRPC_VARIANT=besu though I was using an external node. The Besu instance was configured 1 block per second with IBFT consensus. I believe the issue was caused by that, simply the external node was rejecting too many concurrent connections.

After that I tried it with a local node and now this error has disappeared. Though I am left with another one (removed : after http strings because I can’t post more than 2 links on post) ;

2021-04-26T16:11:42.707 fetcher=internal_transaction count=10 [error] Task #PID<0.14035.0> started from Indexer.Fetcher.InternalTransaction terminating ** (FunctionClauseError) no function clause matching in EthereumJSONRPC.Parity.Trace.entry_to_elixir/1 (ethereum_jsonrpc 0.1.0) EthereumJSONRPC.Parity.Trace.entry_to_elixir({"revertReason", "0x"}) (elixir 1.11.2) lib/enum.ex:1323: anonymous fn/4 in Enum.into/3 (stdlib 3.14.1) maps.erl:233: :maps.fold_1/3 (elixir 1.11.2) lib/enum.ex:2197: Enum.into/4 (elixir 1.11.2) lib/enum.ex:1399: Enum."-map/2-lists^map/1-0-"/2 (ethereum_jsonrpc 0.1.0) lib/ethereum_jsonrpc/besu.ex:114: EthereumJSONRPC.Besu.trace_replay_block_transactions_responses_to_internal_transactions_params/2 (indexer 0.1.0) lib/indexer/fetcher/internal_transaction.ex:109: (elixir 1.11.2) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2 (elixir 1.11.2) lib/task/supervised.ex:35: Task.Supervised.reply/5 (stdlib 3.14.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3 Function: &Indexer.BufferedTask.log_run/1 Args: [%{batch: [102131, 102130, 102135, 102133, 102134, 102076, 102015, 3273, 102140, 102139], callback_module: Indexer.Fetcher.InternalTransaction, callback_module_state: [transport: EthereumJSONRPC.HTTP, else: EthereumJSONRPC.IPC, transport_options: [http: EthereumJSONRPC.HTTP.HTTPoison, url: "http//localhost:8545", method_to_url: [eth_getBalance: "http//localhost:8545", trace_block: "http//localhost:8545", trace_replayBlockTransactions: "http//localhost:8545"], http_options: [recv_timeout: 600000, timeout: 600000, hackney: [pool: :ethereum_jsonrpc]]], variant: EthereumJSONRPC.Besu], metadata: [fetcher: :internal_transaction]}]