docs: pin toolchain and document reproducible builds for deployed contracts - #68
Open
Fabluchy wants to merge 2 commits into
Open
docs: pin toolchain and document reproducible builds for deployed contracts#68Fabluchy wants to merge 2 commits into
Fabluchy wants to merge 2 commits into
Conversation
test_multi_sponsor_refund_returns_exact_contributions_to_each_sponsor set the ledger timestamp to 300 with a fund deadline of 200, which is still inside refund's deadline + GRACE_PERIOD (14 days) window — so the permissionless-refund path never opened and the call failed the admin auth check under `set_auths(&[])`. Align it with the other permissionless tests by jumping to deadline + GRACE_PERIOD exactly, and clean up pre-existing trailing whitespace that failed `cargo fmt --check`. This was failing on main (29/30 escrow tests) and would have kept CI red. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
…tracts
Closes the reproducible-build / supply-chain verification gap for the
deployed testnet contracts:
- Add rust-toolchain.toml pinning rustc 1.95.0 (with the wasm32v1-none
target), so rustup auto-selects the exact toolchain instead of relying
on README prose. dtolnay/rust-toolchain in CI picks this up too.
- Pin soroban-sdk exactly ("=26.1.0") instead of a caret range, removing
one further axis of non-determinism independent of Cargo.lock, and
record the decision in the README.
- Publish the actual on-chain WASM SHA-256 for all three deployed testnet
contracts in the README's contract table, read directly from the ledger
(not computed from source). Document that they were built from commit
8a7efbf with rustc 1.95.0 on macOS, that current main does not produce
them (pre-crowdfunding source), and that even at that commit a Linux
build is ~99% byte-identical but not hash-identical due to host-dependent
LLVM/LTO codegen and the embedded absolute CARGO_HOME path.
- Add the full verification recipe (build -> sha256sum -> make verify),
the no-cargo-update rule, and scripts/verify-wasm-hash.mjs + `make
verify` to compare local builds against the ledger-recorded hashes.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@Fabluchy is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Closes #59 — makes the deployed testnet contract WASM independently verifiable against published source, and honestly documents how far that verification currently goes.
What changed
rust-toolchain.toml— pinsrustc 1.95.0(+ thewasm32v1-nonetarget) so rustup auto-selects the exact toolchain for anyone building this repo. CI'sdtolnay/rust-toolchainsteps pick this up automatically (no explicittoolchaininput is set).Cargo.toml— soroban-sdk pinned exactly (=26.1.0) instead of a caret range; decision recorded in the README (issue No reproducible-build / supply-chain verification — deployed testnet WASM hash cannot be independently confirmed against published source #59 asks for this to be considered).README.md—cargo updatebefore a build you intend to deploy rule, the soroban-sdk pinning decision, and the honest state of the currently-deployed bytecode (see below).scripts/verify-wasm-hash.mjs+make verify— compare locally built.wasmagainst the ledger-recorded hash for each deployed contract; exits non-zero on mismatch.contracts/escrow/src/test.rs— fixed a pre-existing failing test (test_multi_sponsor_refund_returns_exact_contributions_to_each_sponsor): it set the ledger timestamp inside thedeadline + GRACE_PERIODwindow, so the permissionless-refund path never opened and the call failed auth. Was failing onmain(29/30 escrow tests) and would have kept CI red.What the verification found (important, documented in the README)
Forensics on the deployed WASM (embedded
contractmetav0metadata recordsrsver = 1.95.0, and panic-location strings embed/Users/user/.cargo/...registry paths) show the deployed contracts were built from commit8a7efbf(2026-07-05) with rustc 1.95.0 on macOS:maindoes not produce the deployed hashes — the deployed contracts predate the multi-sponsor crowdfunding,mergefi-commonextraction, and milestones-crowdfunding changes.make verifyonmainreports a mismatch by design until the contracts are redeployed.8a7efbfwith rustc 1.95.0, a Linux build is ~99% byte-identical but not hash-identical to the deployed macOS build (16 of 184 functions differ by 1–2 bytes plus function-ordering; sizes and metadata match exactly) — because soroban-sdk panic locations embed the build machine's absoluteCARGO_HOMEpath and LLVM/LTO codegen is host-dependent. This is precisely the supply-chain limitation the issue is about, and it's now documented with the exact hashes so a reader can see it rather than trust it.The ledger-recorded hashes (published in the README) are the ground truth via
make verify.Verification
cargo test --workspace— 56/56 pass (30 escrow, 19 milestones, 7 maintenance-pool)cargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --check— cleanmake build(wasm32v1-none, rustc 1.95.0) — succeeds;make verifycorrectly reports mismatch vs. the pre-crowdfunding deployed bytecode (documented)closes #59