Background
Soroban storage keys can expire and be archived if their Time-To-Live (TTL) is not bumped regularly. We need to automatically extend the TTL of active sessions and expert profiles during state-modifying operations to prevent data loss.
Goal
Implement helper utilities to automatically bump the TTL of instance and persistent storage keys whenever they are accessed.
Acceptance Criteria
- Automatically bump instance/persistent storage TTL by at least 100,000 ledgers on
start_session, settle_session, and register_expert.
- Use
env.storage().persistent().extend_ttl() and env.storage().instance().extend_ttl().
- Configurable minimum and maximum TTL thresholds in admin settings.
Key Files
contracts/src/storage.rs, contracts/src/lib.rs
Background
Soroban storage keys can expire and be archived if their Time-To-Live (TTL) is not bumped regularly. We need to automatically extend the TTL of active sessions and expert profiles during state-modifying operations to prevent data loss.
Goal
Implement helper utilities to automatically bump the TTL of instance and persistent storage keys whenever they are accessed.
Acceptance Criteria
start_session,settle_session, andregister_expert.env.storage().persistent().extend_ttl()andenv.storage().instance().extend_ttl().Key Files
contracts/src/storage.rs,contracts/src/lib.rs