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
Description
packages/stellar/src/soroban-migration.tshandles 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
Suggested Execution
Branch:
feat/soroban-contract-upgrade-orchestrationImplement Changes
upgrade-orchestrator.tsinpackages/stellar/src/simulateTransactionwithout broadcastingTest and Commit
Run
pnpm test --filter=stellar -- upgrade-orchestratorand confirm breaking change detection tests pass.Example Commit Message
Guidelines
main, keep PRs focused on one issuepnpm lintandpnpm typecheckpass before review