Skip to content

feat(stellar): preflight network checks before deploy#80

Open
gloriaelishahabu wants to merge 2 commits into
wraith-protocol:mainfrom
gloriaelishahabu:feat/network-preflight-check
Open

feat(stellar): preflight network checks before deploy#80
gloriaelishahabu wants to merge 2 commits into
wraith-protocol:mainfrom
gloriaelishahabu:feat/network-preflight-check

Conversation

@gloriaelishahabu

Copy link
Copy Markdown

Summary

Adds a standalone preflight validation script for Soroban network deployments and
hooks it into deploy.sh as the first step, per #63.

Currently deploy.sh accepts testnet|futurenet|mainnet but never validates that
the network is actually usable before starting a deploy — a bad RPC URL, an
unreachable friendbot, or a missing identity only surfaces mid-deploy with a
confusing error. This adds a fast-failing check up front.

Closes #63

Changes

  • stellar/scripts/check-network.sh — new standalone script, callable
    independently or as a preflight step. For the given network it verifies:

    • network passphrase is configured
    • RPC endpoint responds to a getHealth call
    • friendbot is reachable (testnet/futurenet only — skipped for mainnet)
    • the deploying identity exists locally
    • any network-specific required env vars are set (e.g. mainnet account)

    Prints a summary table of each check and exits non-zero if any check fails,
    with a clear error message per failure.

  • stellar/deploy.sh — now calls check-network.sh "$NETWORK" as the very
    first step and aborts before doing any work if preflight fails.

  • .github/workflows/check-network-test.yml — CI test that runs the script
    against an invalid network name (expects non-zero exit) and against testnet
    (expects it to run and print the summary table).

  • stellar/README.md — documents the new script and usage.

How to test

./stellar/scripts/check-network.sh testnet
./stellar/scripts/check-network.sh mainnet
./stellar/scripts/check-network.sh badnet   # should fail with usage error
./stellar/deploy.sh testnet                 # preflight now runs first

Notes / follow-ups

  • RPC URLs and passphrases are currently hardcoded in the script; happy to move
    these to a shared config file if the maintainers prefer a single source of
    truth with deploy.sh.
  • Identity check uses stellar keys address <name>; let me know if the project
    has a different convention for resolving the deploying identity.

This script performs preflight validation for a Soroban deployment network, checking network passphrase, RPC URL reachability, friendbot availability, identity existence, and required environment variables.
Added network preflight checks section to README.
@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

Development

Successfully merging this pull request may close these issues.

Per-network deployment config validation

1 participant