Join the discussion on Telegram
Why this matters
Soroban persistent storage entries are not permanent — every entry has a Time To Live (TTL) and is archived once it expires, after which reads fail until the entry is restored. The StreamContract writes every stream to persistent storage in save_stream (contracts/stream_contract/src/storage.rs) and the protocol config to instance storage, but nothing in the contract ever extends those TTLs. A long-running stream (e.g. a 1-year salary stream) can have its on-chain state archived out from under it, causing withdraw, cancel_stream, and view calls to fail even though the stream is logically still active. For a payment-streaming protocol where streams are explicitly designed to live a long time, this is a correctness/availability gap that must be addressed before mainnet.
Acceptance criteria
Files to touch
contracts/stream_contract/src/storage.rs
contracts/stream_contract/src/lib.rs
contracts/stream_contract/src/test.rs
Out of scope
- A separate keeper/cron service to bump TTLs off-chain (this issue is about in-contract bumping only).
- Storage archival restoration UX in the frontend.
Join the discussion on Telegram
Why this matters
Soroban persistent storage entries are not permanent — every entry has a Time To Live (TTL) and is archived once it expires, after which reads fail until the entry is restored. The
StreamContractwrites every stream to persistent storage insave_stream(contracts/stream_contract/src/storage.rs) and the protocol config to instance storage, but nothing in the contract ever extends those TTLs. A long-running stream (e.g. a 1-year salary stream) can have its on-chain state archived out from under it, causingwithdraw,cancel_stream, and view calls to fail even though the stream is logically still active. For a payment-streaming protocol where streams are explicitly designed to live a long time, this is a correctness/availability gap that must be addressed before mainnet.Acceptance criteria
save_stream/load_streamincontracts/stream_contract/src/storage.rs, or after each mutating op inlib.rs) usingenv.storage().persistent().extend_ttl(...).ProtocolConfigand the stream counter on each mutating entry point.contracts/stream_contract/src/test.rsthat advances the ledger past a short TTL and asserts the stream is still readable after a mutating call bumped it.Files to touch
contracts/stream_contract/src/storage.rscontracts/stream_contract/src/lib.rscontracts/stream_contract/src/test.rsOut of scope