Skip to content

Soroban storage TTL automation for wraith-names entries #17

@truthixify

Description

@truthixify

Labels: Stellar Wave, stellar, feature, tooling, drips, help-wanted
Tier: M (2–4 days)
Type: feature

Context

Soroban storage entries have a time-to-live (TTL) in ledgers. When an entry's TTL expires, it's archived and re-loading it requires paying restoration fees. For wraith-names, this means a .wraith name registration can "expire" if nobody touches it for long enough — and the user might not notice until someone else tries to resolve and gets nothing back.

We have two options: extend TTLs aggressively (costs more, but invisibly to the user), or build automation that lets anyone extend a name's TTL on its owner's behalf (decentralized care-taking).

This issue is about the second.

Scope

  1. Add a function extend_name_ttl(name: String, extend_to_ledger: u32) -> bool to wraith-names:
    • Anyone may call. No auth.
    • Extends the storage TTL of the name entry (and the associated reverse-lookup entry) up to (but not past) extend_to_ledger.
    • Capped at the Soroban maximum extension allowed per call.
    • Idempotent: calling twice in the same ledger is a no-op for the second call.
  2. Build a Stellar-side keeper bot at contracts/stellar/scripts/keeper/:
    • Reads all registered names from the contract storage.
    • For each, checks TTL remaining.
    • If TTL < 1000 ledgers (≈ 80 minutes), calls extend_name_ttl to push it out by 1 month.
    • Costs are paid by the keeper account — propose a sustainable funding model (a small protocol fee tip, or a foundation grant).
  3. Document the keeper bot in the Spectre repo so we can run it in production.

Open design questions

  • Should extensions emit an event so off-chain observers can see "name X extended by Y"? Probably yes for transparency.
  • Should we cap how far in the future a single extension can push? Argue.
  • Trade-off: cheap extension makes squatting effectively permanent. Is that acceptable for the namespace? (Yes — .wraith is meant to be permanent identity. But state the trade explicitly.)

Acceptance criteria

  • extend_name_ttl implemented and tested.
  • Keeper bot script with documented run command.
  • Cost model documented: how much XLM does keeping 1000 names alive for a year cost?
  • CI: a "names are healthy" test against the live testnet (separate non-blocking job).

Why this matters

If user-registered names silently archive and become resolvable-only-after-pay-to-restore, we have a UX failure. This is an invisibility problem — fixing it now avoids a class of support tickets later.

Resources

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdripsFunded via Drips NetworkfeatureNew feature workhelp wantedExtra attention is neededstellarTouches Stellar / Soroban codetoolingBuild / tooling work

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions