Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Finalize serialization format prior to release #221

Open
brson opened this issue Jul 7, 2023 · 0 comments
Open

Finalize serialization format prior to release #221

brson opened this issue Jul 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@brson
Copy link
Collaborator

brson commented Jul 7, 2023

Initial serialization landed in #219, but it is kinda sloppy and ad-hoc.

The serialization format is something that is hard to change once in production, so we should be intentional about exactly how things are serialized.

The current serialization is done with borsh, which is probably a good choice, though we might want to change it.

What concerns me more is that even with borsh, the serialization routines are not straightforward, with a number of hand-coded parts for things like struct fields, and elements within vectors of vectors. This complexity seems unavoidable because we don't actually have Rust structs representing our all of our data types, but are instead interpreting type descriptors of move types. A lot of the serialization decisions here are made because of the current structure of the runtime, with all the wrapper types like TypedMoveBorrowedRustVec etc, and the serialization format will need to be preserved even if the runtime structure changes.

@brson brson added the enhancement New feature or request label Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants