Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth_getLogs does not filter topics properly #394

Open
arhag opened this issue Apr 4, 2023 · 1 comment
Open

eth_getLogs does not filter topics properly #394

arhag opened this issue Apr 4, 2023 · 1 comment
Labels
enhancement New feature or request 👍 lgtm
Milestone

Comments

@arhag
Copy link
Member

arhag commented Apr 4, 2023

From #377 by @yarkinwho:

Two major issue:
1 topics: [] should mean any topic (effectively filter out nothing) but now it will filter out everything as it cannot find any matches to null.
2 topics filter should follow such role:
https://ethereum.org/en/developers/docs/apis/json-rpc/
A note on specifying topic filters: Topics are order-dependent. A transaction with a log with topics [A, B] will be matched by the following topic filters:

[] "anything"
[A] "A in first position (and anything after)"
[null, B] "anything in first position AND B in second position (and anything after)"
[A, B] "A in first position AND B in second position (and anything after)"
[[A, B], [A, B]] "(A OR B) in first position AND (A OR B) in second position (and anything after)"

We may need a major refactor of related silkworm code to fix the second issue.

But for the first one, it can be handled by a special case easily. We MUST fix this because web3.js IS sending that empty topics array by default.....

The first part, which was the more critical one to fix, was already resolved by #378.

This issue is meant to track the second part which will be more complicated to fix. There is no plan to fix that prior to launch but it seems the deficiency is not a major problem for existing EOS EVM users.

@stephenpdeos
Copy link
Member

We should evaluate if the latest upstream Silkworm updates fix this issue. If not resolved, this will be managed as a lower priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 👍 lgtm
Projects
Status: Todo
Development

No branches or pull requests

3 participants