Skip to content

reputation_registry: persistent storage entries have no TTL bump; they will expire on-chain #9

Description

@IyanuOluwaJesuloba

Soroban persistent storage entries expire unless their TTL is extended. ReputationRegistry sets tier via:

env.storage().persistent().set(&caller, &tier);
But never calls env.storage().persistent().extend_ttl(...). After the default TTL elapses (roughly 30 days on testnet), the entry will be archived and wallets will silently revert to Unverified.

Fix:
env.storage().persistent().set(&caller, &tier); env.storage().persistent().extend_ttl(&caller, 100_000, 200_000); // min/max ledgers
Similarly, get_tier should bump TTL on read to keep active users' entries alive.

Acceptance criteria:

  • set and get_tier both call extend_ttl with reasonable ledger values

  • Unit test verifies TTL extension is called (mock env inspection)

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