You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From user's feedback, we have found that there is a difference between Erigon and zkevm-node when querying events with eth_getFilterLogs RPC method. When the RPC cannot find the filter ID from user in its own memory, Erigon will return a [] while the zkevm-node will return null. But null leads to a NullPointerException (NPE) in web3j and thus causes a crash on user's program. So maybe zkevm-node should change its return from null to an empty slice when nothing returns and no error occors, and the RPC query response will be like the following:
{
"jsonrpc": "2.0",
"id": 73,
"result": []
}
Implementation
We modified jsonrpc/endpoints_eth.go Line 493 & 499 into return []types.Log{}, nil, and it works.
The text was updated successfully, but these errors were encountered:
Rationale
From user's feedback, we have found that there is a difference between Erigon and zkevm-node when querying events with
eth_getFilterLogs
RPC method. When the RPC cannot find the filter ID from user in its own memory, Erigon will return a[]
while the zkevm-node will returnnull
. Butnull
leads to a NullPointerException (NPE) in web3j and thus causes a crash on user's program. So maybe zkevm-node should change its return from null to an empty slice when nothing returns and no error occors, and the RPC query response will be like the following:Implementation
We modified
jsonrpc/endpoints_eth.go
Line 493 & 499 intoreturn []types.Log{}, nil
, and it works.The text was updated successfully, but these errors were encountered: