Skip to content

Needless log spam when setting ETH_EVENTS_BLOCK_PROCESS_LIMIT_MAX #2503

@cen1

Description

@cen1

Describe the bug
Txs indexer was cycling through block range increases, dropping to 1, then encountering an eventual exception

web3.exceptions.Web3RPCError: {'code': -32000, 'message': 'requested too many blocks from 1262064 to 1263663, maximum is set to 1024'}

when increasing to 1600, then falling back to 1 again.

So I decided to set ETH_EVENTS_BLOCK_PROCESS_LIMIT_MAX=1024 but now it is flooding logs with this:

txs-worker-indexer-1  | 2025-04-15 11:36:57,949 [INFO] [489862d6/index_erc20_events_task] Erc20EventsIndexer: block_process_limit duplicated to 2048
txs-worker-indexer-1  | 2025-04-15 11:36:57,952 [INFO] [489862d6/index_erc20_events_task] Erc20EventsIndexer: block_process_limit 2048 is bigger than block_process_limit_max 1024, reducing
txs-worker-indexer-1  | 2025-04-15 11:36:57,968 [INFO] [5e89e1f5/index_new_proxies_task] ProxyFactoryIndexer: block_process_limit duplicated to 2048
txs-worker-indexer-1  | 2025-04-15 11:36:57,969 [INFO] [5e89e1f5/index_new_proxies_task] ProxyFactoryIndexer: block_process_limit 2048 is bigger than block_process_limit_max 1024, reducing

I think this log spam is needless and not helpful.

To Reproduce
Set up RPC node with limited block range and set ETH_EVENTS_BLOCK_PROCESS_LIMIT_MAX to that range.

Expected behavior
If the max limit is set, there is no need to

  1. Try to increase the limit. You already know you can't increase it.
  2. Log this failure to increase. It is expected.

Environment (please complete the following information):

  • docker compose setup from infrastructure repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    BackendbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions