Add stellar contract verify command#2586
Draft
fnando wants to merge 20 commits into
Draft
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
main. This PR's base iscontract-build-verifiable, so once #2585 merges, GitHub will automatically retarget this one tomain.What
Adds a new
stellar contract verifysubcommand that takes a contract id (--id, fetched from the network) or a local WASM (--wasm), reads the SEP-58 build metadata embedded in it (bldimg, source identification, build flags), re-runs the recorded build inside the recorded container image, and byte-compares the result against the original to confirm the WASM is reproducible.Notable bits:
source_repo+source_rev) and tarballs (tarball_url+tarball_sha256). For WASMs that record onlytarball_sha256, the user can supply a local file or URL via--tarball-url.gix(with rustls TLS) instead of shelling out togit, so the command has no runtime dependency on a system git binary and there's a single retrieval channel to gate on.bldimg, and unconditionally for any tarball source (tarballs are never default-trusted).--trustskips it; the prompt overrides--quietso it can't be silenced by accident. The default trust list is the stellar/stellar-cli image.--tarball-sha256), and the trust-prompt flow; they live in the existing integration tier.Why
#2585 makes it possible to produce a verifiable build; this PR is the other half — a way to check a deployed contract against its claimed source. Together they close the SEP-58 loop end-to-end in the CLI.
Known limitations
N/A