Summary
initialize extends instance-storage TTL exactly once (contracts/tholos/src/lib.rs:289-291). Every other function that reads or writes instance storage, update_resolvers, propose_rotation/vote_rotation/cancel_rotation, set_paused, assert_outcome, dispute, finalize, resolve, never calls extend_ttl again. Contrast this with set_assertion, which explicitly re-extends the persistent Assertion entry's TTL on every write for exactly this reason. If INSTANCE_BUMP_AMOUNT elapses without an external ExtendFootprintTTLOp, instance storage (admin, token, resolvers, paused flag) becomes eligible for archival, and every function depending on it starts failing until a RestoreFootprintOp is submitted.
Scope
- Add a shared helper that bumps instance TTL, called from every state-changing entrypoint (
assert_outcome, dispute, finalize, resolve, update_resolvers, set_paused, and the rotation functions).
- No storage layout changes, this is purely about calling
extend_ttl more often.
Proposed approach
fn touch_instance_ttl(env: &Env) {
env.storage()
.instance()
.extend_ttl(INSTANCE_LIFETIME_THRESHOLD, INSTANCE_BUMP_AMOUNT);
}
Call this from the top of each state-changing entrypoint, mirroring how set_assertion already renews the persistent side. Add a test confirming instance TTL is extended after a call to one of these functions, not just at initialize.
Summary
initializeextends instance-storage TTL exactly once (contracts/tholos/src/lib.rs:289-291). Every other function that reads or writes instance storage,update_resolvers,propose_rotation/vote_rotation/cancel_rotation,set_paused,assert_outcome,dispute,finalize,resolve, never callsextend_ttlagain. Contrast this withset_assertion, which explicitly re-extends the persistentAssertionentry's TTL on every write for exactly this reason. IfINSTANCE_BUMP_AMOUNTelapses without an externalExtendFootprintTTLOp, instance storage (admin, token, resolvers, paused flag) becomes eligible for archival, and every function depending on it starts failing until aRestoreFootprintOpis submitted.Scope
assert_outcome,dispute,finalize,resolve,update_resolvers,set_paused, and the rotation functions).extend_ttlmore often.Proposed approach
Call this from the top of each state-changing entrypoint, mirroring how
set_assertionalready renews the persistent side. Add a test confirming instance TTL is extended after a call to one of these functions, not just atinitialize.