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

Remove Deserialize for Row and Sample #496

Open
zvolin opened this issue Jan 2, 2025 · 0 comments
Open

Remove Deserialize for Row and Sample #496

zvolin opened this issue Jan 2, 2025 · 0 comments
Labels
types Related to `celestia-types`

Comments

@zvolin
Copy link
Member

zvolin commented Jan 2, 2025

          > If .encode is used in reality anyway, is it possible to remove #[serde(into = "RawExtendedDataSquare", try_from = "RawExtendedDataSquare")] so at least simmetrical binary serialization/deserialization works?

There is no symmetry in case of EDS because Deserialize is not implemented for it at all. I think that'd be the correct way also for Sample and Row, to just remove the Deserialize from them. They all serialize into Raw format, and then can be deserialized into Raw again but requiring additional info to reconstruct original type using from_raw.

If you need serde, I think you could wrap them in a struct containing also additional information required to make the deserialization correct

Originally posted by @zvolin in #495 (comment)

@zvolin zvolin added the types Related to `celestia-types` label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Related to `celestia-types`
Projects
None yet
Development

No branches or pull requests

1 participant