Skip to content

Commons Node View 0.2.0: guided setup, managed node, Umbrel single app - #1

Merged
Scrypty merged 5 commits into
mainfrom
feature/2026-10-13-commons-node-view
Oct 13, 2026
Merged

Scrypty merged 5 commits into
mainfrom
feature/2026-10-13-commons-node-view

Conversation

@Scrypty

@Scrypty Scrypty commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

What this is

Commons Node View 0.2.0. Until now the console only watched a node that someone else started. With this change it can also set up and run the node: a short guided setup picks a network, downloads the official BLVM node release from GitHub, checks it against the release's checksums.sha256, and starts it. The same image also runs as the node's own container in a two-container Umbrel app (store PR: see below).

Features

  • Guided setup: network choice, node download with progress (four steps), start.
  • Managed node: start, stop, restart from Settings; each network keeps its own data and switching asks for confirmation first.
  • Clean shutdown on SIGTERM; the node's stop state persists across restarts of the console.
  • RPC login generated once and kept (mode 0600); the console checks that the node really refuses callers without the password, and stops it if not.
  • Updates card (install a newer node release) and a Modules card (view only).
  • agent subcommand (blvm-ui-next agent --root /data) that runs the node in its own container.
  • One multi-arch image for both containers; runtime is Ubuntu 24.04 (the official release needs glibc 2.39), UID 1000, with a HEALTHCHECK.
  • Renamed to Commons Node View in the page and UI text.
  • Standalone mode (watching an existing node) is unchanged.

How it was tested

  • Host tests: 259 passed.
  • Clean clone of this branch: cargo build --release --locked and cd web && npm ci && npm run build both succeed.
  • Docker retest and fix pass on the two-container app: install of v0.1.60 verified by checksum; 401 without login, 200 with login; a stop persists across compose restart; clean stop in 28 s. Umbrel lint is clean except the two image.pinned placeholders (they are filled after this image is published).
  • Reviewed in two passes (design notes in the workspace repo: ui-managed-node-design.md, u01-review-REVIEW.md, cnv-stage1-review.md).

Not in this PR

  • Installing modules (the Modules card only shows state).
  • Signed releases: downloads are checked against the published checksum only, because releases are not signed yet.
  • macOS node builds: the managed setup and the Docker image are tested on Linux (the container); macOS node release builds are not part of this change.

