Merge pull request #5505 from blockscout/vb-manage-debug-trace-transaction-timeout

Manage debug_traceTransaction JSON RPC method timeout
pull/5508/head
Victor Baranov 3 years ago committed by GitHub
commit fa03022763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 3
      apps/ethereum_jsonrpc/config/config.exs
  3. 9
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/geth.ex
  4. 3
      docker/Makefile

@ -1,6 +1,7 @@
## Current
### Features
- [#5505](https://github.com/blockscout/blockscout/pull/5505) - Manage debug_traceTransaction JSON RPC method timeout
- [#5491](https://github.com/blockscout/blockscout/pull/5491) - Sequential blocks broadcast on the main page
- [#5312](https://github.com/blockscout/blockscout/pull/5312) - Add OpenZeppelin proxy storage slot
- [#5302](https://github.com/blockscout/blockscout/pull/5302) - Add specific tx receipt fields for the GoQuorum client

@ -26,6 +26,9 @@ config :ethereum_jsonrpc, EthereumJSONRPC.Tracer,
adapter: SpandexDatadog.Adapter,
trace_key: :blockscout
debug_trace_transaction_timeout = System.get_env("ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT", "5s")
config :ethereum_jsonrpc, EthereumJSONRPC.Geth, debug_trace_transaction_timeout: debug_trace_transaction_timeout
config :logger, :ethereum_jsonrpc,
# keep synced with `config/config.exs`
format: "$dateT$time $metadata[$level] $message\n",

@ -89,7 +89,14 @@ defmodule EthereumJSONRPC.Geth do
@tracer File.read!(@tracer_path)
defp debug_trace_transaction_request(%{id: id, hash_data: hash_data}) do
request(%{id: id, method: "debug_traceTransaction", params: [hash_data, %{tracer: @tracer}]})
debug_trace_transaction_timeout =
Application.get_env(:ethereum_jsonrpc, __MODULE__)[:debug_trace_transaction_timeout]
request(%{
id: id,
method: "debug_traceTransaction",
params: [hash_data, %{tracer: @tracer, timeout: debug_trace_transaction_timeout}]
})
end
defp debug_trace_transaction_responses_to_internal_transactions_params(

@ -397,6 +397,9 @@ endif
ifdef INDEXER_MEMORY_LIMIT
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_MEMORY_LIMIT=$(INDEXER_MEMORY_LIMIT)'
endif
ifdef ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT=$(ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT)'
endif
HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ")
build:

Loading…
Cancel
Save