Skip to content

Implement Soroban Contract Upgrade Orchestration with State Migration Safety Verification #770

Description

@temma02

Description

packages/stellar/src/soroban-migration.ts handles contract migrations but has no orchestration layer that verifies state schema compatibility before upgrading. Implement an upgrade orchestration service that validates migration safety before submitting the upgrade transaction.

Requirements and Context

  • Compare old and new contract ABI schemas before upgrade
  • Block upgrades that remove or rename existing storage keys without a migration path
  • Support dry-run mode: simulate the upgrade and validate state without committing
  • Emit a detailed diff report of schema changes for developer review

Suggested Execution

Branch: feat/soroban-contract-upgrade-orchestration

Implement Changes

  • Add upgrade-orchestrator.ts in packages/stellar/src/
  • Implement ABI schema comparison using a structural diff algorithm
  • Add dry-run mode that calls simulateTransaction without broadcasting
  • Add tests for safe upgrade, breaking change detection, and dry-run validation

Test and Commit

Run pnpm test --filter=stellar -- upgrade-orchestrator and confirm breaking change detection tests pass.

Example Commit Message

feat(soroban): add contract upgrade orchestration with state migration safety verification

Co-authored-by: <your-name>

Guidelines

  • Branch off main, keep PRs focused on one issue
  • All new code must include unit or integration tests
  • Ensure pnpm lint and pnpm typecheck pass before review
  • Link this issue in your PR description
  • Request review from at least one maintainer before merging

Activity

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programsorobanSoroban smart contract issuesstellarStellar blockchain issues

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions