diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/pending_transaction.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/pending_transaction.ex index 14bf1d8783..cfce452c86 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/pending_transaction.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/pending_transaction.ex @@ -60,17 +60,17 @@ defmodule EthereumJSONRPC.PendingTransaction do @spec fetch_pending_transactions_besu(EthereumJSONRPC.json_rpc_named_arguments()) :: {:ok, [Transaction.params()]} | {:error, reason :: term} def fetch_pending_transactions_besu(json_rpc_named_arguments) do + # `txpool_besuPendingTransactions` required parameter `numResults` for number of maximum pending transaction to return. + # + # TODO: Remove fix value when hyperledger besu client change `numResults` from required to optional parameter. + # Current fix value set to `512` bonsai storage default value is 512. + # to handle pending transaction in Ethereum mainnet require more than 100000. + # reference: + # https://etherscan.io/chart/pendingtx + # https://besu.hyperledger.org/public-networks/reference/cli/options#bonsai-historical-block-limit + # + # https://besu.hyperledger.org/public-networks/reference/api#txpool_besupendingtransactions with {:ok, transactions} <- - # `txpool_besuPendingTransactions` required parameter `numResults` for number of maximum pending transaction to return. - # - # TODO: Remove fix value when hyperledger besu client change `numResults` from required to optional parameter. - # Current fix value set to `512` bonsai storage default value is 512. - # to handle pending transaction in Ethereum mainnet require more than 100000. - # reference: - # https://etherscan.io/chart/pendingtx - # https://besu.hyperledger.org/public-networks/reference/cli/options#bonsai-historical-block-limit - # - # https://besu.hyperledger.org/public-networks/reference/api#txpool_besupendingtransactions %{id: 1, method: "txpool_besuPendingTransactions", params: [512]} |> request() |> json_rpc(json_rpc_named_arguments) do diff --git a/config/runtime.exs b/config/runtime.exs index 8f18085665..cefab56efc 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -560,8 +560,7 @@ config :indexer, Indexer.Fetcher.TransactionAction, ) config :indexer, Indexer.Fetcher.PendingTransaction.Supervisor, - disabled?: - ConfigHelper.parse_bool_env_var("INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER") + disabled?: ConfigHelper.parse_bool_env_var("INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER") config :indexer, Indexer.Fetcher.Token, concurrency: ConfigHelper.parse_integer_env_var("INDEXER_TOKEN_CONCURRENCY", 10) diff --git a/cspell.json b/cspell.json index e3c50bb6d4..fa02ef75e0 100644 --- a/cspell.json +++ b/cspell.json @@ -211,6 +211,7 @@ "hljs", "Hodl", "httpoison", + "hyperledger", "ifdef", "ifeq", "Iframe",