You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Soroban persistent and instance storage entries have ledger time-to-live behavior. Long-lived market, stake, entitlement, admin, and configuration records can become unavailable if contracts do not apply a deliberate renewal policy. The repository has many contract crates, but no shared, tested TTL policy is documented for critical state.
Goal
Define and implement a consistent TTL renewal policy for critical BACKit contract state, with tests proving active and claimable records remain available for their required lifecycle.
Acceptance criteria
Inventory instance, persistent, and temporary storage across the core call_registry, outcome_manager, prediction_market, and prediction_market_futures crates.
Classify records by required retention window, including active markets, unresolved outcomes, unclaimed payouts/refunds, configuration, and terminal historical data.
Add shared TTL thresholds and extension values with documented ledger/time assumptions; avoid unexplained magic numbers.
Renew TTL on appropriate read/write lifecycle operations without allowing arbitrary callers to create unbounded storage growth.
Ensure claimable payout/refund state remains live through its documented claim window.
Define the behavior for already-expired or archived non-critical history instead of silently recreating incorrect state.
Emit no misleading business event solely because TTL was renewed.
Tests advance ledger sequence near and beyond thresholds and cover renewal, non-renewal, terminal state, and claim-window boundaries.
Tests demonstrate one user's activity cannot indefinitely renew unrelated users' records.
Document estimated rent/resource implications and the rationale for each retention class.
Keep public contract behavior backward-compatible unless an unavoidable change is separately documented for maintainer approval.
Package:
packages/contractsComplexity: High
Problem
Soroban persistent and instance storage entries have ledger time-to-live behavior. Long-lived market, stake, entitlement, admin, and configuration records can become unavailable if contracts do not apply a deliberate renewal policy. The repository has many contract crates, but no shared, tested TTL policy is documented for critical state.
Goal
Define and implement a consistent TTL renewal policy for critical BACKit contract state, with tests proving active and claimable records remain available for their required lifecycle.
Acceptance criteria
call_registry,outcome_manager,prediction_market, andprediction_market_futurescrates.Technical pointers
packages/contracts/sharedpackages/contracts/call_registry/src/storage.rspackages/contracts/outcome_manager/src/storage.rspackages/contracts/prediction_market/src/storage.rspackages/contracts/prediction_market_futures/src/lib.rsOut of scope