From cc4e5370113747360ecae0826f473b2272beef8c Mon Sep 17 00:00:00 2001 From: spektr Date: Sat, 28 Nov 2026 07:01:20 +0100 Subject: [PATCH 01/13] =?UTF-8?q?GNAI-024:=20Befund=20l=20=E2=80=94=20root?= =?UTF-8?q?fs=20150=E2=86=92300=20GiB=20nach=20Disk-full=20(Chain=20real?= =?UTF-8?q?=20~165=20GiB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2026-11-28 01:15 Platte voll (140/147 GiB), litecoind stoppte sauber. Fix live: pct resize 114 rootfs 300G (resize2fs lief automatisch), thin pool pve/data per lvextend -l +100%FREE auf 364,82 GiB (79%). Provisioning-Skript ROOT_DISK_GIB=300. Backup-Lauf 03:00 fiel wegen Node-Down aus, nachgeholt (restic 2 Snapshots). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 24 ++++++++++++------- .../scripts/provision-ct114-litecoin.sh | 4 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index 8019e1d..c47981f 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -42,8 +42,9 @@ Backups, Secret-Regeln). | f) | MWEB: Bitpanda und Rapidgator unterstützen keine MWEB-Adressen; `ltcmweb1…` an eine Exchange wäre Verlust. | Wallet erzeugt nur legacy/bech32-Adressen (`getnewaddress "" "bech32"` → `ltc1…`). MWEB bleibt lokal nutzbar (Cake Wallet), wird aber nie an Exchanges/Dienste adressiert. Dokumentiert in `litecoin.conf` und Abschnitt 8. | | g) | Research nimmt einen „separaten Proxmox Backup Server im LAN“ an, dessen Zugangsdaten der Betreiber liefert. Im Repo existiert **kein PBS**; das etablierte hostunabhängige Backup-Ziel ist der `gn-backup`-Account auf `ghostnet-ki` (`10.0.0.90`, eigene Hardware, Rolle `pve_lxc_backup_sync` / `gn_backup_receiver`). | Default: restic-Repo `sftp:gn-backup@10.0.0.90:/var/lib/ghostnet-ai-backup/ct114/restic` (Inventar-Variable `litecoin_backup_repository`, clientseitig verschlüsselt — das Ziel sieht nur Ciphertext). Falls der Betreiber doch ein PBS betreibt, genügen die PBS-Zugangsdaten als Inventar-Override. **Offener Punkt 11.1.** | | h) | Research: LXC-Backup „nur Snapshots, kein vzdump“. Repo-Konvention syncet alle `vzdump-lxc-*`-Archive nach ghostnet-ki (`pve_lxc_backup_sync`). | Bewusste, begründete Abweichung: CT 114 wird **nicht** in den vzdump-Job aufgenommen (150 GiB Chain, nächtlich ×4 Archive wären teuer; Chain ist per Neu-Sync rekonstruierbar; `wallet.dat` ist durch restic verschlüsselt **und** durch Snapshots geschützt). Umsetzung: Rolle `pve_lxc_snapshot` (täglich 04:00, 7 Snapshots Retention) + restic aus dem CT. **Operator-Schritt:** CT 114 im PVE-Backup-Job ausschließen (Abschnitt 6, Phase 0). | -| i) | Ressourcen 2 vCPU / 4 GiB / 150 GiB rootfs auf SSD/NVMe. | Übernommen; `local-lvm` (thin, snapshotfähig). Preflight im Provisioning-Skript: `local-lvm` aktiv und ≥ 214 GiB frei. Kein Nesting nötig (kein Podman; `litecoind` als systemd-Service unter User `litecoin`). | +| i) | Ressourcen 2 vCPU / 4 GiB / 150 GiB rootfs auf SSD/NVMe. | **Korrigiert auf 300 GiB** (Befund l: reale Chain Ende 2026 ~165 GiB — 150 GiB waren zu knapp). `local-lvm` (thin, snapshotfähig). Preflight im Provisioning-Skript: `local-lvm` aktiv und ≥ 332 GiB frei. Kein Nesting nötig (kein Podman; `litecoind` als systemd-Service unter User `litecoin`). | | k) | Research: `onlynet=onion` (P2P ausschließlich zu onion-Peers). Live geprüft 2026-11-27: die kompilierten onion-Seeds von v0.21.5.8 sind alle unerreichbar („host unreachable“ via Tor), während clearnet-via-Tor funktioniert (check.torproject.org via SOCKS: IsTor=true; duckduckgo-onion: HTTP 301). Der Node bliebe ohne Peers. | **Anpassung:** `onlynet=onion` entfällt; mit `proxy=127.0.0.1:9050` geht ALLER Verkehr (DNS-Seeds, clearnet-Peers via Tor-Exits, onion) durch Tor — unsere IP wird nie exponiert, `listen=0`/`discover=0` verhindern Inbound. Audit prüft: jedes Netzwerk hat proxy=127.0.0.1:9050, keine inbound Peers. | +| l) | Schätzung Chain ~60–90 GiB (2026-11-27). Live 2026-11-28: Platte voll bei 140/147 GiB, Node stoppte sauber („Disk space is too low!“). Chain bei Block 2,57 Mio bereits 132 GiB → real ~165 GiB am Tip. | **rootfs 150 → 300 GiB** (`pct resize 114 rootfs 300G` + `resize2fs` lief über pct automatisch), thin pool `pve/data` per `lvextend -l +100%FREE` auf 364,82 GiB (79 %). Backup-Lauf 03:00 fiel wegen Node-Down aus, manuell nachgeholt (restic: 2 Snapshots). Künftig: Pool-Füllstand im GNMON-Monitoring (Abschnitt 11), `thin_pool_autoextend_threshold` auf PVE lässt sich als Frühwarnung setzen. | | j) | Debian 13, unprivileged, Key-Only-SSH, fail2ban, unattended-upgrades, dedizierter User `litecoin`. | Übernommen nach Repo-Muster: frischer CT per gepinntem Community-Scripts-`debian.sh` + Bootstrap-Hook (wie CT 102, GNAI-016 Phase D), dann Ansible (`litecoin_lxc_baseline`, `litecoin_access`, `litecoin_fail2ban`, …). `unattended-upgrades` auf Debian-Security eingeschränkt (CT-100/101/102-Konvention). | ## 3. Zielarchitektur @@ -53,7 +54,7 @@ Backups, Secret-Regeln). | CT-ID / Hostname | `114` / `ltc-node` | | IP | `10.0.0.61/24` (statischer Serverbereich bis `.99`; DHCP ab `.100`), GW `10.0.0.1`, DNS `10.0.0.14` (Pi-hole), vmbr0, IPv6 aus | | OS / Typ | Debian 13, unprivileged, onboot, protection | -| Ressourcen | 2 vCPU, 4096 MiB RAM, 1024 MiB Swap, 150 GiB rootfs `local-lvm` | +| Ressourcen | 2 vCPU, 4096 MiB RAM, 1024 MiB Swap, **300 GiB** rootfs `local-lvm` (Befund l; live per `pct resize` von 150 auf 300 GiB erweitert) | | Software | `litecoind` v0.21.5.8 in `/opt/litecoin` (Symlink), `tor` (Client-only, SOCKS 127.0.0.1:9050), nftables, fail2ban, unattended-upgrades, restic | | Node-Konfig | `proxy=127.0.0.1:9050` (alle Netze, Befund k), `listen=0`, `dnsseed=0`, `upnp=0`, `natpmp=0`, RPC `127.0.0.1:9332` Cookie-Auth, `wallet=cold`, `dbcache=2048` | | Firewall | nftables default-deny; nur SSH 22 aus LAN/WireGuard; kein Forwarding | @@ -270,13 +271,18 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). restic-Passwort wurde **on-target** generiert (`/etc/litecoin-backup/restic-password`, 0600) — Operator holt es einmal per Konsole und legt es im Vaultwarden ab. - - **Speicherbudget (gemessen 2026-11-27):** rootfs 147 GiB, belegt 3,1 GiB - (Blockdateien sparse preallokiert). Prognose Vollsync: Chain ~60–90 GiB + - chainstate ~5–10 GiB → datadir < 100 GiB, passt in die 150 GiB. restic - sichert nur `backups/` (wallet.dat ~2,2 MiB/Tag → ~1 GiB/Jahr auf - ghostnet-ki, client-seitig verschlüsselt); PVE-Snapshots (Retention 7) - wachsen um den täglichen Chain-Zuwachs. RAM: litecoind-Peak ~2,5 GiB - (dbcache=2048) innerhalb der 4 GiB. + - **Speicherbudget (korrigiert 2026-11-28, Befund l):** Ursprünglich 150 GiB + rootfs — **zu knapp**: am 2026-11-28 01:15 lief die Platte voll (140/147 GiB), + litecoind stoppte mit „Disk space is too low!“ (sauberes Shutdown, kein + Datenverlust). Messung bei Block 2.570.985/3.220.414: `blocks/` 132 GiB → + hochgerechnet ~165 GiB Chain + chainstate ~2–6 GiB am Tip. **Fix:** + `pct resize 114 rootfs 300G` (live: 295 GiB, 140 GiB belegt, 142 GiB frei) + + thin pool `pve/data` per `lvextend -l +100%FREE` auf 364,82 GiB erweitert + (79 % belegt, VG `pve` danach 0 GiB frei — Pool-Alerting siehe Abschnitt 11). + Provisioning-Skript ROOT_DISK_GIB=300. restic sichert nur `backups/` + (wallet.dat ~2,2 MiB/Tag → ~1 GiB/Jahr auf ghostnet-ki); PVE-Snapshots + (Retention 7) wachsen um den täglichen Chain-Zuwachs. RAM: litecoind-Peak + ~3,9 GiB (dbcache=2048) innerhalb der 4 GiB. - PVE-Host: `pve_lxc_snapshot` aktiv, erster Snapshot `ghostnet-daily-20261127-072519`, Timer täglich 04:00 (Retention 7). vzdump: kein Cluster-Backup-Job vorhanden, der CT 114 fassen würde diff --git a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh index 4b7a517..5c27512 100755 --- a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh +++ b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh @@ -11,7 +11,7 @@ readonly NAMESERVER='10.0.0.14' readonly BRIDGE='vmbr0' readonly TEMPLATE_STORAGE='local' readonly CONTAINER_STORAGE='local-lvm' -readonly ROOT_DISK_GIB='150' +readonly ROOT_DISK_GIB='300' readonly POST_INSTALL_HOOK='/usr/local/sbin/ghostnet-litecoin-ansible-bootstrap-hook.sh' readonly BASELINE_HOOK='/usr/local/sbin/ghostnet-lxc-baseline.sh' @@ -177,7 +177,7 @@ grep -qx 'unprivileged: 1' <<<"$config" || die 'container is not unprivileged' grep -qx 'timezone: Europe/Berlin' <<<"$config" || die 'unexpected timezone' grep -Eq '^features: .*nesting=0' <<<"$config" || die 'nesting is not disabled' grep -Eq '^features: .*keyctl=0' <<<"$config" || die 'keyctl is not disabled' -grep -Eq '^rootfs: local-lvm:.*,size=150G(,|$)' <<<"$config" || +grep -Eq '^rootfs: local-lvm:.*,size=300G(,|$)' <<<"$config" || die 'unexpected root filesystem allocation' net0="$(grep '^net0: ' <<<"$config")" for expected_net_field in \ -- 2.54.0 From 9a2569cf8a787cbb50649c08af95cc4f2854d0a4 Mon Sep 17 00:00:00 2001 From: spektr Date: Sat, 28 Nov 2026 07:19:26 +0100 Subject: [PATCH 02/13] =?UTF-8?q?GNAI-024:=20Befund=20m=20=E2=80=94=20root?= =?UTF-8?q?fs=20von=20local-lvm=20nach=20daten4=20(7,3=20TiB=20SSD)=20vers?= =?UTF-8?q?choben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pct move-volume 114 rootfs daten4 (148,8 GiB), resize auf 2 TiB, alte LVs nach Verifikation entfernt: NVMe-Pool von 79% auf 39% entlastet. Snapshot auf daten4 getestet. Provisioning-Skript: CONTAINER_STORAGE=daten4. CT bootet von daten4, Node synct (Block 2.503.309), Wallet gelockt. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 25 ++++++++----------- .../scripts/provision-ct114-litecoin.sh | 10 ++++---- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index c47981f..3d12763 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -42,9 +42,10 @@ Backups, Secret-Regeln). | f) | MWEB: Bitpanda und Rapidgator unterstützen keine MWEB-Adressen; `ltcmweb1…` an eine Exchange wäre Verlust. | Wallet erzeugt nur legacy/bech32-Adressen (`getnewaddress "" "bech32"` → `ltc1…`). MWEB bleibt lokal nutzbar (Cake Wallet), wird aber nie an Exchanges/Dienste adressiert. Dokumentiert in `litecoin.conf` und Abschnitt 8. | | g) | Research nimmt einen „separaten Proxmox Backup Server im LAN“ an, dessen Zugangsdaten der Betreiber liefert. Im Repo existiert **kein PBS**; das etablierte hostunabhängige Backup-Ziel ist der `gn-backup`-Account auf `ghostnet-ki` (`10.0.0.90`, eigene Hardware, Rolle `pve_lxc_backup_sync` / `gn_backup_receiver`). | Default: restic-Repo `sftp:gn-backup@10.0.0.90:/var/lib/ghostnet-ai-backup/ct114/restic` (Inventar-Variable `litecoin_backup_repository`, clientseitig verschlüsselt — das Ziel sieht nur Ciphertext). Falls der Betreiber doch ein PBS betreibt, genügen die PBS-Zugangsdaten als Inventar-Override. **Offener Punkt 11.1.** | | h) | Research: LXC-Backup „nur Snapshots, kein vzdump“. Repo-Konvention syncet alle `vzdump-lxc-*`-Archive nach ghostnet-ki (`pve_lxc_backup_sync`). | Bewusste, begründete Abweichung: CT 114 wird **nicht** in den vzdump-Job aufgenommen (150 GiB Chain, nächtlich ×4 Archive wären teuer; Chain ist per Neu-Sync rekonstruierbar; `wallet.dat` ist durch restic verschlüsselt **und** durch Snapshots geschützt). Umsetzung: Rolle `pve_lxc_snapshot` (täglich 04:00, 7 Snapshots Retention) + restic aus dem CT. **Operator-Schritt:** CT 114 im PVE-Backup-Job ausschließen (Abschnitt 6, Phase 0). | -| i) | Ressourcen 2 vCPU / 4 GiB / 150 GiB rootfs auf SSD/NVMe. | **Korrigiert auf 300 GiB** (Befund l: reale Chain Ende 2026 ~165 GiB — 150 GiB waren zu knapp). `local-lvm` (thin, snapshotfähig). Preflight im Provisioning-Skript: `local-lvm` aktiv und ≥ 332 GiB frei. Kein Nesting nötig (kein Podman; `litecoind` als systemd-Service unter User `litecoin`). | +| i) | Ressourcen 2 vCPU / 4 GiB / 150 GiB rootfs auf SSD/NVMe. | **Korrigiert:** Chain Ende 2026 real ~165 GiB (Befund l), daher rootfs auf `daten4` (7,3 TiB SSD) statt NVMe-thin-pool — entlastet `local-lvm` um ~144 GiB (Befund m). Provisioning: 300 GiB auf `daten4`, Preflight: Storage aktiv und ≥ 332 GiB frei. Kein Nesting nötig (kein Podman; `litecoind` als systemd-Service unter User `litecoin`). | | k) | Research: `onlynet=onion` (P2P ausschließlich zu onion-Peers). Live geprüft 2026-11-27: die kompilierten onion-Seeds von v0.21.5.8 sind alle unerreichbar („host unreachable“ via Tor), während clearnet-via-Tor funktioniert (check.torproject.org via SOCKS: IsTor=true; duckduckgo-onion: HTTP 301). Der Node bliebe ohne Peers. | **Anpassung:** `onlynet=onion` entfällt; mit `proxy=127.0.0.1:9050` geht ALLER Verkehr (DNS-Seeds, clearnet-Peers via Tor-Exits, onion) durch Tor — unsere IP wird nie exponiert, `listen=0`/`discover=0` verhindern Inbound. Audit prüft: jedes Netzwerk hat proxy=127.0.0.1:9050, keine inbound Peers. | | l) | Schätzung Chain ~60–90 GiB (2026-11-27). Live 2026-11-28: Platte voll bei 140/147 GiB, Node stoppte sauber („Disk space is too low!“). Chain bei Block 2,57 Mio bereits 132 GiB → real ~165 GiB am Tip. | **rootfs 150 → 300 GiB** (`pct resize 114 rootfs 300G` + `resize2fs` lief über pct automatisch), thin pool `pve/data` per `lvextend -l +100%FREE` auf 364,82 GiB (79 %). Backup-Lauf 03:00 fiel wegen Node-Down aus, manuell nachgeholt (restic: 2 Snapshots). Künftig: Pool-Füllstand im GNMON-Monitoring (Abschnitt 11), `thin_pool_autoextend_threshold` auf PVE lässt sich als Frühwarnung setzen. | +| m) | 2026-11-28: NVMe-thin-pool `local-lvm` bei 80 % (CT 103/107/304 bereits bei 98–99 %), CT-114-rootfs nach Befund l auf 300 GiB — Kette wächst aber weiter (~165 GiB + ~20 GiB/Jahr). Leer stehendes 8-TB-Volume `daten4` (7,3 TiB SSD, btrfs, PVE-Storage mit `content rootdir,images`) vorhanden. | **rootfs nach `daten4` verschoben:** CT gestoppt, `pct move-volume 114 rootfs daten4` (148,8 GiB via rsync, exit 0), `pct resize 114 rootfs 2T`, alte LVs (`vm-114-disk-0` + 2 Snap-LVs) nach Verifikation per `lvremove` freigegeben → Pool `pve/data` von 79 % auf **39 %** gefallen. Snapshot-Support auf daten4 verifiziert (`pct snapshot`/`delsnapshot` getestet; Timer-Rolle `pve_lxc_snapshot` unverändert). CT bootet von daten4, Node synct weiter (Block 2.503.309/3.220.549), Wallet gelockt. Provisioning-Skript: `CONTAINER_STORAGE='daten4'`. | | j) | Debian 13, unprivileged, Key-Only-SSH, fail2ban, unattended-upgrades, dedizierter User `litecoin`. | Übernommen nach Repo-Muster: frischer CT per gepinntem Community-Scripts-`debian.sh` + Bootstrap-Hook (wie CT 102, GNAI-016 Phase D), dann Ansible (`litecoin_lxc_baseline`, `litecoin_access`, `litecoin_fail2ban`, …). `unattended-upgrades` auf Debian-Security eingeschränkt (CT-100/101/102-Konvention). | ## 3. Zielarchitektur @@ -54,7 +55,7 @@ Backups, Secret-Regeln). | CT-ID / Hostname | `114` / `ltc-node` | | IP | `10.0.0.61/24` (statischer Serverbereich bis `.99`; DHCP ab `.100`), GW `10.0.0.1`, DNS `10.0.0.14` (Pi-hole), vmbr0, IPv6 aus | | OS / Typ | Debian 13, unprivileged, onboot, protection | -| Ressourcen | 2 vCPU, 4096 MiB RAM, 1024 MiB Swap, **300 GiB** rootfs `local-lvm` (Befund l; live per `pct resize` von 150 auf 300 GiB erweitert) | +| Ressourcen | 2 vCPU, 4096 MiB RAM, 1024 MiB Swap, rootfs auf **`daten4`** (7,3 TiB SSD, btrfs): 300 GiB bei Provisioning, live auf **2 TiB** gewachsen (Befund m) | | Software | `litecoind` v0.21.5.8 in `/opt/litecoin` (Symlink), `tor` (Client-only, SOCKS 127.0.0.1:9050), nftables, fail2ban, unattended-upgrades, restic | | Node-Konfig | `proxy=127.0.0.1:9050` (alle Netze, Befund k), `listen=0`, `dnsseed=0`, `upnp=0`, `natpmp=0`, RPC `127.0.0.1:9332` Cookie-Auth, `wallet=cold`, `dbcache=2048` | | Firewall | nftables default-deny; nur SSH 22 aus LAN/WireGuard; kein Forwarding | @@ -271,18 +272,14 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). restic-Passwort wurde **on-target** generiert (`/etc/litecoin-backup/restic-password`, 0600) — Operator holt es einmal per Konsole und legt es im Vaultwarden ab. - - **Speicherbudget (korrigiert 2026-11-28, Befund l):** Ursprünglich 150 GiB - rootfs — **zu knapp**: am 2026-11-28 01:15 lief die Platte voll (140/147 GiB), - litecoind stoppte mit „Disk space is too low!“ (sauberes Shutdown, kein - Datenverlust). Messung bei Block 2.570.985/3.220.414: `blocks/` 132 GiB → - hochgerechnet ~165 GiB Chain + chainstate ~2–6 GiB am Tip. **Fix:** - `pct resize 114 rootfs 300G` (live: 295 GiB, 140 GiB belegt, 142 GiB frei) - + thin pool `pve/data` per `lvextend -l +100%FREE` auf 364,82 GiB erweitert - (79 % belegt, VG `pve` danach 0 GiB frei — Pool-Alerting siehe Abschnitt 11). - Provisioning-Skript ROOT_DISK_GIB=300. restic sichert nur `backups/` - (wallet.dat ~2,2 MiB/Tag → ~1 GiB/Jahr auf ghostnet-ki); PVE-Snapshots - (Retention 7) wachsen um den täglichen Chain-Zuwachs. RAM: litecoind-Peak - ~3,9 GiB (dbcache=2048) innerhalb der 4 GiB. + - **Speicherbudget (aktualisiert 2026-11-28, Befunde l+m):** rootfs auf + `daten4` (7,3 TiB SSD), live 2 TiB, belegt 139 GiB (8 %). Vollsync: Chain + ~165 GiB + chainstate ~2–6 GiB → datadir ~170 GiB, Platz für Jahrzehnte. + NVMe-Pool `local-lvm` durch den Move von 79 % auf 39 % entlastet (224 GiB + frei). restic sichert nur `backups/` (wallet.dat ~2,2 MiB/Tag → ~1 GiB/Jahr + auf ghostnet-ki); PVE-Snapshots (Retention 7) auf daten4 wachsen um den + täglichen Chain-Zuwachs. RAM: litecoind-Peak ~3,9 GiB (dbcache=2048) + innerhalb der 4 GiB. - PVE-Host: `pve_lxc_snapshot` aktiv, erster Snapshot `ghostnet-daily-20261127-072519`, Timer täglich 04:00 (Retention 7). vzdump: kein Cluster-Backup-Job vorhanden, der CT 114 fassen würde diff --git a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh index 5c27512..a232cc5 100755 --- a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh +++ b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh @@ -10,7 +10,7 @@ readonly GATEWAY='10.0.0.1' readonly NAMESERVER='10.0.0.14' readonly BRIDGE='vmbr0' readonly TEMPLATE_STORAGE='local' -readonly CONTAINER_STORAGE='local-lvm' +readonly CONTAINER_STORAGE='daten4' readonly ROOT_DISK_GIB='300' readonly POST_INSTALL_HOOK='/usr/local/sbin/ghostnet-litecoin-ansible-bootstrap-hook.sh' readonly BASELINE_HOOK='/usr/local/sbin/ghostnet-lxc-baseline.sh' @@ -94,9 +94,9 @@ storage_is_active "$TEMPLATE_STORAGE" || die "template storage ${TEMPLATE_STORAGE} is not active" storage_is_active "$CONTAINER_STORAGE" || die "container storage ${CONTAINER_STORAGE} is not active" -# The Litecoin chain needs roughly 100 GB plus growth on top of the thin -# 150 GiB rootfs; require headroom for rootfs plus chain before creating. -# (2026-11-27: local-lvm has ~206 GiB free, so +32 GiB headroom is the gate.) +# The Litecoin chain needs ~165 GiB (2026-11) plus growth; the rootfs lives on +# daten4 (7.3 TiB SSD btrfs, see GNAI-024 Befund m) — require headroom for the +# rootfs before creating. (2026-11-28: daten4 has ~7 TiB free.) storage_has_free "$CONTAINER_STORAGE" $((ROOT_DISK_GIB + 32)) || die "container storage ${CONTAINER_STORAGE} has less than $((ROOT_DISK_GIB + 32)) GiB free" @@ -177,7 +177,7 @@ grep -qx 'unprivileged: 1' <<<"$config" || die 'container is not unprivileged' grep -qx 'timezone: Europe/Berlin' <<<"$config" || die 'unexpected timezone' grep -Eq '^features: .*nesting=0' <<<"$config" || die 'nesting is not disabled' grep -Eq '^features: .*keyctl=0' <<<"$config" || die 'keyctl is not disabled' -grep -Eq '^rootfs: local-lvm:.*,size=300G(,|$)' <<<"$config" || +grep -Eq '^rootfs: daten4:.*size=300G(,|$)' <<<"$config" || die 'unexpected root filesystem allocation' net0="$(grep '^net0: ' <<<"$config")" for expected_net_field in \ -- 2.54.0 From 9505cd0dc84404b254edda28fd6ee9474804c712 Mon Sep 17 00:00:00 2001 From: spektr Date: Sun, 29 Nov 2026 02:08:15 +0100 Subject: [PATCH 03/13] =?UTF-8?q?GNAI-024:=20Befund=20n=20=E2=80=94=20RAM/?= =?UTF-8?q?Swap=20voll=20w=C3=A4hrend=20IBD;=20memory=204096=E2=86=928192,?= =?UTF-8?q?=20swap=201024=E2=86=922048?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit litecoind RSS 3,8 GiB (dbcache=2048 + IBD-Validierung) bei 4 GiB RAM + 1 GiB Swap. Live per pct set auf 8192/2048 erhöht (PVE-Host hat 22 GiB frei), keine OOM-Kills. Provisioning-Skript und Doku aktualisiert; dbcache bleibt bis Sync-Ende. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 3 ++- .../scripts/provision-ct114-litecoin.sh | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index 3d12763..355be3d 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -46,6 +46,7 @@ Backups, Secret-Regeln). | k) | Research: `onlynet=onion` (P2P ausschließlich zu onion-Peers). Live geprüft 2026-11-27: die kompilierten onion-Seeds von v0.21.5.8 sind alle unerreichbar („host unreachable“ via Tor), während clearnet-via-Tor funktioniert (check.torproject.org via SOCKS: IsTor=true; duckduckgo-onion: HTTP 301). Der Node bliebe ohne Peers. | **Anpassung:** `onlynet=onion` entfällt; mit `proxy=127.0.0.1:9050` geht ALLER Verkehr (DNS-Seeds, clearnet-Peers via Tor-Exits, onion) durch Tor — unsere IP wird nie exponiert, `listen=0`/`discover=0` verhindern Inbound. Audit prüft: jedes Netzwerk hat proxy=127.0.0.1:9050, keine inbound Peers. | | l) | Schätzung Chain ~60–90 GiB (2026-11-27). Live 2026-11-28: Platte voll bei 140/147 GiB, Node stoppte sauber („Disk space is too low!“). Chain bei Block 2,57 Mio bereits 132 GiB → real ~165 GiB am Tip. | **rootfs 150 → 300 GiB** (`pct resize 114 rootfs 300G` + `resize2fs` lief über pct automatisch), thin pool `pve/data` per `lvextend -l +100%FREE` auf 364,82 GiB (79 %). Backup-Lauf 03:00 fiel wegen Node-Down aus, manuell nachgeholt (restic: 2 Snapshots). Künftig: Pool-Füllstand im GNMON-Monitoring (Abschnitt 11), `thin_pool_autoextend_threshold` auf PVE lässt sich als Frühwarnung setzen. | | m) | 2026-11-28: NVMe-thin-pool `local-lvm` bei 80 % (CT 103/107/304 bereits bei 98–99 %), CT-114-rootfs nach Befund l auf 300 GiB — Kette wächst aber weiter (~165 GiB + ~20 GiB/Jahr). Leer stehendes 8-TB-Volume `daten4` (7,3 TiB SSD, btrfs, PVE-Storage mit `content rootdir,images`) vorhanden. | **rootfs nach `daten4` verschoben:** CT gestoppt, `pct move-volume 114 rootfs daten4` (148,8 GiB via rsync, exit 0), `pct resize 114 rootfs 2T`, alte LVs (`vm-114-disk-0` + 2 Snap-LVs) nach Verifikation per `lvremove` freigegeben → Pool `pve/data` von 79 % auf **39 %** gefallen. Snapshot-Support auf daten4 verifiziert (`pct snapshot`/`delsnapshot` getestet; Timer-Rolle `pve_lxc_snapshot` unverändert). CT bootet von daten4, Node synct weiter (Block 2.503.309/3.220.549), Wallet gelockt. Provisioning-Skript: `CONTAINER_STORAGE='daten4'`. | +| n) | 2026-11-28: RAM (4 GiB) und Swap (1 GiB) des CT voll — litecoind RSS 3,8 GiB, Peak 3,9 GiB + ~1 GiB Swap während IBD (Ursache: `dbcache=2048` + UTXO-/Blockindex-Validierung; keine OOM-Kills, Node lief stabil). PVE-Host hat 22 GiB available. | **memory 4096 → 8192, swap 1024 → 2048** live via `pct set 114 -memory 8192 -swap 2048` (sofort wirksam, cgroup-Limit). danach 3,8 GiB RAM frei, 1 GiB Swap frei. Provisioning-Skript (var_ram/var_swap + Checks) und Doku aktualisiert. `dbcache=2048` bleibt während IBD (schnelle Validierung); nach Sync optional auf 1024 senken (Folgepunkt Abschnitt 11). | | j) | Debian 13, unprivileged, Key-Only-SSH, fail2ban, unattended-upgrades, dedizierter User `litecoin`. | Übernommen nach Repo-Muster: frischer CT per gepinntem Community-Scripts-`debian.sh` + Bootstrap-Hook (wie CT 102, GNAI-016 Phase D), dann Ansible (`litecoin_lxc_baseline`, `litecoin_access`, `litecoin_fail2ban`, …). `unattended-upgrades` auf Debian-Security eingeschränkt (CT-100/101/102-Konvention). | ## 3. Zielarchitektur @@ -55,7 +56,7 @@ Backups, Secret-Regeln). | CT-ID / Hostname | `114` / `ltc-node` | | IP | `10.0.0.61/24` (statischer Serverbereich bis `.99`; DHCP ab `.100`), GW `10.0.0.1`, DNS `10.0.0.14` (Pi-hole), vmbr0, IPv6 aus | | OS / Typ | Debian 13, unprivileged, onboot, protection | -| Ressourcen | 2 vCPU, 4096 MiB RAM, 1024 MiB Swap, rootfs auf **`daten4`** (7,3 TiB SSD, btrfs): 300 GiB bei Provisioning, live auf **2 TiB** gewachsen (Befund m) | +| Ressourcen | 2 vCPU, **8192 MiB RAM, 2048 MiB Swap** (Befund n), rootfs auf **`daten4`** (7,3 TiB SSD, btrfs): 300 GiB bei Provisioning, live auf **2 TiB** gewachsen (Befund m) | | Software | `litecoind` v0.21.5.8 in `/opt/litecoin` (Symlink), `tor` (Client-only, SOCKS 127.0.0.1:9050), nftables, fail2ban, unattended-upgrades, restic | | Node-Konfig | `proxy=127.0.0.1:9050` (alle Netze, Befund k), `listen=0`, `dnsseed=0`, `upnp=0`, `natpmp=0`, RPC `127.0.0.1:9332` Cookie-Auth, `wallet=cold`, `dbcache=2048` | | Firewall | nftables default-deny; nur SSH 22 aus LAN/WireGuard; kein Forwarding | diff --git a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh index a232cc5..8230202 100755 --- a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh +++ b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh @@ -133,7 +133,7 @@ require_file_sha256 "$DEBIAN_SCRIPT_SHA256" "$helper_path" export COMMUNITY_SCRIPTS_URL COMMUNITY_SCRIPTS_CORE_URL export mode='generated' export var_cpu='2' -export var_ram='4096' +export var_ram='8192' export var_disk="$ROOT_DISK_GIB" export var_ctid="$CTID" export var_hostname="$HOSTNAME" @@ -163,12 +163,12 @@ pct config "$CTID" >/dev/null 2>&1 || die "helper returned without creating CT ${CTID}" # Community Scripts does not currently expose an LXC swap variable. -pct set "$CTID" --swap 1024 +pct set "$CTID" --swap 2048 config="$(pct config "$CTID")" grep -qx 'cores: 2' <<<"$config" || die 'unexpected CPU allocation' -grep -qx 'memory: 4096' <<<"$config" || die 'unexpected memory allocation' -grep -qx 'swap: 1024' <<<"$config" || die 'unexpected swap allocation' +grep -qx 'memory: 8192' <<<"$config" || die 'unexpected memory allocation' +grep -qx 'swap: 2048' <<<"$config" || die 'unexpected swap allocation' grep -qx 'hostname: ltc-node' <<<"$config" || die 'unexpected hostname' grep -qx 'nameserver: 10.0.0.14' <<<"$config" || die 'unexpected nameserver' grep -qx 'onboot: 1' <<<"$config" || die 'onboot is not enabled' -- 2.54.0 From 49c2d4c40279719e29ced1f66782f6681454774b Mon Sep 17 00:00:00 2001 From: spektr Date: Mon, 30 Nov 2026 19:43:10 +0100 Subject: [PATCH 04/13] =?UTF-8?q?GNAI-024:=20Vollsync=20abgeschlossen=20(3?= =?UTF-8?q?.222.167=20Bl=C3=B6cke,=20IBD=20false)=20=E2=80=94=20Phase=200?= =?UTF-8?q?=20agent-seitig=20gr=C3=BCn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit verify-production ok=27, audit-production ok=23; restic 4 Snapshots; PVE-Snapshots als btrfs-Subvolumes auf daten4; Chain 253 GiB on disk; Wallet gelockt. Stale local-lvm-Snapshot-Metadata bereinigt. Noch offen: FRITZ!Box/nmap (Operator), Phase 1 Restore-Test, Phase 2-4, PR. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index 355be3d..37c38b4 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -273,21 +273,20 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). restic-Passwort wurde **on-target** generiert (`/etc/litecoin-backup/restic-password`, 0600) — Operator holt es einmal per Konsole und legt es im Vaultwarden ab. - - **Speicherbudget (aktualisiert 2026-11-28, Befunde l+m):** rootfs auf - `daten4` (7,3 TiB SSD), live 2 TiB, belegt 139 GiB (8 %). Vollsync: Chain - ~165 GiB + chainstate ~2–6 GiB → datadir ~170 GiB, Platz für Jahrzehnte. - NVMe-Pool `local-lvm` durch den Move von 79 % auf 39 % entlastet (224 GiB - frei). restic sichert nur `backups/` (wallet.dat ~2,2 MiB/Tag → ~1 GiB/Jahr - auf ghostnet-ki); PVE-Snapshots (Retention 7) auf daten4 wachsen um den - täglichen Chain-Zuwachs. RAM: litecoind-Peak ~3,9 GiB (dbcache=2048) - innerhalb der 4 GiB. + - **Speicherbudget (final gemessen 2026-11-30 nach Vollsync, Befunde l+m):** rootfs + auf `daten4` (7,3 TiB SSD), live 2 TiB, datadir 253 GiB (`size_on_disk`) + → daten4 gesamt 356 GiB / 7,3 TiB (5 %). Chain wächst ~20 GiB/Jahr → + Jahrzehnte Platz. NVMe-Pool `local-lvm` durch den Move von 79 % auf 39 % + entlastet. restic sichert nur `backups/` (wallet.dat ~2–5 MiB/Tag → ~1 GiB/Jahr + auf ghostnet-ki); PVE-Snapshots (Retention 7) liegen als btrfs-Subvolumes auf + daten4. RAM: 8 GiB (Befund n), litecoind-Peak ~3,9 GiB während IBD, + steady state nach Sync deutlich darunter. - PVE-Host: `pve_lxc_snapshot` aktiv, erster Snapshot `ghostnet-daily-20261127-072519`, Timer täglich 04:00 (Retention 7). vzdump: kein Cluster-Backup-Job vorhanden, der CT 114 fassen würde (`pvesh get /cluster/backup` leer) — Befund h damit erledigt. - - Wallet `cold` per `createwallet` angelegt; **`encryptwallet` ist der - nächste Operator-Schritt** (exakter Befehl siehe „Noch offen“) — bis - dahin darf kein Betrag auf den Node. + - Wallet `cold` per `createwallet` angelegt und per `encryptwallet` + verschlüsselt (Operator, 2026-11-27; verifiziert: `getwalletinfo.unlocked_until: 0`). - Fixes unterwegs (alle gecommitt): awk-END-Falle im Storage-Gate, sed traf die Hook-Guard-Zeile (Pin aktualisiert), delegate_to-Tasks brauchen become: false, Debian 13 hat kein torctl (Journal statt Dateilog), @@ -297,13 +296,20 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). - **2026-11-27 (Operator erledigt):** `pct exec 114 -- passwd ghost` gesetzt; restic-Passwort aus `/etc/litecoin-backup/restic-password` geholt und im Vaultwarden abgelegt. -- **Noch offen (Operator, manuelle Eingabe):** `encryptwallet` mit Passphrase - — Daemon läuft mit `-conf=/etc/litecoin/litecoin.conf -datadir=/var/lib/litecoin`, - Cookie unter `/var/lib/litecoin/.cookie`; die cli braucht daher **explizit - `-conf=/etc/litecoin/litecoin.conf`** (sonst sucht sie in - `$HOME/.litecoin` und findet kein Cookie). Passphrase via `-stdin`, nie als - argv (sonst in Host-`ps`/Logs); `-stdin` liest eine JSON-gequotete Zeile: - `printf '"%s"\n' '' | pct exec 114 -- sudo -u litecoin /opt/litecoin/bin/litecoin-cli -conf=/etc/litecoin/litecoin.conf -stdin encryptwallet` - danach `pct exec 114 -- systemctl restart litecoind`. FRITZ!Box-Check (kein - Forward auf 10.0.0.61); Abnahmetests Abschnitt 10 (Restore-Test vor erstem - Betrag); PR gegen main. +- **2026-11-28 (erledigt):** `encryptwallet` via `-stdin` mit `-conf=/etc/litecoin/litecoin.conf` + (Daemon-datadir `/var/lib/litecoin`, Cookie `/var/lib/litecoin/.cookie`; ohne + `-conf` sucht die cli in `$HOME/.litecoin` und findet kein Cookie — Befund in + Doku), danach `systemctl restart litecoind`. Verifiziert: `unlocked_until: 0`. + Befunde l (Disk-full → rootfs 300 GiB), m (Move nach daten4, 2 TiB, Pool 79→39 %), + n (RAM/Swap voll während IBD → 8 GiB/2 GiB) umgesetzt und dokumentiert. +- **2026-11-30 — Vollsync abgeschlossen, Phase 0 (agent-seitig) grün:** + blocks = headers = 3.222.167, `initialblockdownload: false`, progress 1.0, + Chain on disk 253 GiB; 10 Peers, 0 inbound; Wallet gelockt, balance 0; + `verify-production.yml` ok=27 changed=0, `audit-production.yml` ok=23 changed=0; + restic 4 Snapshots auf ghostnet-ki (täglich 03:00); PVE-Timer-Snapshots als + btrfs-Subvolumes auf daten4 (20261129, 20261130); stale local-lvm-Snapshot-Metadata + aus `114.conf` entfernt (Backup `114.conf.bak-20261130`). +- **Noch offen (Operator):** FRITZ!Box-Check (kein Forward auf 10.0.0.61); + `nmap` von einem anderen LAN-Gerät gegen 10.0.0.61 (nur SSH aus LAN erwartet); + Abnahmetests Abschnitt 10 Phase 1 (Restore-Test vor erstem Betrag) und Phase 2–4 + (kleine echte Beträge Bitpanda↔Node↔Cake Wallet, Rapidgator); PR gegen main. -- 2.54.0 From 75f3d25d75cfba3a466168d1cd05ba97d5ac047b Mon Sep 17 00:00:00 2001 From: spektr Date: Mon, 30 Nov 2026 19:50:24 +0100 Subject: [PATCH 05/13] =?UTF-8?q?GNAI-024:=20Phase=200=20komplett=20?= =?UTF-8?q?=E2=80=94=20FRITZ!Box=20clean,=20Portscan=2010.0.0.61=20nur=20P?= =?UTF-8?q?ort=2022=20offen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scan von Workstation (10.0.0.155): 65535 Ports, nur 22 offen, 0 refused, Rest filtered (nftables DROP). FRITZ!Box: keine Forwards auf 10.0.0.61 (Operator). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index 37c38b4..822bb6d 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -309,7 +309,10 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). restic 4 Snapshots auf ghostnet-ki (täglich 03:00); PVE-Timer-Snapshots als btrfs-Subvolumes auf daten4 (20261129, 20261130); stale local-lvm-Snapshot-Metadata aus `114.conf` entfernt (Backup `114.conf.bak-20261130`). -- **Noch offen (Operator):** FRITZ!Box-Check (kein Forward auf 10.0.0.61); - `nmap` von einem anderen LAN-Gerät gegen 10.0.0.61 (nur SSH aus LAN erwartet); - Abnahmetests Abschnitt 10 Phase 1 (Restore-Test vor erstem Betrag) und Phase 2–4 - (kleine echte Beträge Bitpanda↔Node↔Cake Wallet, Rapidgator); PR gegen main. +- **2026-11-30 (Operator + Agent):** FRITZ!Box-Check bestanden (keine Forwards auf + 10.0.0.61). Portscan von der Workstation (10.0.0.155, LAN) gegen 10.0.0.61, + alle 65535 Ports: **nur 22 offen**, 0 refused, Rest filtered (nftables DROP) — + exakt wie konfiguriert. +- **Noch offen (Operator):** Abnahmetests Abschnitt 10 Phase 1 (Restore-Test vor + erstem Betrag) und Phase 2–4 (kleine echte Beträge Bitpanda↔Node↔Cake Wallet, + Rapidgator); PR gegen main. -- 2.54.0 From e0610411bdb0e27cc7cc4f1e718ffdf3b1f0cd49 Mon Sep 17 00:00:00 2001 From: spektr Date: Tue, 1 Dec 2026 07:57:58 +0100 Subject: [PATCH 06/13] =?UTF-8?q?GNAI-024:=20phase1-restore-test.sh=20?= =?UTF-8?q?=E2=80=94=20Swap-Schritte=20einzeln,=20sha256=20als=20Pass-Krit?= =?UTF-8?q?erium?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Der &&-Chain meldete trotz erfolgreichem Swap FAIL (sha proof line direkt danach PASS). Jetzt: stop litecoind mit Wait-Loop, einzelne cp/chown/chmod, sha256-Vergleich allein entscheidet. pct unlock 114 im Preflight gegen Lock durch abgebrochenen Clone. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../scripts/phase1-restore-test.sh | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100755 proxmox/lxc/ct-114-litecoin-wallet/scripts/phase1-restore-test.sh diff --git a/proxmox/lxc/ct-114-litecoin-wallet/scripts/phase1-restore-test.sh b/proxmox/lxc/ct-114-litecoin-wallet/scripts/phase1-restore-test.sh new file mode 100755 index 0000000..6dcb373 --- /dev/null +++ b/proxmox/lxc/ct-114-litecoin-wallet/scripts/phase1-restore-test.sh @@ -0,0 +1,168 @@ +#!/bin/bash +# GNAI-024 Abschnitt 10, Phase 1: unattended restore test for CT 114. +# Run on the operator workstation (needs ~/.ssh aliases ghostnet-pve-ansible-deploy +# and ghostnet-ct114-ansible-deploy). No secrets are read or logged: the restic +# password stays on CT 114, the wallet passphrase is NOT needed for this test +# (wallet is only checked loaded + hdseedid; the passphrase unlock stays an +# operator step on the live node). +# +# Steps: +# 1. fresh backupwallet + restic backup on CT 114, note restic snapshot ID +# 2. restic check (metadata + 5% data) on the off-host repo +# 3. restic restore of the wallet into /tmp on CT 114, sha256 vs. local backup copy +# 4. pct clone CT 114 from its latest snapshot into a scratch CT (10.0.0.91) +# 5. replace the scratch wallet.dat with the restic-restored file, boot litecoind, +# compare getwalletinfo.hdseedid with the live node +# 6. destroy the scratch CT, clean temp files, print PASS/FAIL summary +set -uo pipefail + +LOG="${LOG:-/tmp/ct114-phase1-restore-test.log}" +exec > >(tee -a "$LOG") 2>&1 + +SSHOPTS=(-o BatchMode=yes -o ControlMaster=no) +PVE=(ssh -F ~/.ssh/config "${SSHOPTS[@]}" ghostnet-pve-ansible-deploy sudo -n) +CT=(ssh -F ~/.ssh/config "${SSHOPTS[@]}" ghostnet-ct114-ansible-deploy sudo -n) +CTSSH=(ssh -F ~/.ssh/config "${SSHOPTS[@]}" ghostnet-ct114-ansible-deploy) +SCRATCH_ID=199 +SCRATCH_IP=10.0.0.91 # static range <= .99; .91 verified free 2026-11-30 +SKEY=~/.ssh/id_ed25519_ghostnet_ct114_ansible_deploy +SOPTS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o ControlMaster=no -i "$SKEY" -o ConnectTimeout=5) +SCRATCH=(ssh -F /dev/null "${SOPTS[@]}" "ansible-deploy@${SCRATCH_IP}") + +FAILURES=() +note() { echo "[phase1] $*"; } +pass() { echo "[phase1] PASS: $*"; } +fail() { echo "[phase1] FAIL: $*"; FAILURES+=("$*"); } + +RESTIC_REPO='sftp:gn-backup@10.0.0.90:/var/lib/ghostnet-ai-backup/ct114/restic' +# single remote command string: the inner single quotes protect the sftp.command +# value from the remote shell re-splitting (ssh argv join pitfall) +ct_restic() { + "${CTSSH[@]}" "sudo -n /usr/bin/restic $* -r '$RESTIC_REPO' -o 'sftp.command=ssh -F /etc/litecoin-backup/ssh_config gn-backup@10.0.0.90 -s sftp' --password-file /etc/litecoin-backup/restic-password" +} + +note "=== GNAI-024 Phase 1 restore test started $(date -Is) ===" + +# --- 0. preflight: scratch ID/IP free ------------------------------------- +if "${PVE[@]}" pct list | awk '{print $1}' | grep -qx "$SCRATCH_ID"; then + fail "CTID $SCRATCH_ID already in use"; else pass "CTID $SCRATCH_ID free"; fi +if ping -c1 -W1 "$SCRATCH_IP" >/dev/null 2>&1; then + fail "IP $SCRATCH_IP answers ping"; else pass "IP $SCRATCH_IP free"; fi +[ ${#FAILURES[@]} -eq 0 ] || { echo "PHASE1 RESULT: FAIL (preflight)"; exit 1; } +# a previously interrupted clone can leave a lock on the source CT +"${PVE[@]}" pct unlock 114 2>/dev/null || true + +# --- 1. fresh wallet backup + restic snapshot on CT 114 ------------------- +note "step 1: backupwallet + restic backup on CT 114" +"${CT[@]}" systemctl start litecoin-wallet-backup.service +rc=$? +if [ $rc -eq 0 ] && ! "${CT[@]}" systemctl is-failed litecoin-wallet-backup.service >/dev/null 2>&1; then + pass "litecoin-wallet-backup.service succeeded (rc=0, not failed)" +else + fail "litecoin-wallet-backup.service rc=$rc or failed state" +fi +SNAP_JSON=$(ct_restic snapshots --json --latest 1) +SNAP_ID=$(python3 -c 'import json,sys; print(json.load(sys.stdin)[0]["id"])' <<<"$SNAP_JSON" 2>/dev/null || true) +note "restic snapshot: $SNAP_ID" +[ -n "$SNAP_ID" ] && pass "restic snapshot $SNAP_ID exists" || { fail "no restic snapshot"; echo "PHASE1 RESULT: FAIL"; exit 1; } + +# --- 2. restic check on the off-host repo ---------------------------------- +note "step 2: restic check" +if ct_restic check --read-data-subset=5% >/dev/null 2>&1; then + pass "restic check clean" +else + fail "restic check reported problems" +fi + +# --- 3. restore wallet from restic on CT 114, compare sha256 --------------- +note "step 3: restic restore + sha256 comparison" +"${CT[@]}" rm -rf /tmp/restore-test +ct_restic restore "$SNAP_ID" --target /tmp/restore-test >/dev/null +RESTORED=$("${CT[@]}" find /tmp/restore-test -name 'wallet-*' -type f | sort | tail -1) +[ -n "$RESTORED" ] && pass "restored file: $RESTORED" || fail "no wallet file in restic restore" +# find (not ls-glob): backups/ is 0700 litecoin, so the remote login shell cannot +# expand a glob there; sudo find runs as root and the quoted -name reaches find intact +LOCAL_BAK=$("${CT[@]}" find /var/lib/litecoin/backups -maxdepth 1 -name 'wallet-*' | sort | tail -1) +[ -n "$LOCAL_BAK" ] || fail "no local backup wallet file found" +H_R=$("${CT[@]}" sha256sum "$RESTORED" /tmp/ct114-wallet-restored +[ -s /tmp/ct114-wallet-restored ] && pass "wallet file staged locally ($(stat -c%s /tmp/ct114-wallet-restored) bytes)" || fail "staging failed" + +# --- 4. live wallet facts + clone scratch CT from latest snapshot ---------- +note "step 4: live hdseedid + pct clone to scratch CT $SCRATCH_ID" +LIVE_HD=$("${CT[@]}" /opt/litecoin/bin/litecoin-cli -conf=/etc/litecoin/litecoin.conf getwalletinfo | python3 -c 'import json,sys; print(json.load(sys.stdin)["hdseedid"])') +note "live hdseedid: $LIVE_HD" +SNAPNAME=$("${PVE[@]}" pct listsnapshot 114 | awk '/ghostnet-daily/{s=$2} END{print s}') +note "cloning from snapshot $SNAPNAME" +"${PVE[@]}" pct clone 114 "$SCRATCH_ID" --snapname "$SNAPNAME" +clone_rc=$? +if "${PVE[@]}" pct list | awk '{print $1}' | grep -qx "$SCRATCH_ID"; then + pass "clone created (rc=$clone_rc; CT $SCRATCH_ID exists)" +else + fail "pct clone failed (rc=$clone_rc, no CT)" +fi +"${PVE[@]}" pct set "$SCRATCH_ID" -hostname ltc-restore-test -protection 0 \ + -net0 "name=eth0,bridge=vmbr0,gw=10.0.0.1,ip=${SCRATCH_IP}/24,type=veth" \ + -memory 4096 -swap 1024 \ + && pass "scratch CT configured ($SCRATCH_IP)" || fail "pct set failed" +"${PVE[@]}" pct start "$SCRATCH_ID" && pass "scratch CT started" || fail "pct start failed" + +BOOTED=0 +for i in $(seq 1 30); do + if "${SCRATCH[@]}" -o ConnectTimeout=3 true 2>/dev/null; then BOOTED=1; break; fi + sleep 5 +done +[ "$BOOTED" = 1 ] && pass "scratch CT ssh reachable" || fail "scratch CT ssh unreachable" + +# --- 5. swap in the restic-restored wallet, boot litecoind, compare -------- +if [ "$BOOTED" = 1 ]; then + note "step 5: wallet swap + hdseedid comparison in scratch CT" + cat /tmp/ct114-wallet-restored | "${SCRATCH[@]}" sudo -n tee /tmp/wallet-restored >/dev/null + RSIZE=$("${SCRATCH[@]}" sudo -n stat -c%s /tmp/wallet-restored 2>/dev/null || echo 0) + [ "$RSIZE" = "$(stat -c%s /tmp/ct114-wallet-restored)" ] && pass "wallet staged on scratch ($RSIZE bytes)" || fail "staging on scratch failed (rsize=$RSIZE)" + "${SCRATCH[@]}" sudo -n systemctl stop litecoind + for i in $(seq 1 24); do + "${SCRATCH[@]}" sudo -n systemctl is-active litecoind 2>/dev/null | grep -qx inactive && break + sleep 5 + done + # individual steps; the sha256 check below is the pass criterion for the swap + "${SCRATCH[@]}" sudo -n cp /var/lib/litecoin/cold/wallet.dat /var/lib/litecoin/cold/wallet.dat.pretest + "${SCRATCH[@]}" sudo -n cp /tmp/wallet-restored /var/lib/litecoin/cold/wallet.dat + "${SCRATCH[@]}" sudo -n chown litecoin:litecoin /var/lib/litecoin/cold/wallet.dat + "${SCRATCH[@]}" sudo -n chmod 600 /var/lib/litecoin/cold/wallet.dat + SWAP_H=$("${SCRATCH[@]}" sudo -n sha256sum /var/lib/litecoin/cold/wallet.dat /dev/null 2>&1; then RPC_OK=1; break; fi + sleep 5 + done + [ "$RPC_OK" = 1 ] && pass "litecoind up in scratch with restored wallet" || fail "litecoind did not come up in scratch" + if [ "$RPC_OK" = 1 ]; then + SCRATCH_HD=$("${SCRATCH[@]}" sudo -n /opt/litecoin/bin/litecoin-cli -conf=/etc/litecoin/litecoin.conf getwalletinfo | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("hdseedid",""))') + [ "$SCRATCH_HD" = "$LIVE_HD" ] && pass "hdseedid match: $SCRATCH_HD" || fail "hdseedid mismatch: scratch='$SCRATCH_HD' live='$LIVE_HD'" + ENC=$("${SCRATCH[@]}" sudo -n /opt/litecoin/bin/litecoin-cli -conf=/etc/litecoin/litecoin.conf getwalletinfo | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("unlocked_until"))') + [ "$ENC" = "0" ] && pass "restored wallet loads encrypted+locked (unlocked_until=0)" || fail "restored wallet not locked (unlocked_until=$ENC)" + fi +fi + +# --- 6. cleanup ------------------------------------------------------------- +note "step 6: cleanup" +"${PVE[@]}" pct stop "$SCRATCH_ID" 2>/dev/null +"${PVE[@]}" pct destroy "$SCRATCH_ID" && pass "scratch CT $SCRATCH_ID destroyed" || fail "scratch destroy failed" +"${CT[@]}" rm -rf /tmp/restore-test +rm -f /tmp/ct114-wallet-restored + +echo +if [ ${#FAILURES[@]} -eq 0 ]; then + echo "PHASE1 RESULT: PASS — snapshot clone + off-host restic restore + wallet load verified (hdseedid match, encrypted/locked)" +else + echo "PHASE1 RESULT: FAIL — ${#FAILURES[@]} failure(s):" + printf ' - %s\n' "${FAILURES[@]}" +fi +echo "[phase1] === end $(date -Is), log: $LOG ===" -- 2.54.0 From 3da2ad62e148b5f3893e77f0c8e5efd7b23e5555 Mon Sep 17 00:00:00 2001 From: spektr Date: Tue, 1 Dec 2026 08:36:30 +0100 Subject: [PATCH 07/13] =?UTF-8?q?GNAI-024:=20Phase=201=20Restore-Test=20PA?= =?UTF-8?q?SS=20(unattended)=20=E2=80=94=20snapshot=20clone=20+=20restic?= =?UTF-8?q?=20restore=20+=20hdseedid=20match?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scripts/phase1-restore-test.sh, 17/17 PASS: restic snapshot 86acb8a1, check clean, wallet sha256 match 4ade8012, clone CT 199 from ghostnet-daily-20261201, wallet swap sha-proven, litecoind up, hdseedid 9228fdbd match, encrypted+locked, scratch destroyed. Log: /tmp/ct114-phase1-restore-test.log Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index 822bb6d..d0b7492 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -313,6 +313,19 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). 10.0.0.61). Portscan von der Workstation (10.0.0.155, LAN) gegen 10.0.0.61, alle 65535 Ports: **nur 22 offen**, 0 refused, Rest filtered (nftables DROP) — exakt wie konfiguriert. -- **Noch offen (Operator):** Abnahmetests Abschnitt 10 Phase 1 (Restore-Test vor - erstem Betrag) und Phase 2–4 (kleine echte Beträge Bitpanda↔Node↔Cake Wallet, - Rapidgator); PR gegen main. +- **2026-12-01 — Phase 1 (Restore-Test) PASS, unattended** (Skript + `scripts/phase1-restore-test.sh`, Log `/tmp/ct114-phase1-restore-test.log`): + frisches `backupwallet`+restic (Snapshot `86acb8a1…`), `restic check` clean, + Restore der wallet.dat sha256-identisch zur lokalen Backup-Kopie + (`4ade8012…`), `pct clone` von Snapshot `ghostnet-daily-20261201-040031` auf + Scratch-CT 199 (10.0.0.91), restic-wallet.dat im Scratch eingespielt (sha256 + proof), litecoind startet damit, **hdseedid match** `9228fdbd…` mit Live-Node, + Wallet lädt verschlüsselt+gelockt (`unlocked_until: 0`), Scratch-CT danach + zerstört. Skript-Fixes unterwegs: ssh-Arg-quoting (restic sftp.command als + einzelner Remote-String), Glob-Expansion in 0700-litecoin-dir (find statt + ls-glob), neueste Backup-Generation wählen (sort|tail), pct unlock 114 im + Preflight, Swap-sha256 als Pass-Kriterium. +- **Noch offen (Operator):** Passphrase-Unlock einmalig auf dem Live-Node testen + (`walletpassphrase` → `getbalance` → `walletlock`); Abnahmetests Abschnitt 10 + Phase 2–4 (kleine echte Beträge Bitpanda↔Node↔Cake Wallet, Rapidgator); + PR gegen main. -- 2.54.0 From da07a041c499788d25a7b85f1438a917b2b823ee Mon Sep 17 00:00:00 2001 From: spektr Date: Tue, 1 Dec 2026 13:57:10 +0100 Subject: [PATCH 08/13] =?UTF-8?q?GNAI-024:=20PR=20#23=20gegen=20main=20er?= =?UTF-8?q?=C3=B6ffnet;=20Empfangsadresse=20ltc1qnf45=E2=80=A6=20erzeugt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 2-4 (kleine echte Beträge) bleiben Operator-Akzeptanz vor dem Merge. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index d0b7492..66c244b 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -325,7 +325,11 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). einzelner Remote-String), Glob-Expansion in 0700-litecoin-dir (find statt ls-glob), neueste Backup-Generation wählen (sort|tail), pct unlock 114 im Preflight, Swap-sha256 als Pass-Kriterium. -- **Noch offen (Operator):** Passphrase-Unlock einmalig auf dem Live-Node testen - (`walletpassphrase` → `getbalance` → `walletlock`); Abnahmetests Abschnitt 10 - Phase 2–4 (kleine echte Beträge Bitpanda↔Node↔Cake Wallet, Rapidgator); - PR gegen main. +- **2026-12-01:** PR #23 gegen main eröffnet + (git.ghostnet.selfhost.eu/ghostnet.ai/infrastructure/pulls/23); alle 4 + statischen CI-Jobs lokal grün. Empfangsadresse erzeugt: + `ltc1qnf452shz8lz52yy53cf33rs297lt7gavzerfd0` (bech32). +- **Noch offen (Operator, vor Merge von PR #23):** Passphrase-Unlock einmalig + auf dem Live-Node testen (`walletpassphrase` → `getbalance` → `walletlock`); + Abnahmetests Abschnitt 10 Phase 2–4 (kleine echte Beträge Bitpanda↔Node↔ + Cake Wallet, Rapidgator; nur `ltc1…`-bech32 an Exchanges, nie MWEB). -- 2.54.0 From 361bf774c96aa8f4b63b3fc031f8fc2889119e7c Mon Sep 17 00:00:00 2001 From: spektr Date: Tue, 1 Dec 2026 15:02:48 +0100 Subject: [PATCH 09/13] GNAI-024: HowTo Litecoin-Node-Bedienung (Befehle, Best Practices, keine Secrets) Neue Doku GNAI-024-HOWTO_Litecoin-Node-Bedienung.md: Zugang, read-only-Wrapper, Wallet-OPs via pct exec + -stdin, Sende-Ablauf, Passphrase-Rotation, Backups, Best Practices (frische Adresse pro Einzahlung, keine Explorer, nur bech32 an Exchanges, Wallet gelockt), Verbote, Troubleshooting. Index aktualisiert. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- docs/GNAI-000-DOC_Index.md | 2 +- .../GNAI-024-HOWTO_Litecoin-Node-Bedienung.md | 134 ++++++++++++++++++ .../GNAI-024-PLAN_Litecoin-Wallet-LXC.md | 2 + 3 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-HOWTO_Litecoin-Node-Bedienung.md diff --git a/docs/GNAI-000-DOC_Index.md b/docs/GNAI-000-DOC_Index.md index cbe559c..9b80d12 100644 --- a/docs/GNAI-000-DOC_Index.md +++ b/docs/GNAI-000-DOC_Index.md @@ -41,7 +41,7 @@ jeweiligen Fachdokumenten. Die priorisierte weitere Umsetzung beschreibt der | [CT 101 / GNAI-017](platform/proxmox-server/lxc/ct-101-samba/GNAI-017-PLAN_Samba-NFS-Export.md) | Samba-Dateiserver `10.0.0.9`: Aufnahme ins Repository, NFS-Export und Encoding-Shares | | [CT 101 / GNAI-018](platform/proxmox-server/lxc/ct-101-samba/GNAI-018-REQ_Encoding-Pipeline-Integration.md) | Requirements der Encoding-Pipeline an CT 101 — Übergabe an den Ansible-Rebuild | | [CT 101 / GNAI-019](platform/proxmox-server/lxc/ct-101-samba/GNAI-019-DEC_Ansible-Migration.md) | Entwurfsentscheidungen der CT-101-Ansible-Migration: natives Samba, NFS-Ganesha als Quadlet, Fresh-State-Rebuild | -| [CT 114 / GNAI-024](platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md) | geplanter Litecoin-Wallet-LXC `ltc-node` (`10.0.0.61`): Prüfung der Research-Dokumente, Tor-only Cold Node, Ansible-Projekt und Provisioning — noch nicht angelegt (Plan 25.11.2026) | +| [CT 114 / GNAI-024](platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md) | Litecoin-Wallet-LXC `ltc-node` (`10.0.0.61`): live seit 2026-11-27, Vollsync + Phase 0/1 PASS, PR #23 offen; Bedienung siehe [GNAI-024 HowTo](platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-HOWTO_Litecoin-Node-Bedienung.md) | ### KI und Deployment diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-HOWTO_Litecoin-Node-Bedienung.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-HOWTO_Litecoin-Node-Bedienung.md new file mode 100644 index 0000000..67af8fb --- /dev/null +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-HOWTO_Litecoin-Node-Bedienung.md @@ -0,0 +1,134 @@ +# GNAI-024 HowTo: Litecoin-Node CT 114 (`ltc-node`) bedienen + +Nachschlage-Anleitung für den Betreiber. **Keine Secrets** — Passphrasen, restic-Passwort +und Private Keys gehören ausschließlich in den Bitwarden/Vaultwarden, niemals in dieses +Repo, in Logs oder in Chat. + +- Node: CT 114 `ltc-node`, `10.0.0.61`, litecoind v0.21.5.8, Wallet `cold` (verschlüsselt) +- Plan/Hintergründe: [GNAI-024-PLAN_Litecoin-Wallet-LXC.md](GNAI-024-PLAN_Litecoin-Wallet-LXC.md) +- Alle Befehle mit `<...>`-Platzhaltern einsetzen; Passphrasen **immer via `-stdin`** + (nie als Kommandozeilen-Argument, sonst landet sie in Host-`ps`/Logs). + +## 1. Zugang — wer darf was + +| Zweck | Zugang | Beispiel | +|---|---|---| +| Read-only-Abfragen (Agent) | `ssh -F ~/.ssh/config ghostnet-ct114-agent 'sudo /usr/local/bin/ltc-readonly '` | `... ltc-readonly getbalance` | +| Wallet-Operationen (Betreiber) | als root@pve: `pct exec 114 -- sudo -u litecoin /opt/litecoin/bin/litecoin-cli -conf=/etc/litecoin/litecoin.conf ` | siehe unten | +| Admin/Logs (Betreiber) | `pct exec 114 -- systemctl status litecoind` / `journalctl -u litecoind -n 50` | | +| PVE-Side (Snapshots/Storage) | `ssh -F ~/.ssh/config ghostnet-pve-ansible-deploy 'sudo -n pct listsnapshot 114'` | | + +RPC läuft **nur auf 127.0.0.1:9332** mit Cookie-Auth und ist nur per SSH-Exec erreichbar — +kein Port-Forwarding (ist eh deaktiviert), kein Öffnen von 9332/9333 nach außen. + +## 2. Häufig genutzte Befehle + +### 2.1 Status (read-only, als Agent von der Workstation) + +```bash +R='ssh -F ~/.ssh/config ghostnet-ct114-agent sudo /usr/local/bin/ltc-readonly' +$R getblockchaininfo # Sync-Status (initialblockdownload, blocks, headers) +$R getblockcount # aktueller Block +$R getbalance # Guthaben (gelocktes Wallet reicht) +$R getwalletinfo # unlocked_until: 0 = gelockt +$R listtransactions # eigene Tx (nie öffentliche Explorer nutzen!) +$R getpeerinfo # Peers (alle outbound via Tor, 0 inbound) +$R getnetworkinfo # Netze: alle proxy=127.0.0.1:9050, localaddresses leer +``` + +### 2.2 Empfangsadresse erzeugen (frische Adresse pro Einzahlung!) + +```bash +pct exec 114 -- sudo -u litecoin /opt/litecoin/bin/litecoin-cli -conf=/etc/litecoin/litecoin.conf getnewaddress "