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 · 1 comment
Open

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

rvagg opened this issue Jan 10, 2025 · 1 comment

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.

@BigLep
Copy link
Member

BigLep commented Jan 29, 2025

2025-01-29 conversation: this is the ChainIndexer waiting for the latest epoch to get indexed. The ChainIndexer reconciliation logic should be returning quicker.

We don't know how many are impacted this.

We don't have a repro for this either. @Schwartz10: by chance, do you have additional details here to help with reproduce it?

We certainly welcome contribution on this fix if anyone wants to take it on.

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

2 participants