Skip to content

keep_alive never refreshes instance storage, so a contract kept alive only via keep_alive can still archive Admin/Oracle/Treasury #566

Description

@chonilius

Problem

keep_alive is the permissionless TTL refresh (#97) meant for quiet periods. In all three contracts it extends the target record and its sub-records, but never calls extend_instance_ttl(&env) (grep -c extend_instance_ttl inside each keep_alive → 0). Instance storage holds Admin, Oracle, Treasury, FeeBps, Paused and MaxSponsors. If no other state-changing call happens for the instance TTL window, the instance archives, and every entrypoint fails until someone restores it, even though keepers were dutifully calling keep_alive.

Suggested fix

Call extend_instance_ttl(&env) in every keep_alive, and add a TTL test that advances the ledger past the instance threshold while calling only keep_alive.

Related: #38, #97

Activity

  1. added
    bugSomething isn't working
    Stellar WaveIssues in the Stellar wave program
    on Oct 13, 2026
  2. urielit1313-creator commented on Oct 13, 2026

    @urielit1313-creator

    Submitted PR #570 resolving this issue across all contracts (escrow, maintenance-pool, and milestones).

    Details

    • Called extend_instance_ttl(&env) inside keep_alive across all three contracts so periodic calls maintain active instance storage (Admin, Oracle, Treasury, FeeBps, Paused, MaxSponsors) alongside persistent records.
    • Added comprehensive regression tests in each contract test suite (test_keep_alive_extends_instance_ttl) advancing ledger sequence past the 100,000 threshold, executing keep_alive, and asserting instance storage TTL is restored to 500,000 ledgers.
    • 178/178 tests passing across the workspace with 0 warnings.

    Payout Address (Base USDC):
    0xfE777c43e4B0A24fFA1527eD520d1E7f9ECED483

  3. huangji6693-max commented on Oct 27, 2026

    @huangji6693-max

    Submitted PR #764 calling extend_instance_ttl(&env) in keep_alive across escrow, milestones, and maintenance-pool, with TTL regression tests (test_keep_alive_refreshes_instance_ttl) in all three contracts: #764

  4. ravimahatonp commented on Oct 27, 2026

    @ravimahatonp

    Hello team,

    I examined the issue "keep_alive never refreshes instance storage, so a contract kept alive only via keep_alive can still archive Admin/Oracle/Treasury" in mergefi/contracts and would be glad to implement the required changes.

    I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.

    I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions