Skip to content

fix: extend storage TTL on every invoice save#6

Merged
MarcusDavidG merged 1 commit into
mainfrom
fix/storage-ttl-extension
Jun 19, 2026
Merged

fix: extend storage TTL on every invoice save#6
MarcusDavidG merged 1 commit into
mainfrom
fix/storage-ttl-extension

Conversation

@MarcusDavidG

Copy link
Copy Markdown
Contributor

Closes #5

Problem

Soroban persistent storage has TTL that expires unless explicitly extended. Long-lived and recurring invoices risk becoming inaccessible after ~4 months without any interaction.

Fix

Call extend_ttl in save_invoice on every write:

  • min_ttl: 100,000 ledgers (~6 days)
  • max_ttl: 6,307,200 ledgers (~1 year at 5s/ledger)

Testing

  • All 3 tests pass
  • No behaviour change, only storage persistence improvement

Soroban persistent storage entries expire if TTL is not extended.
Recurring and long-lived invoices risk becoming inaccessible.

Set min_ttl=100_000 ledgers, max_ttl=6_307_200 (~1 year at 5s/ledger)
on every save_invoice call.

Closes #5
@MarcusDavidG MarcusDavidG merged commit 0431a4f into main Jun 19, 2026
@MarcusDavidG MarcusDavidG deleted the fix/storage-ttl-extension branch June 19, 2026 06:31
MarcusDavidG added a commit that referenced this pull request Jun 19, 2026
fix: extend storage TTL on every invoice save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storage TTL management for long-lived invoices

1 participant