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

The null value field of EventAttribute should be allowed #1375

Closed
mzabaluev opened this issue Nov 9, 2023 · 4 comments · Fixed by #1376
Closed

The null value field of EventAttribute should be allowed #1375

mzabaluev opened this issue Nov 9, 2023 · 4 comments · Fixed by #1376
Assignees
Labels
bug Something isn't working rpc

Comments

@mzabaluev
Copy link
Contributor

An indexer ran into null value field of EventAttribute, preventing a service from indexing events and resulting in downtime. The exact error was serde invalid type: null.

Originally posted by @daniel-savu in #1216 (comment)

@mzabaluev
Copy link
Contributor Author

mzabaluev commented Nov 9, 2023

The OpenAPI of the RPC interface does not allow for null-valued value fields, by omission of nullable on the appropriate schema. But this may be more about what event data the application is allowed to produce in practice. I don't see any checks forbidding null values in the code of CometBFT node. So I think the tendermint-rs implementation for CometBFT RPC 0.37+ should tolerate nulls as well.

@daniel-savu
Copy link

Thank you for the quick follow up @mzabaluev!

To answer your question about the Tendermint version, I believe the chain is using 0.34+.

I'm not a Go developer but this is what I gather from the go.mod file: https://github.com/neutron-org/neutron/blob/51ecb6b0466077abd4bd16b3e5746aec150608c8/go.mod#L29

@mzabaluev
Copy link
Contributor Author

I believe the chain is using 0.34+.

Then you also need to use the correct compatibility mode with your tendermint-rpc client, otherwise your event data will be garbled (sorry for breaking this as we moved beyond 0.34; by 1.0 we should get past this).

I have just realized that our WebSocketClient documentation fails to include the builder API, but the code of the tendermint-rpc CLI binary can provide an example of dynamic mode discovery. You may just need to use the specific CompactMode if the nodes you connect to all use a specific CometBFT version.

@daniel-savu
Copy link

Appreciate the heads up! Oddly enough, things have been running fine without CompatMode::V0_34 but we'll keep a close eye on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rpc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants