Skip to content

docs(specs): Shakedex selling stage — expiry guard, restore a lock by name, delivery plan - #82

Merged
DimazzzZ merged 2 commits into
mainfrom
docs/shakedex-sell-plan
Oct 8, 2026
Merged

DimazzzZ merged 2 commits into
mainfrom
docs/shakedex-sell-plan

Conversation

@DimazzzZ

@DimazzzZ DimazzzZ commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Spec amendments for the Shakedex selling stage (PR 2), decided before any selling code is written.

What changes

  • R31 — No lock that cannot reach the market (new). Lock and Finalize & sign are refused when the name would expire before the seller's own FINALIZE into the lock: expiry_end <= tip + 1 + remaining lockup + 1 day (R9's margin), where the remaining lockup is the full transferLockup at Lock and NameParams::blocks_until_finalize of the lock TRANSFER at Finalize & sign. Below six months from the tip to expiry_end, the Lock dialog warns. Grounded in hsd 8.0.0: FINALIZE renews a name (chain.js, ns.setRenewal(height)), TRANSFER does not, so the only expiry risk is the lockup.
  • R32 — Restore a lock by name (new). A restored wallet adopts a lock when the name's current owner coin sits at the lock address derived from the seed and carries FINALIZE at the name's height; it names what it refuses (expired name, a name not at our lock, a name still locking, a lock coin already a TRANSFER, a leftover lock coin). Importing the saved listing file restores the listing details.
  • §5 Known gaps: lock recovery is manual in this stage; the automatic address-history scan is deferred to the roadmap. ADR 0004 gets a dated amendment saying so; its decision is unchanged.
  • R27: the listing lasts up to renewalWindow after the FINALIZE into the lock, which renews the name.
  • R19 / R23 / R25: UI placement (Sell in Owned Names, a "My listings" tab on the Market page), and the daemon contract: never signs or broadcasts, publishes listings already signed to LearnHNS Market (SECURITY.md follows in the publishing PR).
  • R1, R4, R16–R30: Enforced/Pinned names aligned with the delivery plan; R29 gets its own lines; backend refusal of out-of-range prices (R19) and schedules (R24), and re-listing after a cancel tracking only the new lock outpoint (R28).
  • §6 Delivery: selling ships as a stack of PRs (lock keys and P2WSH signing, seller transactions, lock, finalize and sign, tracking and Sold, cancel and lower price, publishing, UI, reverse auctions, docs).
  • CONTEXT.md: terms Locking, Restored lock, My listings.

Checks

  • npx prettier --check . passes.
  • R31's and R27's renewal claims checked against the hsd 8.0.0 source; test and function names checked against the delivery plan in both directions.
  • Docs only; no code or tests change.

… name, delivery plan

Adds R31 (Lock and Finalize & sign refused when the name would expire before the FINALIZE into the lock, which renews it; a six-month warning) and R32 (restore a lock by name, upgraded by importing its own listing file), corrects R27 (the listing lasts renewalWindow after that FINALIZE), states the daemon's new contract in R25 ("never signs or broadcasts; publishes listings already signed to LearnHNS Market"), places Sell in NameActionsModal and "My listings" on the Market page (R19), aligns the selling requirements' Enforced and Pinned lines with the code and tests the selling tickets create, rewrites the §5 lock-recovery gap as manual with the address-history scan deferred, and describes the selling delivery as a stack of PRs. ADR 0004 gets a dated amendment saying the same about recovery, its decision unchanged; CONTEXT.md defines Locking, Restored lock and My listings.
…uses

R31 now counts only the remaining transfer lockup: the full lockup at Lock, and at Finalize & sign the blocks until the lock TRANSFER may be finalized, since a second full lockup would refuse a FINALIZE that renews the name; the six months are measured from the tip to the expiry end. R32 names what a restore by name refuses and why (expired name, a name still Locking, a lock coin already a TRANSFER, a leftover lock coin), and §5 records the Locking and cancel-awaiting-finalize cases as a gap. CONTEXT.md's Locking no longer says no price is signed, and limits the Cancel-transfer abort to before the FINALIZE into the lock is broadcast.
@github-actions github-actions Bot added the type: docs Documentation only. label Oct 8, 2026
@DimazzzZ DimazzzZ self-assigned this Oct 8, 2026
@DimazzzZ
DimazzzZ merged commit b611542 into main Oct 8, 2026
7 checks passed
@DimazzzZ
DimazzzZ deleted the docs/shakedex-sell-plan branch October 8, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: docs Documentation only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant