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 logs listener with a topic filter causes a timeout #12819

Open
rvagg opened this issue Jan 10, 2025 · 0 comments
Open

Eth logs listener with a topic filter causes a timeout #12819

rvagg opened this issue Jan 10, 2025 · 0 comments

Comments

@rvagg
Copy link
Member

rvagg commented Jan 10, 2025

Reported by @Schwartz10, error logs provided by Protofire.

If you try to use the event “topics” in event log listeners to filter event logs by a specific criteria, it times out

Comes from:

using abigen to create go web3 bindings for a specific contract

{"level":"warn","ts":"2025-01-09T16:38:50.064Z","logger":"rpc","caller":"[email protected]/handler.go:421","msg":"error in RPC call to 'eth_getLogs': failed to get events for filter:\n    github.com/filecoin-project/lotus/node/impl/full.(*EthEventHandler).EthGetLogs\n        /go/lotus/node/impl/full/eth.go:1743\n  - failed to get events for filter from chain indexer:\n    github.com/filecoin-project/lotus/node/impl/full.(*EthEventHandler).ethGetEventsForFilter\n        /go/lotus/node/impl/full/eth.go:1789\n  - failed to wait for head to be indexed:\n    github.com/filecoin-project/lotus/chain/index.(*SqliteIndexer).GetEventsForFilter\n        /go/lotus/chain/index/events.go:467\n  - context canceled"}

So this is a plain eth_getLogs, from here, which shouldn't be erroring out on waiting for future stuff. We don't have the specific filter, perhaps it's "latest"? It would be good to figure out what the max it's aiming for. But also perhaps max doesn't matter here and just by supplying a topic that it hits this error? Either way, it shouldn't wait to find this, it should be a very quick wait to allow for the async Apply->index process happens and nothing more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📌 Triage
Development

No branches or pull requests

1 participant