This document defines the release artifact provenance requirements, WASM compilation hash verification rules, and snapshot check-in standards for the ApexChainx Contracts codebase.
To maintain deterministic, auditable, and secure releases of Soroban smart contract WASM artifacts, all release outputs must conform to explicit build provenance guidelines:
- Every release
.wasmbinary must be compiled in a reproducible environment. - Cryptographic SHA-256 checksums must be recorded and checked into
artifacts/or GitHub release metadata. - Snapshot test files must follow deterministic normalization rules to prevent environmental drift across local dev (Windows/macOS) and CI (Linux) environments.
Contract WASM binaries must be compiled using standard Soroban tooling:
cargo build --target wasm32-unknown-unknown --releaseGenerate and verify SHA-256 checksums for target outputs:
sha256sum target/wasm32-unknown-unknown/release/apexchainx_calculator.wasm > artifacts/apexchainx_calculator.wasm.sha256CI validation checks that the compiled WASM checksum matches the committed provenance artifact:
sha256sum -c artifacts/apexchainx_calculator.wasm.sha256- Deterministic Normalization: All test snapshot outputs must normalize timestamps, OS file separators (
/vs\), and line endings (LFvsCRLF). - Atomic Commits: Snapshot updates must be checked in alongside the code change that altered contract output or state structure.
- No Drift in CI: Pull requests with uncommitted or non-reproducible snapshot changes will fail the CI
snapshot-checkjob.
- WASM output compiled with pinned toolchain (
rust-toolchain.toml). - SHA-256 hash verified and saved in
artifacts/. - Snapshot files normalized to POSIX LF line endings.
- All contract tests and API compatibility checks pass cleanly.