paritytech / paritytech/host-rust-core

Products have no durable storage that survives a new device

Open
#606 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request Scarcity
Dominant language
Swift
Stars
10
Forks
3
Avg merge
1d 10h
Merged PRs (30d)
148

Description

The need

Scarcity keeps a player's favourited collections. They shape the collection picker and may later feed the pre-selection ranking. Today they sit in host-provided local storage, so they die with the device and do not come back after a reinstall.

Where it stands

At 7475e70c the product storage surface is local_storage with three methods — read, write, clear — keyed by a plain String (rust/crates/truapi/src/api/local_storage.rs:11-53).

No RFC in docs/rfcs/ covers product storage at all. The storage-adjacent RFCs are all open PRs, and none of them is this:

  • #603 — localStorage subscriptions and worker pending operations
  • #71 — product session restore; same device, best-effort, reserved key
  • #16 — Favourites API; the host's bookmarked-product catalogue, and explicitly "local to the host instance — no cross-host sync"

#513 is storage shared between products on one device. #598 (REQ1) explicitly puts this out of scope:

Syncing storage across a user's devices. Storage is per product and per device; nothing here changes that, and no requirement should assume it does.

That exclusion looks right for REQ1 — cross-product and cross-device are different mechanisms. This issue is the need the exclusion leaves without a home, rather than an argument to widen REQ1.

What we need

An answer more than an implementation:

  • Whether durable per-product state surviving device replacement is in scope for Release 2, a later release, or not planned
  • If it is not planned, that recorded somewhere citable, so products can design around it

Scarcity has an accepted fallback either way: keep favourites on the device and say so in the interface, or keep them out of the default collection choice so both minting surfaces still compute the same default. A documented "not planned" is a usable answer here — what we cannot design against is silence.

Consumer side: paritytech/scarcity-spa row R14 and scarcity-spa#25.

cc @gp0p3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with rust/crates/truapi/src/api/local_storage.rs:11-53 and review the referenced storage discussions and RFCs in docs/rfcs/, especially #513, #598, and #603. The work is done when the scope of durable per-product state across device replacement is decided for Release 2 or later, and that decision is recorded somewhere citable, including the not-planned case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.