Install path for hernani@koopa: oneshot service plus 2-minute timer that runs the bank full scan and refreshes exchange/merchant stats via podman. |
||
|---|---|---|
| .. | ||
| collect-landing-stats.sh | ||
| collect_bank_stats.py | ||
| deploy-landings.sh | ||
| enrich_stats_alt.py | ||
| goa_amounts.py | ||
| install-landing-stats-host.sh | ||
| README.md | ||
taler-landing — central stats (hernani user systemd)
Public landing numbers on
- https://bank.hacktivism.ch/intro/ →
stats.json - https://exchange.hacktivism.ch/intro/ →
stats.json - https://taler.hacktivism.ch/intro/ →
stats.json
are produced by one host process as user hernani, not by three unrelated in-container crons.
Why host / user systemd
| Concern | Approach |
|---|---|
| All accounts / all money | Python full scan + tx pagination (not capped at 80 accounts) |
| High ladder GOA | amount_alt / UI alt units (Kilo-/Mega-/Peta-GOA) — tiles stay short |
| No root cron | systemctl --user as hernani + loginctl enable-linger |
| Failure safety | failed run only updates stats-run.json; last good stats.json stays |
Install (on koopa as hernani)
cd ~/src/koopa/koopa-admin-log
./scripts/taler-landing/install-landing-stats-host.sh
# timer without login session:
sudo loginctl enable-linger hernani
# run once:
systemctl --user start taler-landing-stats.service
journalctl --user -u taler-landing-stats.service -n 50 --no-pager
systemctl --user list-timers 'taler-landing-stats*'
Units:
configs/systemd/user/taler-landing-stats.service— oneshot collectorconfigs/systemd/user/taler-landing-stats.timer— every 2 minutes after boot
Installed paths:
| Path | Role |
|---|---|
~/.local/bin/collect-landing-stats.sh |
orchestrator |
~/.local/lib/taler-landing/*.py |
bank scan + alt enrich |
~/.local/state/taler-landing-stats/ |
logs |
~/.config/systemd/user/taler-landing-stats.* |
user units |
What the collector does
-
Bank —
collect_bank_stats.py- admin token → list all accounts
- for each account (except
SCAN_SKIP, defaultexchange) page through all transactions - sum credits / Taler withdraws / other debits
- emit
amount+amount_alt/amount_full podman cp→taler-hacktivism-bank:/var/www/bank-landing/stats.json
-
Exchange — run
landing-stats-exchange.shinside exchange container, then enrich alt fields on the host and write back. -
Merchant — same for merchant container.
exchange is skipped in the bank flow scan so the same GOA is not counted once as customer withdraw and again as exchange credit. Admin, explorer, and every auto-account are included.
Secrets
Preferred order:
~/src/koopa/koopa-admin-secrets/koopa/host-root/taler-bank/bank-admin-password.txt~/.config/taler-landing/bank-*-password.txtpodman exec taler-hacktivism-bank cat /root/bank-admin-password.txt
Explorer password optional (shared-pool balance).
Env overrides
| Env | Default | Meaning |
|---|---|---|
BANK_URL |
http://127.0.0.1:9012 |
libeufin loopback |
SCAN_SKIP |
exchange |
usernames excluded from flow |
TX_PAGE |
500 |
transactions page size |
MAX_TX_PAGES |
0 |
0 = unlimited pages / account |
ACCOUNTS_DELTA |
-10000 |
account list window |
ADMIN_LOG |
%h/src/koopa/koopa-admin-log |
refresh in-container scripts |
UI alt names
configs/shared/goa-amount.js formats large amounts as e.g. 1.23 Mega-GOA (tooltip = full GOA:…). Landings load it as /intro/goa-amount.js (deploy via deploy-landings.sh).
Legacy in-container bank cron
scripts/taler-bank/landing-stats.sh remains a fallback inside the bank container. Once the hernani timer is healthy, disable the old in-container minutely cron to avoid races:
podman exec taler-hacktivism-bank crontab -l # inspect
# remove landing-stats.sh line if present
Manual run
~/.local/bin/collect-landing-stats.sh
# or from checkout:
./scripts/taler-landing/collect-landing-stats.sh
curl -sS https://bank.hacktivism.ch/intro/stats.json | python3 -m json.tool | head