Add deploy dry-run plan, tx status polling, multisig validation, and WASM pre-flight - #700
Merged
Nanle-code merged 5 commits intoJul 29, 2026
Conversation
…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>
|
@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! 🚀 |
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
[2026 Deployment] Add a deterministic dry-run deployment plan #688 Deploy dry-run plan —
starforge deploy --dry-runnow 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()tosrc/utils/soroban.rswith bounded polling (default 30 × 2 s). Handles all five states:SUCCESS,ERROR/FAILED,DUPLICATE,NOT_FOUND(three consecutive → expired TTL), andPENDING(budget exhausted → actionable hint).[2026 Multisig] Validate thresholds and signer weights before export #691 Multisig validation — adds
validate_proposal()tosrc/utils/multisig_builder.rscatching 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. Newstarforge multisig validate <proposal> [--json]subcommand.[2026 WASM] Enforce configurable contract size and resource limits #692 WASM pre-flight — new
src/utils/wasm_preflight.rswithWasmPolicy,PreflightReport,validate_wasm_bytes(), andvalidate_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 intostarforge deploy— blocks submission on any violation before the confirmation prompt.Test plan
cargo test --lib— 223 unit tests pass (includes 13 newwasm_preflightunit tests)cargo test --test wasm_preflight— 12 integration tests passcargo test --test multisig_validation— 14 integration tests passcargo test --test tx_status_polling— 11 integration tests passcargo test --test deploy_dry_run— 11 integration tests passCloses #688
Closes #689
Closes #691
Closes #692