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

Serialization inconsistency between celestia-node API and Tendermint API #3918

Open
oblique opened this issue Nov 5, 2024 · 0 comments · Fixed by #3928 · May be fixed by #3929 or #3930
Open

Serialization inconsistency between celestia-node API and Tendermint API #3918

oblique opened this issue Nov 5, 2024 · 0 comments · Fixed by #3928 · May be fixed by #3929 or #3930
Assignees
Labels
area:api Related to celestia-node API bug Something isn't working external Issues created by non node team members

Comments

@oblique
Copy link
Contributor

oblique commented Nov 5, 2024

Celestia Node version

ace6840

OS

Arch Linux

Install tools

No response

Others

No response

Steps to reproduce it

Send header.GetByHeight request and /commit request.

Expected result

Both to be the same, preferably a string.

Actual result

In the header.GetByHeight response the Commit.Height is a number and in /commit response it is a string.

Relevant log output

No response

Is the node "stuck"? Has it stopped syncing?

No response

Notes

celestia-node API and Tendermint API have some types in common. One example is Commit type.
However we noticed that their JSON serialization is not the same. For example Commit.Height when it used from celestia-node API is serialized as a number and as a string when it is used from Tendermint API.

We managed to find the root cause: Tendermint API uses a custom serializer which explicitly serializes int64/uint64 as strings, but celestia-node API does it only for ExtendedHeader.RawHeader and ExtendedHeader.ValidatorSet.

This inconsistency is a huge problem in Lumina because we can not control which serializer must be used in the jsonrpsee level.

We believe celestia-node API could also use the same serializer as Tendermint API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment