chore: document MovePackageData's deliberate wire shape - #1417
Open
Alex6323 wants to merge 1 commit into
Open
Conversation
The consistency sweep (#1342) flagged its serde as bypassing the crate conventions; verified intentional: the JSON shape is the output contract of 'iota move build --dump-bytecode-as-base64', and the BCS shape ships through the FFI's from_base64/to_base64 in every language binding. The doc now carries both constraints so the shape is not normalized later. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DaughterOfMars
left a comment
Contributor
There was a problem hiding this comment.
Not really necessary IMO
Contributor
Author
We can omit it of course, but it documents why this is the exception from the rule (edit: AND why this landed in the consistency list in the first place). |
Thoralf-M
reviewed
Sep 4, 2026
| /// digest as a byte array) in every format, BCS included, and the FFI | ||
| /// publishes the BCS form to all language bindings through | ||
| /// `from_base64`/`to_base64`. Both encodings deliberately diverge from the | ||
| /// crate's serde conventions; do not normalize them. |
Member
There was a problem hiding this comment.
do not normalize them what does this mean?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The consistency sweep (#1342) flagged
MovePackageData's serde as bypassing the crate conventions (base64-string modules in both formats, digest as a byte array in JSON). Verified intentional on both sides: the JSON shape is exactly the output ofiota move build --dump-bytecode-as-base64(regenerated and compared today), and the BCS shape ships through the FFI'sfrom_base64/to_base64into every language binding, so both are external contracts.What changes
Six doc lines on the struct carrying the two constraints, so the shape survives the next consistency sweep instead of getting normalized.
Test plan
-Dwarnings).(written by Claude on Alex's behalf)