Skip to content

Add deploy dry-run plan, tx status polling, multisig validation, and WASM pre-flight - #700

Merged
Nanle-code merged 5 commits into
Nanle-code:masterfrom
devsimze:feat/deploy-dryrun-txpolling-multisig-wasm-preflight
Jul 29, 2026
Merged

Add deploy dry-run plan, tx status polling, multisig validation, and WASM pre-flight#700
Nanle-code merged 5 commits into
Nanle-code:masterfrom
devsimze:feat/deploy-dryrun-txpolling-multisig-wasm-preflight

Conversation

@devsimze

@devsimze devsimze commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • [2026 Deployment] Add a deterministic dry-run deployment plan #688 Deploy dry-run planstarforge deploy --dry-run now shows network, account public key, code hash (SHA-256), estimated fees (stroops + XLM), explicit authorization requirements (required signer + signing method), and the exact planned on-chain mutations (Op 1: upload WASM bytecode, Op 2: create contract instance) without submitting any transaction.

  • [2026 Soroban] Poll transaction status to a terminal result #689 Transaction status polling — adds poll_transaction_status() to src/utils/soroban.rs with bounded polling (default 30 × 2 s). Handles all five states: SUCCESS, ERROR/FAILED, DUPLICATE, NOT_FOUND (three consecutive → expired TTL), and PENDING (budget exhausted → actionable hint).

  • [2026 Multisig] Validate thresholds and signer weights before export #691 Multisig validation — adds validate_proposal() to src/utils/multisig_builder.rs catching impossible thresholds, zero thresholds, duplicate signers (case-insensitive), empty signer keys, and unauthorized signatures. Warns on 1-of-1, unanimous-consent, and minority-threshold configs. New starforge multisig validate <proposal> [--json] subcommand.

  • [2026 WASM] Enforce configurable contract size and resource limits #692 WASM pre-flight — new src/utils/wasm_preflight.rs with WasmPolicy, PreflightReport, validate_wasm_bytes(), and validate_wasm_file(). Validates magic header, enforces the Soroban 128 KiB size ceiling, detects forbidden WASI/OS-level imports, and checks required exports via a lightweight LEB128 section scanner. Integrated into starforge deploy — blocks submission on any violation before the confirmation prompt.

Test plan

  • cargo test --lib — 223 unit tests pass (includes 13 new wasm_preflight unit tests)
  • cargo test --test wasm_preflight — 12 integration tests pass
  • cargo test --test multisig_validation — 14 integration tests pass
  • cargo test --test tx_status_polling — 11 integration tests pass
  • cargo test --test deploy_dry_run — 11 integration tests pass

Closes #688
Closes #689
Closes #691
Closes #692

Abidoyesimze and others added 5 commits July 29, 2026 14:03
…Nanle-code#692)

Adds src/utils/wasm_preflight.rs with WasmPolicy, PreflightReport,
validate_wasm_bytes(), and validate_wasm_file(). Detects invalid magic
headers, size-limit violations (Soroban 128 KiB ceiling), forbidden WASI
imports, and missing required exports via a lightweight LEB128 section
scanner. Integrated into the deploy command: submissions are blocked on
any policy violation before the confirmation prompt.

Closes Nanle-code#692

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ons (Nanle-code#689)

Adds TxStatus enum (Pending, Duplicate, Error, NotFound, Success),
TxStatusResult, PollConfig, and poll_transaction_status() to
src/utils/soroban.rs. Polls getTransaction with a configurable budget
(default 30 polls × 2 s). Distinguishes all five terminal states:
three consecutive NOT_FOUND responses are treated as expired TTL,
DUPLICATE is surfaced with a clear message, and budget exhaustion
returns Pending with a hint to check later via `starforge tx <hash>`.

Closes Nanle-code#689

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ers, and auth (Nanle-code#691)

Adds validate_proposal() to src/utils/multisig_builder.rs detecting:
zero threshold, impossible threshold (> signer count), no signers,
duplicate signers (case-insensitive), empty signer keys, and signatures
from parties not in the authorized signer list. Emits warnings for
1-of-1 proposals, unanimous-consent configs, and minority thresholds.
Adds a new `starforge multisig validate <proposal> [--json]` subcommand.

Closes Nanle-code#691

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… preflight (Nanle-code#688)

Extends run_dry_run in src/commands/deploy.rs to surface all information
needed to review a deployment without submitting:
- Check 5: explicit authorization requirements (required signer public key
  and signing method)
- New "Planned On-Chain Mutations" section listing both operations
  (InvokeHostFunction Upload WASM + InvokeHostFunction Create instance)
  with code hash, size, and authorizing key per op
- WASM pre-flight (wasm_preflight::validate_wasm_bytes) now runs in both
  the dry-run path and the live deploy path, blocking on violations
- Fee display shows stroops and XLM equivalent
Also registers pub mod wasm_preflight in src/utils/mod.rs.

Closes Nanle-code#688

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Nanle-code
Nanle-code merged commit 16ef976 into Nanle-code:master Jul 29, 2026
1 check failed
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@devsimze 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

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

Labels

None yet

Projects

None yet

3 participants