Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes are documented here. This project uses [semantic versioning](https://semver.org/).

## [0.3.14] — 2026-11-10

- **After a reboot:** while the node has not yet written its RPC cookie file, the app now shows "Waiting for
the node to write its RPC cookie file" (with the file's path) instead of a red "Authentication problem",
and checks again every 10 seconds. A cookie the node refuses is still shown as an authentication problem.
The connection test says the node may still be starting.

## [0.3.13] — 2026-11-10

- **A damaged `settings.json` no longer switches the web login off or deletes the scan results.** Until now a
Expand Down
26 changes: 11 additions & 15 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ Practical notes from the first releases through the fork:
back once Roots is on community-prod and tested against the Roots package on StartOS. The app itself and
its README may name Roots.
- `next` in our StartOS workspace is a copy of Start9-Community's own `next` branch; leave it (not ours).
- Release notes follow the guide's format: "Updated Monetary View to X.Y.Z." then short bullets
(New/Fix/Internal), then a link to the GitHub release, in all five languages (FR: no-break space before
":" and ";").
- Release notes follow the guide (`versions.md`): "Updated Monetary View to X.Y.Z.", then bullets under bold
headers once several categories are covered (**Security**, **Changes**, **Fixes**; localized), then a link
to the GitHub release, in all five languages (FR: no-break space before ":" and ";"). Only what users
observe: no mechanism, no internal package changes, no defect history.

## Umbrel official App Store

Expand Down Expand Up @@ -131,19 +132,14 @@ Practical notes from the first releases through the fork:

## State (2026-11-10)

App 0.3.13 merged on `main` (fixes from a full code and security review: a damaged settings.json fails safe,
App v0.3.14 (0.3.13: fixes from a full code and security review — a damaged settings.json fails safe,
weekly instead of daily gettxoutsetinfo, mutated-block check, request handling, actions pinned by commit,
unused code removed); `release.yml` not run yet. Released: v0.3.12. StartOS 0.3.12:0 in the Community Registry
and on Community Beta, Bitcoin category set (Start9 promoted it on its own within hours of merging #7;
promotion issue #8 closed). The maintainer's server runs StartOS 0.4.2 with Knots 29.3. Umbrel community store
0.3.12; official Umbrel App Store getumbrel/umbrel-apps#6328 at 0.3.12, waiting for review. Open: release
0.3.13 and the package updates (StartOS: exclude `.<net>.nocow`/`.<net>.old` from backups, mention the weekly
UTXO-size request in the descriptions); the Umbrel review; Roots wording once Roots is on community-prod.

Idea for a later release (maintainer: "maybe later", not now): a missing RPC cookie file right after a
reboot (the node has not written it yet) shows as a red "Authentication problem" until the 30 s retry
connects; show it as waiting for the node instead (`scanner.py` NodeAuthError, `node/rpc.py`), keeping red
for wrong credentials.
unused code removed; 0.3.14: a missing cookie after a reboot shows as waiting for the node). StartOS
0.3.12:0 in the Community Registry and on Community Beta, Bitcoin category set (Start9 promoted it on its own
within hours of merging #7; promotion issue #8 closed). StartOS 0.3.14:0 in preparation (0.3.13:0 was only a
test build, never submitted). The maintainer's server runs StartOS 0.4.2 with Knots 29.3. Umbrel community
store 0.3.12; official Umbrel App Store getumbrel/umbrel-apps#6328 at 0.3.12, waiting for review. Open: the
Start9 PR for 0.3.14:0, then Umbrel; the Umbrel review; Roots wording once Roots is on community-prod.

Lessons from 0.3.10:1-0.3.12: a StartOS user's btrfs data drive went read-only during a first full scan
(fsync of a fragmented copy-on-write SQLite file). The app now creates its per-network directory
Expand Down
2 changes: 1 addition & 1 deletion bitcoinmonetaryview/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""BitcoinMonetaryView: see how much spam your Bitcoin node stores, based on the Monetary Node rules."""

__version__ = "0.3.13"
__version__ = "0.3.14"
6 changes: 5 additions & 1 deletion bitcoinmonetaryview/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import time

from .node.client import make_node
from .node.rpc import NodeAuthError, NodeError, RPCError
from .node.rpc import CookieMissing, NodeAuthError, NodeError, RPCError
from .node.transport import NodeUnreachable


Expand All @@ -30,6 +30,10 @@ def add(name, status, message, hint=""):
ms = (time.monotonic() - t0) * 1000
add("Reachable", "ok", f"Connected to {t.describe()} ({ms:.0f} ms)")
add("Authentication", "ok", "RPC credentials accepted")
except CookieMissing as e:
add("Authentication", "warn", str(e),
"The node writes this file when it starts, so it may still be starting. If it is running, check rpc_cookie_file.")
return checks
except NodeAuthError as e:
add("Authentication", "fail", str(e),
"Check rpc_user/rpc_password, or point rpc_cookie_file to the node's .cookie file. "
Expand Down
8 changes: 7 additions & 1 deletion bitcoinmonetaryview/node/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class RPCForbidden(NodeError):
"""A call outside the read-only whitelist was attempted (never sent)."""


class CookieMissing(NodeError):
"""The cookie file does not exist (yet): the node writes it when it starts."""


class RPCError(NodeError):
def __init__(self, code, message, method=""):
super().__init__(f"{method}: {message} (code {code})" if method else f"{message} (code {code})")
Expand Down Expand Up @@ -101,6 +105,8 @@ def _auth(self, reload=False):
if self._cookie_file:
try:
cred = read_cookie(self._cookie_file)
except FileNotFoundError:
raise CookieMissing(f"RPC cookie file {self._cookie_file} does not exist yet") from None
except OSError as e:
raise NodeAuthError(f"cannot read RPC cookie file: {e.strerror}") from None
else:
Expand Down Expand Up @@ -167,5 +173,5 @@ def close(self):
self.transport.close()


__all__ = ["RPCClient", "RPCError", "RPCForbidden", "NodeError", "NodeAuthError",
__all__ = ["RPCClient", "RPCError", "RPCForbidden", "NodeError", "NodeAuthError", "CookieMissing",
"NodeUnreachable", "check_allowed", "ALLOWED", "RPC_IN_WARMUP"]
6 changes: 5 additions & 1 deletion bitcoinmonetaryview/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from . import __version__
from .node.client import default_dust_start, make_node, network_name
from .node.rpc import RPC_IN_WARMUP, NodeAuthError, NodeError, RPCError
from .node.rpc import RPC_IN_WARMUP, CookieMissing, NodeAuthError, NodeError, RPCError
from .node.transport import NodeUnreachable
from .rules import UPSTREAM_COMMIT
from .rules import monetary_rules as mr
Expand Down Expand Up @@ -258,6 +258,10 @@ def run(self):
self.status.set(phase="error", detail=str(e), last_error=str(e))
self.status.event("error", str(e))
self.sleep(60)
except CookieMissing:
self.status.set(phase="waiting_node", detail=f"Waiting for the node to write its RPC cookie file "
f"({self.config.rpc_cookie_file})")
self.sleep(10)
except NodeAuthError as e:
self.status.set(phase="error", detail=str(e), last_error=str(e))
self.status.event("error", f"Authentication problem: {e}")
Expand Down
4 changes: 4 additions & 0 deletions bitcoinmonetaryview/static/i18n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@
"Check rpc_user/rpc_password, or point rpc_cookie_file to the node's .cookie file. On Start9 the RPC credentials are shown in the Bitcoin Core/Knots/Roots service's properties.":
"Prüfe rpc_user/rpc_password oder lass rpc_cookie_file auf die .cookie-Datei des Nodes zeigen. Auf Start9 stehen die RPC-Zugangsdaten in den Eigenschaften des Bitcoin-Core-/Knots-/Roots-Dienstes.",
"The node may still be starting up. Try again in a minute.": "Der Node startet vielleicht noch. Versuche es in einer Minute erneut.",
"The node writes this file when it starts, so it may still be starting. If it is running, check rpc_cookie_file.":
"Der Node schreibt diese Datei beim Start, er startet also vielleicht noch. Wenn er läuft, prüfe rpc_cookie_file.",
"Scanning starts automatically once the node is fully synced.": "Das Scannen startet automatisch, sobald der Node vollständig synchronisiert ist.",
"Node is fully synced": "Node ist vollständig synchronisiert",
"Block statistics cover the available range only; the exact spam UTXO figure needs a non-pruned node.":
Expand Down Expand Up @@ -487,6 +489,7 @@
[/^Loading spent-output filter: ([\d,]+) entries$/, (m, n) => `Lade Filter für ausgegebene Outputs: ${N(n)} Einträge`],
[/^Spent-output filter loaded \(([\d,]+) spam outputs\)$/, (m, n) => `Filter für ausgegebene Outputs geladen (${N(n)} Spam-Outputs)`],
[/^Your node is still syncing \(([\d.]+) %\)\. Scanning starts when it is done\.$/, (m, p) => `Dein Node synchronisiert noch (${N(p)} %). Das Scannen startet, sobald er fertig ist.`],
[/^Waiting for the node to write its RPC cookie file \((.+)\)$/, (m, p) => `Warte darauf, dass der Node seine RPC-Cookie-Datei schreibt (${p})`],
[/^History scan runs daily (.+) \((.+)\)\. New blocks are still shown\.$/, (m, w, tz) => `Der Scan der Historie läuft täglich ${w} (${tz}). Neue Blöcke werden weiterhin angezeigt.`],
[/^History scan runs daily (.+) \((.+)\)\.$/, (m, w, tz) => `Der Scan der Historie läuft täglich ${w} (${tz}).`],
[/^The scan database was written by a newer version of Monetary View \(schema (\d+), this version knows (\d+)\)\. It is left as it is: update the app, or delete the database to scan again\.$/, (m, a, b) => `Die Scan-Datenbank wurde von einer neueren Version von Monetary View geschrieben (Schema ${a}, diese Version kennt ${b}). Sie bleibt unverändert: Aktualisiere die App oder lösche die Datenbank, um neu zu scannen.`],
Expand All @@ -511,6 +514,7 @@
[/^UTXO set: ([\d,]+) entries$/, (m, n) => `UTXO-Set: ${N(n)} Einträge`],
[/^Could not read the UTXO set size \((.+)\); will retry later$/s, (m, e) => `Größe des UTXO-Sets konnte nicht gelesen werden (${e}); neuer Versuch später`],
// connection test
[/^RPC cookie file (.+) does not exist yet$/, (m, p) => `RPC-Cookie-Datei ${p} existiert noch nicht`],
[/^Connected to (\S+) \((\d+) ms\)$/, (m, u, ms) => `Verbunden mit ${u} (${ms} ms)`],
[/^Node answered with an error: (.+)$/s, (m, e) => `Node antwortete mit einem Fehler: ${e}`],
[/^Chain: (\S+), height ([\d,]+)$/, (m, c, h) => `Chain: ${c}, Höhe ${N(h)}`],
Expand Down
4 changes: 4 additions & 0 deletions bitcoinmonetaryview/static/i18n/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,8 @@
"Check rpc_user/rpc_password, or point rpc_cookie_file to the node's .cookie file. On Start9 the RPC credentials are shown in the Bitcoin Core/Knots/Roots service's properties.":
"Comprueba rpc_user/rpc_password o haz que rpc_cookie_file apunte al archivo .cookie del nodo. En Start9, las credenciales RPC aparecen en las propiedades del servicio Bitcoin Core/Knots/Roots.",
"The node may still be starting up. Try again in a minute.": "Puede que el nodo aún se esté iniciando. Vuelve a intentarlo en un minuto.",
"The node writes this file when it starts, so it may still be starting. If it is running, check rpc_cookie_file.":
"El nodo escribe este archivo al arrancar, así que quizá aún esté arrancando. Si ya funciona, revisa rpc_cookie_file.",
"Scanning starts automatically once the node is fully synced.": "El escaneo empieza automáticamente cuando el nodo esté totalmente sincronizado.",
"Node is fully synced": "El nodo está totalmente sincronizado",
"Block statistics cover the available range only; the exact spam UTXO figure needs a non-pruned node.":
Expand Down Expand Up @@ -538,6 +540,7 @@
[/^Loading spent-output filter: ([\d,]+) entries$/, (m, n) => `Cargando el filtro de outputs gastados: ${N(n)} entradas`],
[/^Spent-output filter loaded \(([\d,]+) spam outputs\)$/, (m, n) => `Filtro de outputs gastados cargado (${N(n)} outputs de spam)`],
[/^Your node is still syncing \(([\d.]+) %\)\. Scanning starts when it is done\.$/, (m, p) => `Tu nodo aún se está sincronizando (${N(p)} %). El escaneo empieza cuando termine.`],
[/^Waiting for the node to write its RPC cookie file \((.+)\)$/, (m, p) => `Esperando a que el nodo escriba su archivo de cookie RPC (${p})`],
[/^History scan runs daily (.+) \((.+)\)\. New blocks are still shown\.$/, (m, w, tz) => `El escaneo del historial funciona a diario ${w} (${tz}). Los bloques nuevos se siguen mostrando.`],
[/^History scan runs daily (.+) \((.+)\)\.$/, (m, w, tz) => `El escaneo del historial funciona a diario ${w} (${tz}).`],
[/^The scan database was written by a newer version of Monetary View \(schema (\d+), this version knows (\d+)\)\. It is left as it is: update the app, or delete the database to scan again\.$/, (m, a, b) => `La base de datos del escaneo la escribió una versión más reciente de Monetary View (esquema ${a}; esta versión conoce el ${b}). Se deja tal cual: actualiza la aplicación o borra la base de datos para escanear de nuevo.`],
Expand All @@ -562,6 +565,7 @@
[/^UTXO set: ([\d,]+) entries$/, (m, n) => `Conjunto UTXO: ${N(n)} entradas`],
[/^Could not read the UTXO set size \((.+)\); will retry later$/s, (m, e) => `No se pudo leer el tamaño del conjunto UTXO (${e}); se reintentará más tarde`],
// connection test
[/^RPC cookie file (.+) does not exist yet$/, (m, p) => `El archivo de cookie RPC ${p} aún no existe`],
[/^Connected to (\S+) \((\d+) ms\)$/, (m, u, ms) => `Conectado con ${u} (${ms} ms)`],
[/^Node answered with an error: (.+)$/s, (m, e) => `El nodo respondió con un error: ${e}`],
[/^Chain: (\S+), height ([\d,]+)$/, (m, c, h) => `Cadena: ${c}, altura ${N(h)}`],
Expand Down
4 changes: 4 additions & 0 deletions bitcoinmonetaryview/static/i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@
"Check rpc_user/rpc_password, or point rpc_cookie_file to the node's .cookie file. On Start9 the RPC credentials are shown in the Bitcoin Core/Knots/Roots service's properties.":
"Vérifiez rpc_user/rpc_password, ou faites pointer rpc_cookie_file vers le fichier .cookie du nœud. Sur Start9, les identifiants RPC figurent dans les propriétés du service Bitcoin Core/Knots/Roots.",
"The node may still be starting up. Try again in a minute.": "Le nœud est peut-être encore en train de démarrer. Réessayez dans une minute.",
"The node writes this file when it starts, so it may still be starting. If it is running, check rpc_cookie_file.":
"Le nœud écrit ce fichier au démarrage, il est donc peut-être encore en train de démarrer. S’il tourne, vérifiez rpc_cookie_file.",
"Scanning starts automatically once the node is fully synced.": "L’analyse démarre automatiquement dès que le nœud est entièrement synchronisé.",
"Node is fully synced": "Le nœud est entièrement synchronisé",
"Block statistics cover the available range only; the exact spam UTXO figure needs a non-pruned node.":
Expand Down Expand Up @@ -537,6 +539,7 @@
[/^Loading spent-output filter: ([\d,]+) entries$/, (m, n) => `Chargement du filtre des outputs dépensés : ${N(n)} entrées`],
[/^Spent-output filter loaded \(([\d,]+) spam outputs\)$/, (m, n) => `Filtre des outputs dépensés chargé (${N(n)} outputs de spam)`],
[/^Your node is still syncing \(([\d.]+) %\)\. Scanning starts when it is done\.$/, (m, p) => `Votre nœud est encore en cours de synchronisation (${N(p)} %). L’analyse démarrera une fois terminé.`],
[/^Waiting for the node to write its RPC cookie file \((.+)\)$/, (m, p) => `En attente que le nœud écrive son fichier cookie RPC (${p})`],
[/^History scan runs daily (.+) \((.+)\)\. New blocks are still shown\.$/, (m, w, tz) => `L’analyse de l’historique tourne chaque jour ${w} (${tz}). Les nouveaux blocs restent affichés.`],
[/^History scan runs daily (.+) \((.+)\)\.$/, (m, w, tz) => `L’analyse de l’historique tourne chaque jour ${w} (${tz}).`],
[/^The scan database was written by a newer version of Monetary View \(schema (\d+), this version knows (\d+)\)\. It is left as it is: update the app, or delete the database to scan again\.$/, (m, a, b) => `La base de données d’analyse a été écrite par une version plus récente de Monetary View (schéma ${a}, cette version connaît le ${b}). Elle est laissée telle quelle : mettez l’application à jour ou supprimez la base de données pour relancer l’analyse.`],
Expand All @@ -561,6 +564,7 @@
[/^UTXO set: ([\d,]+) entries$/, (m, n) => `Ensemble UTXO : ${N(n)} entrées`],
[/^Could not read the UTXO set size \((.+)\); will retry later$/s, (m, e) => `Impossible de lire la taille de l’ensemble UTXO (${e}) ; nouvel essai plus tard`],
// connection test
[/^RPC cookie file (.+) does not exist yet$/, (m, p) => `Le fichier cookie RPC ${p} n’existe pas encore`],
[/^Connected to (\S+) \((\d+) ms\)$/, (m, u, ms) => `Connecté à ${u} (${ms} ms)`],
[/^Node answered with an error: (.+)$/s, (m, e) => `Le nœud a répondu par une erreur : ${e}`],
[/^Chain: (\S+), height ([\d,]+)$/, (m, c, h) => `Chaîne : ${c}, hauteur ${N(h)}`],
Expand Down
4 changes: 4 additions & 0 deletions bitcoinmonetaryview/static/i18n/pl.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@
"Check rpc_user/rpc_password, or point rpc_cookie_file to the node's .cookie file. On Start9 the RPC credentials are shown in the Bitcoin Core/Knots/Roots service's properties.":
"Sprawdź rpc_user/rpc_password albo ustaw rpc_cookie_file na plik .cookie węzła. Na Start9 dane logowania RPC są pokazane we właściwościach usługi Bitcoin Core/Knots/Roots.",
"The node may still be starting up. Try again in a minute.": "Węzeł może się jeszcze uruchamiać. Spróbuj ponownie za minutę.",
"The node writes this file when it starts, so it may still be starting. If it is running, check rpc_cookie_file.":
"Węzeł zapisuje ten plik przy starcie, więc może jeszcze się uruchamiać. Jeśli działa, sprawdź rpc_cookie_file.",
"Scanning starts automatically once the node is fully synced.": "Skanowanie zacznie się automatycznie, gdy węzeł będzie w pełni zsynchronizowany.",
"Node is fully synced": "Węzeł jest w pełni zsynchronizowany",
"Block statistics cover the available range only; the exact spam UTXO figure needs a non-pruned node.":
Expand Down Expand Up @@ -542,6 +544,7 @@
[/^Spent-output filter loaded \(([\d,]+) spam outputs\)$/,
(m, n) => `Filtr wydanych wyjść wczytany (${N(n)} ${F(n, "wyjście", "wyjścia", "wyjść")} spamu)`],
[/^Your node is still syncing \(([\d.]+) %\)\. Scanning starts when it is done\.$/, (m, p) => `Twój węzeł wciąż się synchronizuje (${N(p)} %). Skanowanie zacznie się, gdy skończy.`],
[/^Waiting for the node to write its RPC cookie file \((.+)\)$/, (m, p) => `Czekam, aż węzeł zapisze swój plik cookie RPC (${p})`],
[/^History scan runs daily (.+) \((.+)\)\. New blocks are still shown\.$/, (m, w, tz) => `Skanowanie historii działa codziennie ${w} (${tz}). Nowe bloki są nadal pokazywane.`],
[/^History scan runs daily (.+) \((.+)\)\.$/, (m, w, tz) => `Skanowanie historii działa codziennie ${w} (${tz}).`],
[/^The scan database was written by a newer version of Monetary View \(schema (\d+), this version knows (\d+)\)\. It is left as it is: update the app, or delete the database to scan again\.$/, (m, a, b) => `Bazę danych skanowania zapisała nowsza wersja Monetary View (schemat ${a}, ta wersja zna ${b}). Pozostaje bez zmian: zaktualizuj aplikację albo usuń bazę danych, aby skanować od nowa.`],
Expand All @@ -568,6 +571,7 @@
[/^UTXO set: ([\d,]+) entries$/, (m, n) => `Zbiór UTXO: ${N(n)} ${F(n, "wpis", "wpisy", "wpisów")}`],
[/^Could not read the UTXO set size \((.+)\); will retry later$/s, (m, e) => `Nie udało się odczytać rozmiaru zbioru UTXO (${e}); ponowna próba później`],
// connection test
[/^RPC cookie file (.+) does not exist yet$/, (m, p) => `Plik cookie RPC ${p} jeszcze nie istnieje`],
[/^Connected to (\S+) \((\d+) ms\)$/, (m, u, ms) => `Połączono z ${u} (${ms} ms)`],
[/^Node answered with an error: (.+)$/s, (m, e) => `Węzeł odpowiedział błędem: ${e}`],
[/^Chain: (\S+), height ([\d,]+)$/, (m, c, h) => `Łańcuch: ${c}, wysokość ${N(h)}`],
Expand Down
Loading
Loading