Fixes three storage-TTL bugs where persistent Soroban entries could expire from storage (default ~20 days of inactivity) well before the business object they represent (a pending claim, a locked capital position, or a policy) reaches its natural end of life:
- claims-processor (#183):
submit_claim,auto_process, andevaluate_and_settle(the write path shared byprocess_claim,auto_process, andbatch_auto_process) now callextend_ttlon theClaimandPolicyClaimpersistent entries whenever they are written, so a pending claim can no longer be evicted from storage before a keeper processes it. - risk-pool (#182):
lock_for_policy(a.k.a.lock_capital) andrelease_for_claimnow callextend_ttlon theLockentry. Also applied the same fix torelease_for_expiry, which writes the identicalLockentry and was subject to the same eviction risk. A capital lock backing a long-dated policy will no longer silently expire from storage before the policy matures. - policy-engine (#181):
create_productandbuy_policynow callextend_ttlon theProduct/ProductKeyandPolicy/UserPoliciespersistent entries respectively, so a policy purchased for up to the product'smax_duration_daysno longer risks losing its storage entry (and any associated claims data) to rent expiry.
Each contract extends entries out to ~1 year (6_312_000 ledgers at ~5s/ledger)
once they drop below a ~30-day (518_400 ledger) threshold.
-
cargo build --workspacesucceeds -
cargo test --workspacepasses
- oracle-verifier (#180): investigated and found already fixed —
add_oracleandupdate_oracle_weightboth rejectweight == 0viaError::InvalidWeight, and this is covered bytest_cannot_update_oracle_to_invalid_weightincontracts/oracle-verifier/src/test.rs. No code change needed.