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

Subscription error: missing required field 'topics' for Log #355

Open
flolege opened this issue Nov 28, 2024 · 1 comment
Open

Subscription error: missing required field 'topics' for Log #355

flolege opened this issue Nov 28, 2024 · 1 comment

Comments

@flolege
Copy link

flolege commented Nov 28, 2024

Describe the bug
I occasionally get a geth Subscription Error "missing required field 'topics' for Log".
Indeed, the tx has no topic, example on mainnet tx 0x0af3e4c8f5048b2ace5a036a4f518294267984943527a3abd3ec4483ad494f4d

The problem seems to be in /go-ethereum-substate/core/types/gen_log_json.go which throws when Topics is nil

To Reproduce
Steps to reproduce the behavior:
In go, subscribe to the ethClient like this:
sub, err := cl.SubscribeFilterLogs(
context.Background(),
ethereum.FilterQuery{Topics: [][]common.Hash{}},
logChn)

(it makes no different if you create an empty ethereum.FilterQuery or not.)
Create a tx without Topics which must be mined, then the subscription error happens.

Expected behavior
This should not throw. Topics is optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@flolege and others