Skip to content

feat: add Soroban escrow deployment verification and reproducibility workflow - #276

Closed
Felamsy wants to merge 2 commits into
Lumina-eX:mainfrom
Felamsy:security/issue-251-soroban-escrow-deployment-verification
Closed

Felamsy wants to merge 2 commits into
Lumina-eX:mainfrom
Felamsy:security/issue-251-soroban-escrow-deployment-verification

Conversation

@Felamsy

@Felamsy Felamsy commented Nov 19, 2026

Copy link
Copy Markdown

Overview

This PR adds a reproducible deployment workflow for the Soroban escrow contract on Stellar Testnet. It pins the build toolchain, records WASM artifact hashes and deployment metadata, validates initialization and network configuration before and after deployment, and documents the deployment and redeployment procedures so deployed contracts can be verified against reviewed source.

Related Issue

Changes

🔐 Deployment Verification

  • [MODIFY] contracts/contracts/escrow/src/lib.rs

    • Adjustments to the escrow contract to support initialization parameter validation used by the deployment flow.
  • [MODIFY] contracts/contracts/escrow/Makefile

    • Pinned, reproducible build targets for the escrow WASM artifact.
  • [MODIFY] contracts/deploy_escrow_testnet.sh

    • Testnet deployment script that validates network configuration, records the artifact hash, contract ID, and deployment transaction hash, and fails without writing incomplete records.
  • [MODIFY] app/api/contracts/deploy/route.ts

    • Deployment API route updated to validate configuration and return actionable errors.

⚙️ CI and Configuration

  • [MODIFY] .github/workflows/ci.yml

    • Builds the contract with the pinned toolchain, runs contract tests, and blocks deployment on test, build, or configuration failure.
  • [MODIFY] env.example

    • Documents required Testnet configuration values, kept separate from any Mainnet settings.

📚 Documentation

  • [MODIFY] docs/DEPLOYMENT_GUIDE.md
  • [ADD] docs/soroban-escrow-deployment.md
    • Environment setup, deployment procedure, redeployment workflow, and how to verify a deployed contract against its recorded artifact hash.

Verification Results

Changes were made to the files listed above. Run the contract build and tests locally and confirm CI passes on this branch before merging.

Acceptance Criteria Status
CI builds with pinned toolchain and runs contract tests ✅ Wired in ci.yml
Deployment records capture network, contract ID, WASM hash, tx hash, timestamp ✅ Written by deploy_escrow_testnet.sh
Initialization parameters and network configuration are validated ✅ Checked in deploy script and API route
Deployment failures produce actionable errors and no partial records ✅ Script exits before writing records on failure
Testnet and Mainnet configuration are separated ✅ Documented in env.example and deployment docs
Mainnet deployment requires manual approval ⚠️ Not covered by the changed files; needs a follow-up gate
Redeployments preserve historical records ⚠️ Documented; verify append behavior in the script

Closes #251

@drips-wave

drips-wave Bot commented Nov 19, 2026

Copy link
Copy Markdown

@Felamsy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Felamsy

Felamsy commented Nov 21, 2026

Copy link
Copy Markdown
Author

this PR is ready for another review. I resolved the merge conflicts with the main branch (pushed 9740841).
Files changed: env.example

@Felamsy
Felamsy force-pushed the security/issue-251-soroban-escrow-deployment-verification branch from 9740841 to 6782e41 Compare November 22, 2026 03:57
@drips-wave

drips-wave Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Possible malicious code: please review before merging.

An automated security scan flagged files in this pull request that appear to contain malicious code. Code like this can run automatically when a project is opened in an editor or its dependencies are installed, so it could compromise the machine of anyone who checks out this branch.

Automated scans can be wrong, so this may be a false positive. Maintainers: please review the flagged files carefully before merging, on GitHub in your browser rather than by checking out the branch. The malicious part is often hidden far off to the right of an ordinary-looking line, so scroll sideways through each file.

@Felamsy: this pull request adds or changes these files, possibly without your knowledge. Malware like this spreads by adding itself to repositories on machines it has infected, so your machine and / or GitHub account may be compromised. Please review your machine for a possible malware infection, and rotate your GitHub credentials / SSH keys as needed.

Flagged files at commit 6782e41:

Only merge once you're confident these files are safe.

ℹ️ Posted automatically by Drips Wave. Questions? Contact support@drips.network.

@Felamsy Felamsy closed this Nov 22, 2026
@Felamsy

Felamsy commented Nov 22, 2026

Copy link
Copy Markdown
Author

Closing: branch was force-pushed with Wave malware droppers (init / api.js / padded configs / node init && hooks). Clean the machine, rotate GitHub credentials, then reopen a clean PR if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Soroban Escrow Deployment Verification & Reproducibility

1 participant