Skip to content

Enable ephemeral --dump-bytecode-as-base64#25082

Merged
mdgeorge4153 merged 16 commits intomainfrom
mdgeorge/ephemeral-dump
Feb 12, 2026
Merged

Enable ephemeral --dump-bytecode-as-base64#25082
mdgeorge4153 merged 16 commits intomainfrom
mdgeorge/ephemeral-dump

Conversation

@mdgeorge4153
Copy link
Copy Markdown
Contributor

@mdgeorge4153 mdgeorge4153 commented Jan 23, 2026

Description

See the release notes below

Test plan

Shell tests were added to ensure that --dump-bytecode-as-base64 --pubfile-path produces bytecode containing the ephemeral addresses.


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:

You can now do sui move build --dump-bytecode-as-base64 --pubfile-path <file> to use ephemeral addresses for dumped bytecode.

The --dump flag can be used as a shorthand for --dump-bytecode-as-base64.

The full flag for -e has been changed to --build-env (the shorthand -e remains the same)

Fixed a bug when --pubfile-path is used with -p

  • Rust SDK:
  • Indexing Framework:

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sui-docs Error Error Feb 12, 2026 8:15pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Preview Feb 12, 2026 8:15pm
sui-kiosk Ignored Ignored Preview Feb 12, 2026 8:15pm

Request Review

@mdgeorge4153 mdgeorge4153 temporarily deployed to sui-typescript-aws-kms-test-env January 23, 2026 22:18 — with GitHub Actions Inactive
@mdgeorge4153 mdgeorge4153 force-pushed the mdgeorge/ephemeral-dump branch from af4bf59 to f0a0fa3 Compare January 26, 2026 16:20
@mdgeorge4153 mdgeorge4153 temporarily deployed to sui-typescript-aws-kms-test-env January 26, 2026 16:20 — with GitHub Actions Inactive
@mdgeorge4153 mdgeorge4153 force-pushed the mdgeorge/ephemeral-dump branch from f0a0fa3 to 25df73c Compare January 26, 2026 19:11
@mdgeorge4153 mdgeorge4153 temporarily deployed to sui-typescript-aws-kms-test-env January 26, 2026 19:11 — with GitHub Actions Inactive
@mdgeorge4153 mdgeorge4153 marked this pull request as ready for review January 26, 2026 19:18
@mdgeorge4153 mdgeorge4153 temporarily deployed to sui-typescript-aws-kms-test-env January 26, 2026 19:18 — with GitHub Actions Inactive
@mdgeorge4153 mdgeorge4153 changed the title Mdgeorge/ephemeral dump Enable ephemeral --dump-bytecode-as-base64 Jan 26, 2026
@mdgeorge4153 mdgeorge4153 temporarily deployed to sui-typescript-aws-kms-test-env January 26, 2026 22:20 — with GitHub Actions Inactive
@github-actions github-actions bot added the Type: Documentation Improvements or additions to documentation label Jan 26, 2026
You can also prepare bytecode for publication without actually publishing it by passing `--pubfile-path <pubfile>` to `sui move build --dump-bytecode-as-base64`:

```sh
sui move build --dump-bytecode-as-base64 --pubfile-path Pub.localnet.toml
Copy link
Copy Markdown
Contributor

@manolisliolios manolisliolios Jan 27, 2026

Choose a reason for hiding this comment

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

Shouldn't this also need build-env (-e)? Or do we extract it from the pubfile? (but i guess the latter only works if the pubfile is not fresh)

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.

Would be cool to also test the case where pubfile path does not exist (so it also requires build-env)

Copy link
Copy Markdown
Contributor

@manolisliolios manolisliolios left a comment

Choose a reason for hiding this comment

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

Minor comments, overall LGTM. I also re-triggered your windows CI went OOM 🤣

@mdgeorge4153
Copy link
Copy Markdown
Contributor Author

Note: the --allow-dirty flag is not being passed down to the PackageLoader constructor when converting a BuildConfig

Rename the long form of the environment flag from --environment to
--build-env while keeping the -e short form for consistency with
other CLI conventions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
mdgeorge4153 and others added 15 commits February 12, 2026 15:11
Add a shorter --dump alias for the --dump-bytecode-as-base64 flag
for convenience when using sui move build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add --pubfile-path flag to BuildConfig, making it available on build commands.
When --pubfile-path is passed to sui move build --dump-bytecode-as-base64,
use ephemeral addresses from the specified publication file instead of
addresses from the lock file.

This enables building packages with ephemeral publication data for testing
and development workflows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add validation to reject --pubfile-path flag on sui client publish and
sui client upgrade commands. Users should use test-publish or test-upgrade
instead for ephemeral publication workflows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Test that sui move build --dump correctly uses addresses from an
ephemeral publication file (Pub.*.toml) when --pubfile-path is provided.

The test creates a main_pkg that depends on dep_pkg, provides a pubfile
with ephemeral publication info for both, and verifies the dump output
uses the expected addresses.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The reroot_path() function changes the current working directory to
the package root before the pubfile path is used. This caused relative
paths passed to --pubfile-path to be resolved relative to the -p package
directory instead of the original CWD.

Fix by resolving pubfile_path to absolute before reroot_path is called.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of snapshotting the entire JSON output, decode the base64
module and disassemble it to verify the ephemeral original-id
(cafe0001) appears in the bytecode.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Verifies that when building with --dump (without --pubfile-path), the
dependency's original-id from Published.toml appears in the compiled
bytecode. This contrasts with the ephemeral dump test which uses
addresses from a pubfile.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The build_env and pubfile_path fields from EphemeralArgs are now
available in MoveBuildConfig via --build-env and --pubfile-path flags.
This eliminates the clap argument name conflicts in test-publish and
test-upgrade commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove EphemeralArgs from cli_tests.rs and set environment and
pubfile_path directly on MoveBuildConfig. Tests that use TestPublish
need both fields set for ephemeral publication to work correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mdgeorge4153 mdgeorge4153 force-pushed the mdgeorge/ephemeral-dump branch from 0b38a47 to 4f1c289 Compare February 12, 2026 20:11
@mdgeorge4153 mdgeorge4153 temporarily deployed to sui-typescript-aws-kms-test-env February 12, 2026 20:12 — with GitHub Actions Inactive
@mdgeorge4153 mdgeorge4153 enabled auto-merge (squash) February 12, 2026 20:24
@mdgeorge4153 mdgeorge4153 merged commit b250096 into main Feb 12, 2026
58 of 59 checks passed
@mdgeorge4153 mdgeorge4153 deleted the mdgeorge/ephemeral-dump branch February 12, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants