Skip to content

Update getLogs to support nullable topics field in request body #3855

@arianejasuwienas

Description

@arianejasuwienas

Problem

When the topics field is set to null in the eth_getLogs call, Hedera’s JSON-RPC implementation throws an error. In contrast, Ethereum-compatible nodes treat null topics as equivalent to an empty array: meaning no topic filtering is applied.

Why It Matters

  1. Per the OpenRPC spec, the topics field is defined as nullable.

  2. Hedera currently fails Ethereum JSON-RPC conformance tests that expect this behavior:

Proposed Solution

Update the eth_getLogs method to support null values in the topics field by treating them as if no topic filtering is applied (same as an empty array). This brings behavior in line with Ethereum nodes and specifications.

Alternative

Continue to reject null values for topics and document the difference. This would reduce developer experience and break compatibility with Ethereum-based tooling. Not recommended.

Metadata

Metadata

Labels

ArianeLabsItems ArianeLabs is contributing to

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions