Add --verifiable flag to stellar contract build#2585
Draft
fnando wants to merge 14 commits into
Draft
Conversation
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.
What
Adds a
--verifiableflag tostellar contract buildthat performs a reproducible build inside a digest-pinned Docker container and stamps SEP-58 metadata (bldimg,source_rev,bldopt, plus the source-identification fields) into the resulting WASM so third parties can re-run the build and verify the output byte-for-byte.New flags, all grouped under a
Verifiablehelp section:--verifiable— opt in to the reproducible build mode; implies--lockedand requires a clean git working tree.--image— override the auto-selected container image. Must be digest-pinned (...@sha256:...); tag-only refs are rejected.--source-repo+--source-rev— SEP-58 git-based source identification (HTTPS URL /github:user/repoplus the 40-char commit SHA).--tarball-url+--tarball-sha256— SEP-58 tarball-based source identification, as an alternative to the git pair.-d/--docker-host(also readsDOCKER_HOST) — override the docker daemon endpoint.Why
SEP-58 defines how to verify that a deployed contract WASM came from a specific source revision built with a specific toolchain image. Until now the CLI had no built-in way to produce such a build — users had to assemble the docker invocation, run cargo inside it, and stamp the custom sections by hand. This makes it a first-class option on
stellar contract build.Known limitations
N/A