Storage archival recovery / resurrection strategy
Labels: reliability, storage, priority/high
Difficulty: High · Effort: M
Backlog slot: 62
Problem Statement
Soroban's TTL model archives entries that are not bumped in time. The contract currently relies on read-path bump, but: (a) off-chain indexing clients do not call read paths, so their cached views go stale; (b) any code path that hasn't been touched for PERSISTENT_BUMP_THRESHOLD (≈30 days) can be archived silently; (c) there is no documented, end-to-end documented "what if archival happens" recovery playbook.
Why it Matters
- Archival is not contract-level loss — it is observable in transaction results but produces panics for callers hitting archived entries without
try_* variants.
- A documented strategy with automated "resurrection" entrypoints is a bar all serious Soroban projects clear.
Technical Context
storage.rs::bump_persistent() is the only TTL extension.
get_milestone(env, index) panics on archived keys via unwrap_or_else.
Expected Outcome
- Add a public
resurrect_storage(env) that recreates canonical DataKey entries (no-op if present, fresh reads if archived) and emits a storage_restored event.
- Document the playbook in
docs/storage-recovery.md including failure modes for archived milestones when storage quota is exhausted.
- Add
try_get_milestone non-panicking variant for off-chain indexers.
Acceptance Criteria
Files Likely Affected
campaign/src/storage.rs, campaign/src/lib.rs, docs/storage-recovery.md
Dependencies
Issue #33.
Storage archival recovery / resurrection strategy
Labels:
reliability,storage,priority/highDifficulty: High · Effort: M
Backlog slot: 62
Problem Statement
Soroban's TTL model archives entries that are not bumped in time. The contract currently relies on read-path bump, but: (a) off-chain indexing clients do not call read paths, so their cached views go stale; (b) any code path that hasn't been touched for
PERSISTENT_BUMP_THRESHOLD(≈30 days) can be archived silently; (c) there is no documented, end-to-end documented "what if archival happens" recovery playbook.Why it Matters
try_*variants.Technical Context
storage.rs::bump_persistent()is the only TTL extension.get_milestone(env, index)panics on archived keys viaunwrap_or_else.Expected Outcome
resurrect_storage(env)that recreates canonicalDataKeyentries (no-op if present, fresh reads if archived) and emits astorage_restoredevent.docs/storage-recovery.mdincluding failure modes for archived milestones when storage quota is exhausted.try_get_milestonenon-panicking variant for off-chain indexers.Acceptance Criteria
resurrect_storage, then asserts behaviour.docs/storage-recovery.md.CONTRIBUTING.md.Files Likely Affected
campaign/src/storage.rs,campaign/src/lib.rs,docs/storage-recovery.mdDependencies
Issue #33.