Skip to content

chore: document MovePackageData's deliberate wire shape - #1417

Open
Alex6323 wants to merge 1 commit into
developfrom
chore/document-move-package-data-wire-shape
Open

chore: document MovePackageData's deliberate wire shape#1417
Alex6323 wants to merge 1 commit into
developfrom
chore/document-move-package-data-wire-shape

Conversation

@Alex6323

Copy link
Copy Markdown
Contributor

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 of iota move build --dump-bytecode-as-base64 (regenerated and compared today), and the BCS shape ships through the FFI's from_base64/to_base64 into 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

  • Doc-only; full local battery green (fmt, clippy stable + 1.97.0, nextest, doc with -Dwarnings).

(written by Claude on Alex's behalf)

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>
@Alex6323
Alex6323 requested a review from a team as a code owner August 31, 2026 12:46
@Alex6323 Alex6323 mentioned this pull request Aug 31, 2026

@DaughterOfMars DaughterOfMars left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really necessary IMO

@Alex6323

Alex6323 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Not really necessary IMO

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).

/// 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not normalize them what does this mean?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants