This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
eth_getLogs RPC is unreliable in light mode #9184
Labels
F3-annoyance 💩
The client behaves within expectations, however this “expected behaviour” itself is at issue.
M4-core ⛓
Core client code / Rust.
Milestone
The eth_getLogs RPC only works for recent blocks in light mode. Specifically, it only works if logs are created on blocks where the headers are stored. If the headers are pruned, the client does not fetch them from the network on-demand to scan for logs.
I noticed this when using Augur and opened an issue there. This gist provides a test case.
While it could be too expensive to support
eth_getLogs
on a large range of headers, I think it makes sense for the light client to fetch small ranges of headers on demand from the network and scan them for matching logs.Furthermore, the log entries responses are incomplete since
BlockReceipts
responds with aReceipt
instead of aRichReceipt
.RichReceipt
includes the transaction hash, index, cumulative gas, etc., which are expected in the RPC response. Fixing this would require a modification to the PIP protocol, I assume.The text was updated successfully, but these errors were encountered: