Repository navigation
feat(registry): name expiry with renewal payments and grace re-registrationΒ #2
Copy link
Copy link
Open
Labels
complexity: mediumStandard features or involved bug fixes (150 pts)Standard features or involved bug fixes (150 pts)enhancementNew feature or requestNew feature or requestexternal-contributorsSuitable for contributors outside the maintainer teamSuitable for contributors outside the maintainer team
Description
π Sidera β Stellar Name Service. Contribute via Drips Wave / GrantFox. Comment with your approach and wait for assignment before starting.
Description
Names are registered forever once claimed β combined with free registration this means the namespace can be fully squatted. DNS/ENS convention is annual renewal: names expire unless renewed, and expired names become registrable again. Soroban's persistent-storage TTL already gives us the machinery; this issue adds the economic layer on top.
Desired outcome: each name carries an expires_at ledger timestamp; renew(name) extends it for a fee; a new reclaim(name) entrypoint lets anyone re-register a name whose expiry passed, deleting the stale record first.
Scope
- Crate/module:
crates/registry,src/lib.rs - API:
renew(name),reclaim(name), read-onlyexpiry_of(name) -> u64;Resolutiongainsexpires_at - Storage:
DataKey::Expiry(String)(persistent, TTL-extended alongside the name key) - Tests: renew extends by exactly one year-equivalent; renew on unregistered name β
NotFound; reclaim before expiry βInvalidInput; reclaim after expiry resets owner/address/counter; TTL interplay between expiry key and name key - Docs: renewal/expiry section in
docs/and README
Non-goals
- Auto-renewal subscriptions (needs pull-debit β out of scope)
- Grace periods with premium pricing (single flat re-registration price)
- Refunds on early reclaim
- Pricing changes (the pricing issue owns fee levels; this uses a constant renewal price or integrates
price_forif it has landed)
What "done" looks like
-
registersetsexpires_at = now + REGISTRATION_PERIOD(documented constant, ~1 year in ledgers) -
resolvereturnsexpires_at; UI-consumable -
renewrequires owner auth (or anyone, if paying β pick one, document, test) and extends expiry -
reclaimdeletes + re-creates the record whennow > expires_at, otherwise errors - New error variants use the next free codes; enum test updated
- All existing 15 tests stay green; new tests cover every branch above
- fmt/clippy/tests/WASM-build gates pass
Implementation guidelines
- The name and owner keys already extend TTL on write/hot-read (
extend_ttlinregister/resolve) β the expiry key must join those bumps or it will archive before the name - Compare
set_address/transferfor the owner-check pattern (require_ownerhelper exists) reclaimshould reuseregister's validation path for the new owner- Consider whether
resolveshould fail with a newExpirederror when past expiry β design note: prefer returning the record +expires_atand lettingreclaimgate re-registration, but state your choice in the PR - Constants belong at module top with the existing TTL constants
Verification
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test -p sidera-registry --all-targets --locked
PR guidelines
- Get assigned before starting; do not start work on a reserved issue.
- Work in a fork; branch off
upstream/main; open the PR againstSidera-Protocol/sidera-contracts:main. - PR description must include
Closes #2. - State before/after storage behavior explicitly (which keys changed).
- All CI checks must pass; human maintainer review required.
Metadata
- Affected crates/files:
contracts/registry/src/lib.rs,docs/ - Complexity label:
complexity: medium(150 base points) - Type labels:
enhancement
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
complexity: mediumStandard features or involved bug fixes (150 pts)Standard features or involved bug fixes (150 pts)enhancementNew feature or requestNew feature or requestexternal-contributorsSuitable for contributors outside the maintainer teamSuitable for contributors outside the maintainer team
Activity
Rodrigoue9 commentedon Oct 7, 2026
Hi @maintainer! I would love to implement the name expiry and renewal lifecycle for the registry.
Architecture & Implementation Plan:
expiry_timestamp: u64inRecordin instance storage.renew_name(env, name: String, duration: u64): Requires caller payment / auth and extendsexpiry_timestamp.resolve, checkenv.ledger().timestamp() > expiry_timestampand returnRegistryError::NameExpiredif lapsed.Track Record
Please assign this issue to me so I can get started!