Skip to content

eth_getLogs returns empty result on Reth while Geth returns expected logs for same queries #16354

@AntonieDavid

Description

@AntonieDavid

Describe the bug

When querying eth_getLogs for a set of known log-producing addresses and block ranges (e.g., 30200000-30201000 on Base Mainnet), Geth consistently returns the expected events, while Reth returns an empty list.

results from local testing (on the node):

geth
 Blocks 30200000-30200099: 92 events
 Blocks 30200100-30200199: 119 events
 Blocks 30200200-30200299: 92 events
 Blocks 30200300-30200399: 39 events
 Blocks 30200400-30200499: 8 events
 Blocks 30200500-30200599: 16 events
 Blocks 30200600-30200699: 28 events
 Blocks 30200700-30200799: 54 events
 Blocks 30200800-30200899: 45 events
 Blocks 30200900-30200999: 30 events
reth
 Blocks 30200000-30200099: 0 events
 Blocks 30200100-30200199: 0 events
 Blocks 30200200-30200299: 0 events
 Blocks 30200300-30200399: 0 events
 Blocks 30200400-30200499: 0 events
 Blocks 30200500-30200599: 0 events
 Blocks 30200600-30200699: 0 events
 Blocks 30200700-30200799: 0 events
 Blocks 30200800-30200899: 0 events
 Blocks 30200900-30200999: 0 events

Steps to reproduce

from web3 import Web3
from os import environ
import json

web3 = Web3(Web3.HTTPProvider("http://localhost:8545"))

addresses = [
    "0xec8d8D4b215727f3476FF0ab41c406FA99b4272C",
    "0x927F9c03d1Ac6e2630d31E614F226b5Ed028d443",
    "0xf9Fc0B2859f9B6d33fD1Cea5B0A9f1D56C258178",
    "0xC608188e753b1e9558731724b7F7Cdde40c3b174",
    "0x1e4eed8fd57DFBaaE060F894582eC0183c5D6e38",
    "0x9fAc7b75f367d5B35a6D6D0a09572eFcC3D406C5",
    "0xf491A98F31F6adc12B8A1f421D70DF977Ad5fc9b",
    "0x4E74D4Db6c0726ccded4656d0BCE448876BB4C7A",
    "0x22c93c3CF38d6396041Ec3BA7dD2D97Fb2061E3F",
    "0xa6dc7ad1A7B85e16a0215AD7E13aA12ab96c5452",
    "0x6D63921D8203044f6AbaD8F346d3AEa9A2719dDD",
]

START_BLOCK = 30200000
RANGE_SIZE = 100
ITERATIONS = 10

for i in range(ITERATIONS):
    from_block = START_BLOCK + i * RANGE_SIZE
    to_block   = from_block + RANGE_SIZE - 1
    filter_obj = {
        "fromBlock": from_block,
        "toBlock": to_block,
        "address": addresses,
    }

    print(f"🔍 Querying blocks {from_block}-{to_block} with:")
    print(json.dumps(filter_obj, indent=2))

    try:
        logs = web3.eth.get_logs(filter_obj)
        print(f"✅ Blocks {from_block}-{to_block}: {len(logs)} events\n")
    except Exception as e:
        print(f"❌ Error on blocks {from_block}-{to_block}: {e}\n")

Node logs


Platform(s)

No response

Container Type

Other

What version/commit are you on?

v1.4.1

What database version are you on?

.

Which chain / network are you on?

base mainnet

What type of node are you running?

Archive (default)

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

Labels

C-bugAn unexpected or incorrect behaviorS-needs-triageThis issue needs to be labelled

Type

No type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions