[Contracts] Add a migration status view with the executable ledger
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust, typescript
- Domain
- backend-api-design, databases
Research direction
Read packages/contracts/vault/src/storage.rs and packages/contracts/vault/src/lib.rs to find the snapshot type, cooldown, and existing getter. Add the separate read-only status view while keeping the cooldown and getter unchanged; use packages/stellar-sdk-helpers/src/migration-keeper.ts as context for its consumer. Add tests for pending, ready, and empty states, then run the specified workspace tests and clippy command.
Written by the indexing model from the issue text.
Description
Summary
get_migration_snapshot returns the target adapter, snapshot value, and snapshot ledger, but not the earliest ledger at which migrate_adapter can execute. A client must recompute the cooldown from a constant.
Motivation
Operators and dashboards need one read that answers whether a pending migration is ready. Recomputing the threshold off chain can drift if the contract constant changes or a client uses the wrong value.
Proposed Solution
Add a read-only migration status view that returns the snapshot plus the earliest executable ledger and the remaining ledgers. Return a clear empty state when no migration is pending. Keep the existing snapshot getter for compatibility. Cover pending, ready, and empty states with tests.
Scope
| Field | Value |
|---|---|
| Area | Contracts |
| Protocol affected | Both |
| Network | testnet and mainnet |
| Breaking change? | No |
Alternatives Considered
Adding fields to the snapshot type would change a stored value and require a migration path. A separate view is additive and does not alter storage.
Acceptance Criteria
- One read returns the snapshot, earliest ledger, and remaining ledgers
- The view reports an empty state when no migration is pending
- The existing snapshot getter is unchanged
- Tests cover pending, ready, and empty states
-
cargo test --workspaceandcargo clippy --all-targets -- -D warningspass
Additional Context
The snapshot type and cooldown are in packages/contracts/vault/src/storage.rs and packages/contracts/vault/src/lib.rs. The cooldown must not be shortened. The migration keeper in packages/stellar-sdk-helpers/src/migration-keeper.ts is a likely consumer.
- Dominant language
- TypeScript
- Stars
- 17
- Forks
- 129
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 54
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drydocs/meridian
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
drydocs/meridian#1503 · 1 comment ·
Maintainers usually reply within 2 days
-
[Docs] Add a supported wallet capability matrixPossibly taken @Joeljosef7 claimed this 4 days ago. Opendocs frontend Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drydocs/meridian#1349 · 6 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Test] Add cross-language conformance vectors for vault mathPossibly taken @VeronicDev claimed this 3 days ago. Opencontracts medium sdk Stellar Wave testing
drydocs/meridian#1444 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Security] Extend CSP and security headers to landing and docs routesPossibly taken @anietie234 claimed this 3 days ago. Openapi frontend medium security Stellar Wave
drydocs/meridian#1443 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Docs] Establish ADRs and backfill architecture decisionsPossibly taken @Sammydz456 claimed this 3 days ago. Opendocs medium Stellar Wave
drydocs/meridian#1442 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in drydocs/meridian
Similar issues
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePossibly taken @jianyx1 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#8354 ·
Maintainers usually reply within 1 day
-
frontend: Job: Details do not show completed or failed indexes or the per-index backoff limitsPossibly taken @arshil42 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-sigs/headlamp#8630 ·
Maintainers usually reply within 1 day
-
bug from-app needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
nightly-labs/openbot#15640 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
comp/desktop desktop/settings P2 tool/skills type/perf
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#159515 ·
Maintainers usually reply within 1 day