Description
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
-
Per the OpenRPC spec, the
topics
field is defined as nullable. -
Hedera currently fails Ethereum JSON-RPC conformance tests that expect this behavior:
eth_getLogs
- Topic exact match
Test locationeth_getLogs
- Topic wildcard
[Test location
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.