From 61c51cb5d1e4247fe9d15e0b5caa08c5d17dca02 Mon Sep 17 00:00:00 2001 From: Dendi Suhubdy <4477337+dendisuhubdy@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:08:00 +0800 Subject: [PATCH] VK-9: the wallet refuses retired RandProtocol prover keys wherever they come from A wallet released before a pool key was retired keeps pinning it; nothing can change that. What every later release can do is carry the list of retired keys and refuse them. RETIRED_PROVER_KEYS (ui/engine/backend-shared.js) names the shared key of 0.6.8 and the four members 0.6.9-0.8.0 pinned. A link that names one is not paired and its prover is not asked; a pairing stored before its key was retired is sent nothing after the update, and its probe says why; a pinned pool member whose key is listed is skipped. One new sentence, in all twenty languages. docs/retired-prover-keys.md has the table, what a released wallet can and cannot do, the notice to publish and the release-notes line. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01YGaYNQ4cvFtg2UmokVgrAN --- docs/prover.md | 9 ++++ docs/retired-prover-keys.md | 53 +++++++++++++++++++++ ui/engine/backend-shared.js | 30 ++++++++++++ ui/locales/ar.js | 1 + ui/locales/de.js | 1 + ui/locales/en.js | 3 +- ui/locales/es.js | 1 + ui/locales/fa.js | 1 + ui/locales/fr.js | 1 + ui/locales/hi.js | 1 + ui/locales/id.js | 1 + ui/locales/it.js | 1 + ui/locales/ja.js | 1 + ui/locales/ko.js | 1 + ui/locales/ms.js | 1 + ui/locales/pl.js | 1 + ui/locales/ps.js | 1 + ui/locales/pt.js | 1 + ui/locales/ru.js | 1 + ui/locales/ta.js | 1 + ui/locales/ur.js | 1 + ui/locales/zh-hk.js | 1 + ui/locales/zh.js | 1 + ui/test/no-shared-prover-key.test.mjs | 5 +- ui/test/prover.test.mjs | 68 ++++++++++++++++++++++++++- 25 files changed, 183 insertions(+), 4 deletions(-) create mode 100644 docs/retired-prover-keys.md diff --git a/docs/prover.md b/docs/prover.md index 40716da..098fc71 100644 --- a/docs/prover.md +++ b/docs/prover.md @@ -227,6 +227,15 @@ pins the four old keys, so it finds no member it trusts and has to prove locally the user pairs; from 0.8.2 a wallet in that state (a pinned member answering with another key) says to update Rand Wallet rather than to try again later. +**Retired keys** (VK-9). The keys the pool no longer uses — the one key shared until 0.6.9 and +the four members 0.6.9–0.8.0 pinned — are listed in the engine (`RETIRED_PROVER_KEYS`, +`ui/engine/backend-shared.js`; `rand` carries the same list). A listed key is never paired (a +link that names one is refused before the prover is asked), a pairing stored before its key was +retired is sent nothing after the update, and a pinned member whose key is listed is skipped: +"This prover's key was retired and is no longer used. Pair another prover in Settings, or update +Rand Wallet to the latest version." A wallet released before a key was retired cannot learn of it; +`docs/retired-prover-keys.md` has what that means and the notice to publish. + The wallet pins it from data (`core/crates/wallet-core/src/trusted-prover-pool.json`, copied from the operators' `pool.json`; the same descriptor is served at `https://prover.randprotocol.org/.well-known/rand-prover-pool.json` for people and tools — a wallet diff --git a/docs/retired-prover-keys.md b/docs/retired-prover-keys.md new file mode 100644 index 0000000..82f09e0 --- /dev/null +++ b/docs/retired-prover-keys.md @@ -0,0 +1,53 @@ +# Retired RandProtocol prover keys + +| key | what it was | pinned by | retired | +|---|---|---|---| +| `RGTF-7HKJ-XZFV-GQ1J` | the key every pool machine shared | Rand Wallet 0.6.8 | 2026-10-01 | +| `ZEXQ-1JHV-ZT60-KFB5` | member a | Rand Wallet 0.6.9–0.8.0 | 2026-10-22 | +| `D2XV-WXVT-PZRC-D7G8` | member archive2 | Rand Wallet 0.6.9–0.8.0 | 2026-10-22 | +| `SR28-MYT0-GR6A-03DE` | member nyc3 | Rand Wallet 0.6.9–0.8.0 | 2026-10-22 | +| `GMNX-Q1QD-FEXG-JHJM` | member sfo3 | Rand Wallet 0.6.9–0.8.0 | 2026-10-22 | + +## What a released wallet can and cannot do + +A wallet's pinned provers are compiled into it. **A wallet released before a key was retired +keeps pinning that key, and nothing a server sends or a later release does can change it.** Rand +Wallet 0.6.9–0.8.0 therefore still trusts the four member keys above at +`https://prover.randprotocol.org/m/`: if someone held one of those keys *and* could answer +at that address, such a wallet would seal its viewing key to them (never its spend key — a prover +is not sent it). In practice those versions find no prover today: the pool's members answer with +other keys, the wallet reports that the provers "cannot be reached", and it does not show the +pool's own "retired, update" answer. The remedy is to update. + +What each version does: + +| version | pins | when its pins are stale | +|---|---|---| +| 0.6.8 | the shared key | finds no prover | +| 0.6.9–0.8.0 | the four retired members | "cannot be reached right now … try again later" | +| 0.8.1 | a, b | — | +| 0.8.2 and later | a, b | "Update Rand Wallet to the latest version" when a pinned member answers with another key | +| the release after 0.8.6 | a, b, **and the retired list** | refuses a retired key wherever it comes from: a link, a stored pairing, or a pinned member | + +The retired list (`RETIRED_PROVER_KEYS` in `ui/engine/backend-shared.js`) is how a retirement +reaches every wallet released after it. When a pool key is retired: add its fingerprint there and +to `rand`'s list (fullnode `crates/randprotocol-client/src/retired-provers.txt`) in the same +change that edits `trusted-prover-pool.json`; `ui/test/prover.test.mjs` fails if a pinned member +is on the list. + +## The notice (for the release page, the site and the stores) + +> **Update Rand Wallet if you run 0.8.0 or earlier.** Rand Wallet 0.6.9 to 0.8.0 pin four +> RandProtocol prover keys that were retired on 22 October 2026. Those versions can no longer use +> the RandProtocol provers — a send that needs them says the provers cannot be reached — and they +> still trust the retired keys. Update to the current Rand Wallet: it pins the current provers, +> tells you itself when its pins go out of date, and refuses the retired keys. Your funds are not +> at risk: a prover is only ever sent a viewing key, never the key that spends. + +## The release-notes line (for the next wallet release) + +- **Retired prover keys are refused.** The wallet carries the list of RandProtocol prover keys + that were retired (the shared key of 0.6.8 and the four members of 0.6.9–0.8.0) and never pairs + with one, never sends one a job, and skips a pinned member whose key is on it. A prover you + paired yourself is unaffected unless its key is on that list. If you still run 0.8.0 or earlier, + update: those versions cannot be told about a retired key. diff --git a/ui/engine/backend-shared.js b/ui/engine/backend-shared.js index 3be52d5..ae55106 100644 --- a/ui/engine/backend-shared.js +++ b/ui/engine/backend-shared.js @@ -113,6 +113,23 @@ import { t } from '../i18n.js'; * two strings that drift. Nothing about *where* storage lives belongs in this file: it is handed * a `storage` and never asks what is behind it. */ +/** + * RandProtocol prover keys that were retired (VK-9, randprotocol/monorepo#18): the key every pool + * machine shared until wallet 0.6.9, and the four members wallets 0.6.9 to 0.8.0 pinned. A wallet + * released before a key was retired still pins it and cannot be told otherwise; this list is what + * every release after the retirement carries. A listed key is never paired, never probed, never + * sent a job and never used as a pool member, whatever a link, a stored pairing or the pinned + * descriptor says. `rand` carries the same list (fullnode `retired-provers.txt`). Add an entry in + * the change that retires a key; never remove one. + */ +export const RETIRED_PROVER_KEYS = Object.freeze([ + { fingerprint: 'RGTF-7HKJ-XZFV-GQ1J', retiredOn: '2026-10-01' }, + { fingerprint: 'ZEXQ-1JHV-ZT60-KFB5', retiredOn: '2026-10-22' }, + { fingerprint: 'D2XV-WXVT-PZRC-D7G8', retiredOn: '2026-10-22' }, + { fingerprint: 'SR28-MYT0-GR6A-03DE', retiredOn: '2026-10-22' }, + { fingerprint: 'GMNX-Q1QD-FEXG-JHJM', retiredOn: '2026-10-22' }, +].map(Object.freeze)); + export const UNLOCKED_SESSION_KEY = 'unlocked'; // Storage keys. `unlocked` is the only session one. @@ -1636,6 +1653,12 @@ export function makeSharedBackend({ return typeof fp === 'string' && fp === fingerprint; } + /** The retired keys this build refuses: [`RETIRED_PROVER_KEYS`], or the test seam's list. */ + const retiredKeys = proverOptions && Array.isArray(proverOptions.retiredKeys) ? proverOptions.retiredKeys : RETIRED_PROVER_KEYS; + /** Whether `fingerprint` is a retired prover key (VK-9). */ + const isRetiredProverKey = (fingerprint) => retiredKeys.some((k) => k.fingerprint === String(fingerprint)); + const retiredProverText = () => t('This prover\'s key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.'); + function proverClientFor(url) { return makeProverClient({ fetch: fetchImpl, url }); } @@ -1682,6 +1705,8 @@ export function makeSharedBackend({ if (!p || typeof p.url !== 'string' || !p.url || (p.mode !== undefined && p.mode !== 'remote')) { return { ok: false, reason: t('No prover is paired.') }; } + // A retired key is not asked anything (VK-9). + if (isRetiredProverKey(p.fingerprint)) return { ok: false, reason: retiredProverText() }; let info; try { info = readInfo(await proverClientFor(p.url).info()); @@ -1711,6 +1736,7 @@ export function makeSharedBackend({ let parsed; try { parsed = await c.parseProverLink(m.link); } catch { continue; } if (!m.fingerprint || String(parsed.fingerprint) !== m.fingerprint) continue; + if (isRetiredProverKey(m.fingerprint)) continue; if (parsed.own === true) continue; const checked = checkProverUrl(parsed.url); if (checked.error || checked.url !== checkProverUrl(m.url).url) continue; @@ -1847,6 +1873,8 @@ export function makeSharedBackend({ const key = await openVault(password); if (!key) throw new Error('wrong password'); const parsed = await readProverLink(link); + // Before any network: a link that names a retired key is not paired (VK-9). + if (isRetiredProverKey(parsed.fingerprint)) throw new Error(retiredProverText()); const checked = checkProverUrl(parsed.url); if (checked.error) throw new Error(checked.error); let info; @@ -2088,6 +2116,8 @@ export function makeSharedBackend({ } const { token, kemEk, url, fingerprint, own } = pairing; const refuse = (message) => { const err = new Error(message); err.definite = true; return err; }; + // A pairing stored before its key was retired: nothing is built for it or sent to it (VK-9). + if (isRetiredProverKey(fingerprint)) throw refuse(retiredProverText()); return async ({ kind, request, maxProofBytes, hcBundle, hcAuth, meta, onPhase, signal }) => { // What this chain's bundle guest takes, from the core, before anything is built: the viewing // key on a split-authorisation chain, the spend key on an older one. It also refuses, here, diff --git a/ui/locales/ar.js b/ui/locales/ar.js index 01f4341..1cdcd18 100644 --- a/ui/locales/ar.js +++ b/ui/locales/ar.js @@ -1129,4 +1129,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "حُفظ السجل بإصدار أحدث من Rand Wallet", "the record does not open with this password": "لا يُفتح السجل بكلمة المرور هذه", "block {height} has {got} of the {n} transactions its header announced": "الكتلة {height} تحتوي على {got} من أصل {n} معاملة أعلنت عنها ترويستها", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "أُوقف العمل بمفتاح هذا المُثبِت ولم يعد مستخدمًا. اقرن مُثبِتًا آخر في الإعدادات، أو حدّث Rand Wallet إلى أحدث إصدار.", }; diff --git a/ui/locales/de.js b/ui/locales/de.js index f89f528..f9ad0c3 100644 --- a/ui/locales/de.js +++ b/ui/locales/de.js @@ -1129,4 +1129,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "der Datensatz wurde von einer neueren Version von Rand Wallet gespeichert", "the record does not open with this password": "der Datensatz lässt sich mit diesem Passwort nicht öffnen", "block {height} has {got} of the {n} transactions its header announced": "Block {height} enthält {got} der {n} Transaktionen, die sein Header angekündigt hat", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "Der Schlüssel dieses Provers wurde außer Betrieb genommen und wird nicht mehr verwendet. Kopple in den Einstellungen einen anderen Prover oder aktualisiere Rand Wallet auf die neueste Version.", }; diff --git a/ui/locales/en.js b/ui/locales/en.js index 7c29305..64df0c6 100644 --- a/ui/locales/en.js +++ b/ui/locales/en.js @@ -4,7 +4,7 @@ // value, or an object of CLDR plural categories ({one, few, many, other}) for a key with an // {n} hole whose translation inflects by number. `{name}` holes and the words in the glossary // at the top of each dictionary are kept as they are. -// 1122 strings. +// 1123 strings. export default { "{amount} {symbol}": "{amount} {symbol}", "{blocks} blocks left to prove it.": "{blocks} blocks left to prove it.", @@ -982,6 +982,7 @@ export default { "This prover does not know this pairing. Pair it again in Settings.": "This prover does not know this pairing. Pair it again in Settings.", "This prover will be able to read this wallet's whole history — every payment received and sent, before and after today. It cannot spend. To keep your history private, run your own.": "This prover will be able to read this wallet's whole history — every payment received and sent, before and after today. It cannot spend. To keep your history private, run your own.", "This prover will be able to read this wallet's whole history. It cannot spend.": "This prover will be able to read this wallet's whole history. It cannot spend.", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.", "This Rand Wallet cannot run programs.": "This Rand Wallet cannot run programs.", "This Rand Wallet cannot withdraw to another chain.": "This Rand Wallet cannot withdraw to another chain.", "this record is {n} bytes; the most it may be is {max}": "this record is {n} bytes; the most it may be is {max}", diff --git a/ui/locales/es.js b/ui/locales/es.js index e634cf5..371078c 100644 --- a/ui/locales/es.js +++ b/ui/locales/es.js @@ -1129,4 +1129,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "el registro se guardó con una versión más reciente de Rand Wallet", "the record does not open with this password": "el registro no se abre con esta contraseña", "block {height} has {got} of the {n} transactions its header announced": "el bloque {height} tiene {got} de las {n} transacciones que anunció su cabecera", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "La clave de este probador fue retirada y ya no se usa. Vincula otro probador en Ajustes o actualiza Rand Wallet a la última versión.", }; diff --git a/ui/locales/fa.js b/ui/locales/fa.js index fb95ade..ecdd55e 100644 --- a/ui/locales/fa.js +++ b/ui/locales/fa.js @@ -1130,4 +1130,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "رکورد با نسخه‌ی جدیدتری از Rand Wallet ذخیره شده است", "the record does not open with this password": "رکورد با این گذرواژه باز نمی‌شود", "block {height} has {got} of the {n} transactions its header announced": "بلوک {height} تنها {got} تراکنش از {n} تراکنشی را دارد که سرآیندش اعلام کرده بود", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "کلید این اثبات‌گر بازنشسته شده و دیگر استفاده نمی‌شود. اثبات‌گر دیگری را در تنظیمات جفت کنید، یا Rand Wallet را به آخرین نسخه به‌روزرسانی کنید.", }; diff --git a/ui/locales/fr.js b/ui/locales/fr.js index 7b64d87..4388377 100644 --- a/ui/locales/fr.js +++ b/ui/locales/fr.js @@ -1131,4 +1131,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "l'enregistrement a été sauvegardé par une version plus récente de Rand Wallet", "the record does not open with this password": "l'enregistrement ne s'ouvre pas avec ce mot de passe", "block {height} has {got} of the {n} transactions its header announced": "le bloc {height} contient {got} des {n} transactions annoncées par son en-tête", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "La clé de ce prouveur a été retirée et n'est plus utilisée. Associez un autre prouveur dans les Paramètres, ou mettez à jour Rand Wallet vers la dernière version.", }; diff --git a/ui/locales/hi.js b/ui/locales/hi.js index fcbeab5..330d32a 100644 --- a/ui/locales/hi.js +++ b/ui/locales/hi.js @@ -1129,4 +1129,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "रिकॉर्ड Rand Wallet के नए संस्करण से सहेजा गया था", "the record does not open with this password": "रिकॉर्ड इस पासवर्ड से नहीं खुलता", "block {height} has {got} of the {n} transactions its header announced": "ब्लॉक {height} में उसके हेडर द्वारा घोषित {n} लेनदेन में से {got} हैं", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "इस प्रूवर की की हटा दी गई है और अब इस्तेमाल नहीं होती। सेटिंग्स में कोई दूसरा प्रूवर पेयर करें, या Rand Wallet को नवीनतम संस्करण में अपडेट करें।", }; diff --git a/ui/locales/id.js b/ui/locales/id.js index cde6a61..5710363 100644 --- a/ui/locales/id.js +++ b/ui/locales/id.js @@ -1122,4 +1122,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "rekaman disimpan oleh versi Rand Wallet yang lebih baru", "the record does not open with this password": "rekaman tidak terbuka dengan kata sandi ini", "block {height} has {got} of the {n} transactions its header announced": "blok {height} berisi {got} dari {n} transaksi yang diumumkan header-nya", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "Kunci prover ini telah dipensiunkan dan tidak lagi digunakan. Pasangkan prover lain di Pengaturan, atau perbarui Rand Wallet ke versi terbaru.", }; diff --git a/ui/locales/it.js b/ui/locales/it.js index 931e998..cdfb1c8 100644 --- a/ui/locales/it.js +++ b/ui/locales/it.js @@ -1129,4 +1129,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "il record è stato salvato da una versione più recente di Rand Wallet", "the record does not open with this password": "il record non si apre con questa password", "block {height} has {got} of the {n} transactions its header announced": "il blocco {height} contiene {got} delle {n} transazioni annunciate dalla sua intestazione", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "La chiave di questo prover è stata ritirata e non è più in uso. Associa un altro prover nelle Impostazioni, oppure aggiorna Rand Wallet all'ultima versione.", }; diff --git a/ui/locales/ja.js b/ui/locales/ja.js index c3dffb4..b068281 100644 --- a/ui/locales/ja.js +++ b/ui/locales/ja.js @@ -1122,4 +1122,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "レコードは新しいバージョンの Rand Wallet で保存されています", "the record does not open with this password": "このパスワードではレコードを開けません", "block {height} has {got} of the {n} transactions its header announced": "ブロック {height} には、ヘッダーが示した {n} 件のトランザクションのうち {got} 件しかありません", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "このプルーバーの鍵は廃止され、もう使われていません。設定で別のプルーバーをペアリングするか、Rand Wallet を最新バージョンに更新してください。", }; diff --git a/ui/locales/ko.js b/ui/locales/ko.js index bce5ea3..5e58236 100644 --- a/ui/locales/ko.js +++ b/ui/locales/ko.js @@ -1122,4 +1122,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "레코드가 더 새로운 버전의 Rand Wallet에서 저장되었습니다", "the record does not open with this password": "이 비밀번호로는 레코드가 열리지 않습니다", "block {height} has {got} of the {n} transactions its header announced": "블록 {height}에는 헤더가 알린 트랜잭션 {n}개 중 {got}개만 있습니다", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "이 프루버의 키는 폐기되어 더 이상 사용되지 않습니다. 설정에서 다른 프루버를 페어링하거나 Rand Wallet을 최신 버전으로 업데이트하세요.", }; diff --git a/ui/locales/ms.js b/ui/locales/ms.js index 7a81c7b..3ca41a1 100644 --- a/ui/locales/ms.js +++ b/ui/locales/ms.js @@ -1124,4 +1124,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "rekod disimpan oleh versi Rand Wallet yang lebih baharu", "the record does not open with this password": "rekod tidak terbuka dengan kata laluan ini", "block {height} has {got} of the {n} transactions its header announced": "blok {height} mengandungi {got} daripada {n} transaksi yang diumumkan oleh pengepalanya", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "Kunci pembukti ini telah dibersarakan dan tidak lagi digunakan. Pasangkan pembukti lain dalam Tetapan, atau kemas kini Rand Wallet ke versi terkini.", }; diff --git a/ui/locales/pl.js b/ui/locales/pl.js index d145681..77483bf 100644 --- a/ui/locales/pl.js +++ b/ui/locales/pl.js @@ -1125,4 +1125,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "rekord został zapisany przez nowszą wersję Rand Wallet", "the record does not open with this password": "rekord nie otwiera się tym hasłem", "block {height} has {got} of the {n} transactions its header announced": "blok {height} zawiera {got} z {n} transakcji zapowiedzianych w nagłówku", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "Klucz tego provera został wycofany i nie jest już używany. Sparuj inny prover w Ustawieniach lub zaktualizuj Rand Wallet do najnowszej wersji.", }; diff --git a/ui/locales/ps.js b/ui/locales/ps.js index 21f213e..5e8313d 100644 --- a/ui/locales/ps.js +++ b/ui/locales/ps.js @@ -1129,4 +1129,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "ریکارډ د Rand Wallet د نوې نسخې لخوا خوندي شوی", "the record does not open with this password": "ریکارډ د دې پاسورډ سره نه خلاصېږي", "block {height} has {got} of the {n} transactions its header announced": "بلاک {height} د هغو {n} راکړو ورکړو څخه {got} لري چې سرلیک یې اعلان کړې وې", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "د دې ثبوت جوړوونکي کیلي له کاره ایستل شوې او نوره نه کارول کېږي. په امستنو کې بل ثبوت جوړوونکی جوړه کړئ، یا Rand Wallet وروستۍ نسخې ته تازه کړئ.", }; diff --git a/ui/locales/pt.js b/ui/locales/pt.js index 19b5597..66bad68 100644 --- a/ui/locales/pt.js +++ b/ui/locales/pt.js @@ -1129,4 +1129,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "o registro foi salvo por uma versão mais nova da Rand Wallet", "the record does not open with this password": "o registro não abre com esta senha", "block {height} has {got} of the {n} transactions its header announced": "o bloco {height} tem {got} das {n} transações que seu cabeçalho anunciou", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "A chave deste provador foi aposentada e não é mais usada. Pareie outro provador em Configurações ou atualize o Rand Wallet para a versão mais recente.", }; diff --git a/ui/locales/ru.js b/ui/locales/ru.js index cdffd00..6e45bb1 100644 --- a/ui/locales/ru.js +++ b/ui/locales/ru.js @@ -1127,4 +1127,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "запись сохранена более новой версией Rand Wallet", "the record does not open with this password": "запись не открывается этим паролем", "block {height} has {got} of the {n} transactions its header announced": "блок {height} содержит {got} из {n} транзакций, объявленных в его заголовке", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "Ключ этого прувера выведен из обращения и больше не используется. Подключите другой прувер в настройках или обновите Rand Wallet до последней версии.", }; diff --git a/ui/locales/ta.js b/ui/locales/ta.js index ea51546..d7ba65b 100644 --- a/ui/locales/ta.js +++ b/ui/locales/ta.js @@ -1129,4 +1129,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "பதிவு Rand Wallet இன் புதிய பதிப்பால் சேமிக்கப்பட்டது", "the record does not open with this password": "இந்தக் கடவுச்சொல்லால் பதிவு திறக்கவில்லை", "block {height} has {got} of the {n} transactions its header announced": "தொகுதி {height} அதன் தலைப்பு அறிவித்த {n} பரிவர்த்தனைகளில் {got} மட்டுமே கொண்டுள்ளது", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "இந்த நிரூபிப்பானின் விசை நீக்கப்பட்டது, இனி பயன்படுத்தப்படாது. அமைப்புகளில் வேறொரு நிரூபிப்பானை இணைக்கவும், அல்லது Rand Wallet ஐச் சமீபத்திய பதிப்புக்குப் புதுப்பிக்கவும்.", }; diff --git a/ui/locales/ur.js b/ui/locales/ur.js index 512b3d8..372df52 100644 --- a/ui/locales/ur.js +++ b/ui/locales/ur.js @@ -1130,4 +1130,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "ریکارڈ Rand Wallet کے نئے ورژن نے محفوظ کیا تھا", "the record does not open with this password": "ریکارڈ اس پاس ورڈ سے نہیں کھلتا", "block {height} has {got} of the {n} transactions its header announced": "بلاک {height} میں اس کے ہیڈر کے اعلان کردہ {n} لین دین میں سے {got} ہیں", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "اس پروور کی کی ختم کر دی گئی ہے اور اب استعمال نہیں ہوتی۔ ترتیبات میں کوئی دوسرا پروور جوڑیں، یا Rand Wallet کو تازہ ترین ورژن پر اپ ڈیٹ کریں۔", }; diff --git a/ui/locales/zh-hk.js b/ui/locales/zh-hk.js index d6d98e3..42da4cb 100644 --- a/ui/locales/zh-hk.js +++ b/ui/locales/zh-hk.js @@ -1122,4 +1122,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "記錄由較新版本的 Rand Wallet 儲存", "the record does not open with this password": "此密碼無法開啟該記錄", "block {height} has {got} of the {n} transactions its header announced": "區塊 {height} 只有 {got} 筆交易,而其區塊頭宣告了 {n} 筆", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "此證明器的密鑰已停用,不再使用。請在設定中配對另一個證明器,或將 Rand Wallet 更新至最新版本。", }; diff --git a/ui/locales/zh.js b/ui/locales/zh.js index 2ba4a18..5827697 100644 --- a/ui/locales/zh.js +++ b/ui/locales/zh.js @@ -1122,4 +1122,5 @@ export default { "the record was saved by a newer version of Rand Wallet": "记录由更新版本的 Rand Wallet 保存", "the record does not open with this password": "此密码无法打开该记录", "block {height} has {got} of the {n} transactions its header announced": "区块 {height} 只有 {got} 笔交易,而其区块头声明了 {n} 笔", + "This prover's key was retired and is no longer used. Pair another prover in Settings, or update Rand Wallet to the latest version.": "此证明器的密钥已停用,不再使用。请在设置中配对另一个证明器,或将 Rand Wallet 更新到最新版本。", }; diff --git a/ui/test/no-shared-prover-key.test.mjs b/ui/test/no-shared-prover-key.test.mjs index 2be5c26..b6a2f37 100644 --- a/ui/test/no-shared-prover-key.test.mjs +++ b/ui/test/no-shared-prover-key.test.mjs @@ -30,7 +30,10 @@ test('no shipped source names the 0.6.8 shared prover key or its link', () => { for (const f of files(join(ROOT, d))) { seen += 1; // A test that asserts the key's ABSENCE may name it (core's inline tests). - const text = readFileSync(f, 'utf8').split('\n').filter((l) => !/assert/.test(l)).join('\n'); + // …and so may the one list of RETIRED keys (VK-9), whose entries are refused, never paired: + // a line of exactly that shape, `{ fingerprint: '…', retiredOn: '…' },`. + const text = readFileSync(f, 'utf8').split('\n') + .filter((l) => !/assert/.test(l) && !/^\s*\{ fingerprint: '[A-Z0-9-]+', retiredOn: '\d{4}-\d{2}-\d{2}' \},\s*$/.test(l)).join('\n'); assert.equal(text.includes(SHARED_KEY), false, `${f.slice(ROOT.length)} names the shared key ${SHARED_KEY}`); assert.equal(text.includes(SHARED_LINK), false, `${f.slice(ROOT.length)} carries the shared key's link`); } diff --git a/ui/test/prover.test.mjs b/ui/test/prover.test.mjs index 326fc29..410bf79 100644 --- a/ui/test/prover.test.mjs +++ b/ui/test/prover.test.mjs @@ -13,6 +13,8 @@ import assert from 'node:assert/strict'; import { makeWasmBackend, CANNOT_PROVE_REASON } from '../engine/backend-wasm.js'; import { makeNativeBackend } from '../engine/backend-native.js'; import { decryptSecret } from '../engine/crypto.js'; +import { RETIRED_PROVER_KEYS } from '../engine/backend-shared.js'; +import { readFileSync } from 'node:fs'; import { pollRemoteProof, startRemoteProof, ProverError, PENDING_PROOF_KEY, CLAIMED_PROOF_KEY, MAX_QUEUE_WAIT_MS, MAX_PROVING_MS, SUBMIT_TRIES, SUBMIT_BACKOFF_MS, @@ -48,7 +50,7 @@ function sendableFetch(table = {}) { }); } -function build({ core, storage, fetch, native, systemMemoryGiB, locks = null, memberOrder, online } = {}) { +function build({ core, storage, fetch, native, systemMemoryGiB, locks = null, memberOrder, online, retiredKeys } = {}) { const env = { core: core || stubCore(), storage: storage || mapStorage(), @@ -59,7 +61,7 @@ function build({ core, storage, fetch, native, systemMemoryGiB, locks = null, me const make = native ? makeNativeBackend : makeWasmBackend; env.backend = make({ ...env, locks, broadcast: null, - proverOptions: { poll: 1, maxWait: 5000, ...(memberOrder ? { memberOrder } : {}) }, + proverOptions: { poll: 1, maxWait: 5000, ...(memberOrder ? { memberOrder } : {}), ...(retiredKeys ? { retiredKeys } : {}) }, ...(native ? { systemMemoryGiB: systemMemoryGiB ?? (() => 4) } : {}), }); return env; @@ -1270,3 +1272,65 @@ test('clients#1: with no prover route the withdrawal is refused up front and say assert.equal(coreCalled(env, 'prepare_burn').length, 0); assert.equal(count(env.fetch, 'prover_submit'), 0); }); + +// ------------------------------------------- retired prover keys (VK-9, monorepo#18) ---------- + +const RETIRED_TEXT = /This prover's key was retired and is no longer used\. Pair another prover in Settings, or update Rand Wallet to the latest version\./; + +test('the retired pool keys are listed, and the pinned pool names none of them', () => { + assert.deepEqual(RETIRED_PROVER_KEYS.map((k) => k.fingerprint), [ + 'RGTF-7HKJ-XZFV-GQ1J', 'ZEXQ-1JHV-ZT60-KFB5', 'D2XV-WXVT-PZRC-D7G8', 'SR28-MYT0-GR6A-03DE', 'GMNX-Q1QD-FEXG-JHJM', + ]); + assert.ok(Object.isFrozen(RETIRED_PROVER_KEYS) && RETIRED_PROVER_KEYS.every(Object.isFrozen)); + // The descriptor every shell ships (the real one, not the stub core's). + const pinned = JSON.parse(readFileSync(new URL('../../core/crates/wallet-core/src/trusted-prover-pool.json', import.meta.url), 'utf8')); + assert.ok(pinned.members.length > 0); + for (const m of pinned.members) { + assert.equal(RETIRED_PROVER_KEYS.some((k) => k.fingerprint === m.fingerprint), false, `pinned member ${m.name} is a retired key`); + } +}); + +test('a link that names a retired key is not paired, and nothing is asked of it', async () => { + const retiredKeys = [{ fingerprint: proverFingerprint('KEY'), retiredOn: '2026-10-22' }]; + const env = build({ retiredKeys }); + await env.backend.wallet.create(PASSWORD); + await assert.rejects(() => env.backend.prover.pair(proverLink(), PASSWORD), RETIRED_TEXT); + assert.equal(count(env.fetch, 'prover_info'), 0, 'the retired key was asked'); + assert.equal(env.storage.local.get('proverToken'), undefined, 'a pairing was stored'); + assert.deepEqual((await env.backend.settings.get()).prover, DEFAULT_SETTING); + // The control: the same link, on a build whose list does not name its key, pairs. + const plain = build(); + await plain.backend.wallet.create(PASSWORD); + await plain.backend.prover.pair(proverLink(), PASSWORD); + assert.ok(plain.storage.local.get('proverToken')); +}); + +test('a pairing stored before its key was retired is sent nothing after the update', async () => { + // Paired on a build that did not know the key was retired… + const env = await sendableWallet(); + await env.backend.prover.pair(proverLink(), PASSWORD); + // …then the wallet is updated: the same storage, a build whose list names the key. + const updated = build({ storage: env.storage, core: env.core, retiredKeys: [{ fingerprint: proverFingerprint('KEY'), retiredOn: '2026-10-22' }] }); + await assert.rejects(() => updated.backend.send.send(SEND, () => {}), (err) => { + assert.equal(err.definite, true); + assert.match(err.message, RETIRED_TEXT); + return true; + }); + assert.equal(count(updated.fetch, 'prover_info'), 0, 'the retired key was asked'); + assert.equal(count(updated.fetch, 'prover_submit'), 0); + const probe = await updated.backend.prover.probe(); + assert.equal(probe.ok, false); + assert.match(probe.reason, RETIRED_TEXT); + assert.equal(count(updated.fetch, 'prover_info'), 0, 'the probe asked the retired key'); +}); + +test('a pool member whose key is on the retired list is never asked; the others still are', async () => { + const env = await sendableWallet({ + fetch: poolFetch(), memberOrder: inOrder('a', 'b', 'c'), + retiredKeys: [{ fingerprint: poolMember('a').fingerprint, retiredOn: '2026-10-22' }], + }); + await env.backend.prover.acknowledgeDefault(); + await env.backend.send.send(SEND, () => {}); + assert.equal(env.fetch.requests.some((r) => r.url === poolMember('a').url), false, 'the retired member was asked'); + assert.deepEqual(submittedTo(env), [poolMember('b').url]); +});