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

Provide MessagePack serialization #2118

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Provide MessagePack serialization #2118

wants to merge 9 commits into from

Conversation

uint
Copy link
Contributor

@uint uint commented Apr 18, 2024

This PR does two things:

  • modify cosmwasm_core::{Binary, HexBinary} to (de)serialize directly as binary blobs when used together with a compact encoding (meaning one that returns false from is_human_readable), and
  • provides a set of new MessagePack-related functions that mirror the JSON API: cosmwasm_std::{from_msgpack, to_msgpack_vec, to_msgpack_binary}.

Breakage

If we're being rigorous, I think the changes to cosmwasm_core::{Binary, HexBinary} are breaking if used for storage with a binary encoding. Maybe we should release this with a major version bump or deprecate these types in favor of some new ones. @webmaster128 you're the decision-maker here.

This is breaking if we assume someone out there has used the binary/checksum types with binary encodings.

We're not bumping the major version for this since as far as we're concerned, that use case has always been unsupported. Still, we're going to release this with a minor version bump, and before it's released we're going to provide some "guard rails" via #2125, #2126, #2127.

TODO

  • changelog

@uint uint requested a review from webmaster128 April 18, 2024 18:09
@uint uint changed the base branch from main to prep-msgpack April 24, 2024 13:06
Base automatically changed from prep-msgpack to main April 25, 2024 09:01
@uint uint requested a review from webmaster128 May 9, 2024 10:33
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

Successfully merging this pull request may close these issues.

None yet

2 participants