Skip to content

Stream storage entries are never TTL-extended and can archive before long-running streams finish #250

Description

@larryjay007

contracts/stream/src/storage.rs has no extend_ttl call anywhere in the file. Stream(id) records (lines 36-40), Nullifier markers (lines 42-46), and the StreamsBySender/StreamsByRecipient index Vecs (lines 48-61) are all persistent entries that get written once and never touched again. create_stream accepts an arbitrary future end_time — these are meant to be vesting/payment streams that can run for months, well past the minimum persistent-entry TTL window. Once an entry archives, withdraw/cancel_stream/claimable_amount (all of which call storage::get_stream) fail until someone manually submits a restore.

Done when: relevant persistent entries get their TTL extended on every access/write (following the same pattern credential_verifier in the org's zkident repo already uses correctly), so a long-running stream doesn't silently become inaccessible partway through its lifetime.

Where: contracts/stream/src/storage.rs

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions