Problem Statement
Soroban storage requires explicit TTL management. With no off-ramp, abandoned storage entries (learner progress on completed courses, old DataKey::Submission, refunded quest records, revoked badge entries) accumulate and rent-charges continue invisibly.
There is no contract-internal sweep/recovery mechanism today.
Why It Matters
- Long-term protocol sustainability depends on storage costcontrol.
- Without sweeps, the storage footprint grows monotonically.
Expected Outcome
- New admin-only function
sweep_storage(env, admin, sweep_learning_keys: bool):
- Iterates or samples for abandoned storage entries.
- Removes or extends TTL based on policy.
- New view function
estimated_storage_footprint(env) -> u32 (count).
- Document cost-benefit tradeoffs.
Acceptance Criteria
- Tests confirm sweep removes targeted entries.
estimated_storage_footprint matches expected count.
Implementation Notes
Files / Modules Affected
All six contracts; cross-cutting.
Dependencies
Issue #19, Issue #7.
Difficulty
Hard.
Estimated Effort
1 week.
Suggested Labels
reliability, storage, P2, long-term
Problem Statement
Soroban storage requires explicit TTL management. With no off-ramp, abandoned storage entries (learner progress on completed courses, old
DataKey::Submission, refunded quest records, revoked badge entries) accumulate and rent-charges continue invisibly.There is no contract-internal sweep/recovery mechanism today.
Why It Matters
Expected Outcome
sweep_storage(env, admin, sweep_learning_keys: bool):estimated_storage_footprint(env) -> u32(count).Acceptance Criteria
estimated_storage_footprintmatches expected count.Implementation Notes
Files / Modules Affected
All six contracts; cross-cutting.
Dependencies
Issue #19, Issue #7.
Difficulty
Hard.
Estimated Effort
1 week.
Suggested Labels
reliability,storage,P2,long-term