Breaking or behaviour changes

  • Version is now 0.2.0 (Cargo and web).
  • Host and Origin checks are enforced: people who reach the console by LAN name or address must list it in BLVM_UI_ALLOWED_HOSTS (the Umbrel app's compose file sets it).
  • A blvm-bundle.toml marker file next to the binary tells the console that a bundled node program exists and enables the setup flow (see README).
  • Docker base image changed from Debian bookworm-slim to Ubuntu 24.04.

Merge order

Merge this PR first. Note that the workflow publishes :0.2.0 only on a v0.2.0 tag (a push to main publishes :main and :sha-...), so tag v0.2.0 after merging. Then the store PR can pin the digest of ghcr.io/btcdecoded/blvm-ui:0.2.0.

Store PR: BTCDecoded/blvm-umbrel-store (linked in a comment once opened).

Screenshots

Setup: network Setup: get the node Downloading
Home Settings (managed) Switch dialog
Updates Modules Logs

🤖 Generated with Claude Code

Scrypty and others added 4 commits October 13, 2026 16:27
The console can now set up and run the node itself instead of only watching one.

- releases/installer: list the official BLVM node releases on GitHub, download the
  binary for this platform and check it against the release's checksums.sha256
  (rustls with bundled roots, no OpenSSL) before it is put in place.
- managed/agent/agent_daemon/control/switch: a managed node that the console starts,
  stops, restarts and moves to another network; an "agent" subcommand that runs the
  node in its own container for the Umbrel app; RPC login that is generated once and
  kept (mode 0600), with a check that the node really refuses callers without it.
- settings/persist/fsutil/signals/procinfo/networks: settings and state kept across
  restarts with atomic writes, clean shutdown on SIGTERM, process information.
- http: new /api routes for setup, node control, updates and modules; Host and Origin
  checks (LAN names need BLVM_UI_ALLOWED_HOSTS); standalone mode is unchanged.
- version 0.2.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Setup walkthrough: pick a network, download the node with progress through four
  steps, start it.
- Settings: node card (start/stop/restart), network card with a confirm dialog before
  switching, updates card, modules card (view only), log tail.
- Rename of the console to Commons Node View in the page and the UI text.
- Typed API client and status store extended for the new routes.
- Mock host (web/mock) gains the managed scenarios so every button works for the
  screenshots; version 0.2.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The same image runs the console and, with "blvm-ui-next agent --root /data", the
node. The node binary is not in the image: the setup downloads and verifies it.
Runtime moves to Ubuntu 24.04 (the official node release needs glibc 2.39), runs as
UID 1000, adds curl for a HEALTHCHECK, and sets CC for cross builds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
README rewritten for the guided setup, managed node, Docker and Umbrel use,
environment variables and the security checks. New screenshots for setup,
settings (managed, standalone, switch dialog, updates, modules) and logs; the
older images are retaken under the new name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Scrypty

Scrypty commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Store PR (merge after this one and after the image is published): BTCDecoded/commons-umbrel-store#1

…ed open nodes with a password, stop test leaks

* Umbrel: the "Start the node when this app starts" switch is gone on the external agent (it restores
  desired.json whatever the switch says); the card keeps one line of help. README says so.
* Desktop upgrade: a node adopted from before logins that still answers without a password is restarted once
  with the generated (now saved) login instead of being stopped with the wrong message. The card and the log say
  "Restarted the node to turn on its RPC password." The safety net still stops a node that should have a login.
* Safety check: only an explicit 401/403 counts as locked; a dropped connection or timeout is asked again later.
* A start without a login removes a stale blvm.toml from the network folder (the node reads it from its cwd).
* Tests: nodes started by tests are killed when the fixture goes (also on a failed assertion) and when the test
  program ends, the stand-in nodes exit when their parent dies, ports are free loopback ports, the logging test
  no longer depends on a thread-local subscriber.
* README: note on the node's misleading "RPC authentication is required but no tokens" log line.
* Setup.svelte: chainLabel accepts null (svelte-check).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Scrypty

Scrypty commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up commit 5facc2b (fixes from the second review):

  • R1: the "Start the node when this app starts" switch is hidden on Umbrel (the agent restores desired.json whatever it says); one line of help stays, README updated.
  • R2: on desktop, an adopted node from before logins that still answers without a password is restarted once with the generated login, which is now saved. The card and the log say "Restarted the node to turn on its RPC password." The safety net still stops a node that should have a login. README corrected. Tested with a stand-in node, the real blvm, and at the console's boot().
  • R3: nodes started by tests are killed when the fixture goes (also after a failed assertion) and at program exit; stand-in nodes end when their parent dies; test ports are free loopback ports (the real node's P2P listens on 127.0.0.1 only).
  • N-a: only an explicit 401/403 counts as "asks for a login"; a dropped connection or timeout is asked again later.
  • N-b: a start without a login removes a stale blvm.toml from the network folder.
  • N-c: agent, daemon and switch tests use free ports; the installer-log test no longer depends on a thread-local subscriber (it flaked).
  • N-e: Setup.svelte svelte-check error fixed; the remaining svelte-check errors are the old Globe.svelte / Terrain.svelte ones.
  • README: one sentence on the node's misleading "RPC authentication is required but no tokens..." log line (upstream wording; Basic auth is in effect).

cargo test: 266 passed, 0 failed, 1 ignored (three runs, with the built blvm for the real-node tests); nothing left running afterwards.

@Scrypty
Scrypty marked this pull request as ready for review October 13, 2026 21:38
@Scrypty
Scrypty merged commit 7d4124e into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant