fix 1.23.3: ladder requires wallet-cli; settle for coins so pay can run
Root cause of stale intro payments: koopa max-ladder minted but accept-uri failed with taler-wallet-cli not found (SKIP_ACCEPT ×16). Fail early without CLI/helper; after bank transfer_done keep polling + run-pending for available coins; pay wait 180s; host-agent max-ladder sets WALLET_CLI PATH.
This commit is contained in:
parent
bf04f90538
commit
a103eeab9d
6 changed files with 51 additions and 11 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
1.23.2
|
||||
1.23.3
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.8.0`). File `VERSION` omits the `v` pre
|
|||
|
||||
| Tag | Date (UTC) | Notes |
|
||||
|-----|------------|--------|
|
||||
| **v1.23.3** | 2026-07-19 | **Bugfix:** payments stale because max-ladder never got coins — root cause on koopa was **taler-wallet-cli missing** (all mint-OK → SKIP_ACCEPT). Hard-fail ladder prereq if CLI/helper missing; settle keeps polling after transfer_done + short run-pending; pay wait default 180s; max-ladder wrapper sets PATH/WALLET_CLI. |
|
||||
| **v1.23.2** | 2026-07-19 | **Bugfix:** max-ladder host-agent forces **RUN_TIMEOUT=10800** (koopa env had 600 → run aborted mid-ladder); install starts oneshots with **--no-block**. |
|
||||
| **v1.23.1** | 2026-07-19 | **Fix / scope:** only **`/monitoring-max-ladder/`** for GOA (drop classic `/monitoring-ladder`). Daily timer + install first-run. monpages catalog/Caddy bare redirs for max-ladder only. |
|
||||
| **v1.23.0** | 2026-07-19 | **Feature:** GOA daily mon page **`/monitoring-max-ladder/`** (max-search) on bank/exchange/taler.hacktivism.ch *(1.23.0 briefly also had classic ladder; removed in 1.23.1)*. |
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ elapsed_ms() {
|
|||
# optional seed for reproducible max-search (empty = time-based)
|
||||
: "${LADDER_MAX_SEED:=}"
|
||||
# After withdraw, wait for spendable available>0 before pay (secs total; shows countdown)
|
||||
: "${LADDER_PAY_WAIT_AVAILABLE_S:=90}"
|
||||
: "${LADDER_PAY_WAIT_AVAILABLE_S:=180}"
|
||||
|
||||
# Historic libeufin-ish absolute ceiling used as default LADDER_MAX_AMOUNT on GOA
|
||||
LADDER_ABS_CEILING="4503599627370496"
|
||||
|
|
@ -99,8 +99,20 @@ if [ -z "${CLI_JS}" ] || [ ! -f "${CLI_JS}" ]; then
|
|||
CLI_JS=$(find_wallet_cli 2>/dev/null || true)
|
||||
fi
|
||||
if [ -z "${CLI_JS}" ] || [ ! -f "${CLI_JS}" ]; then
|
||||
# allow PATH wrapper as last resort (wcli falls back to taler-wallet-cli)
|
||||
# PATH wrapper last resort
|
||||
if command -v taler-wallet-cli >/dev/null 2>&1; then
|
||||
CLI_JS=""
|
||||
else
|
||||
err prereq "taler-wallet-cli not found" \
|
||||
"problem: no CLI_JS / WALLET_CLI .mjs and taler-wallet-cli not on PATH — accept-uri/pay cannot run (payments stay stale). Install wallet-cli (e.g. ~/.local/bin/taler-wallet-cli.mjs) + taler-helper-sqlite3; set WALLET_CLI= in ~/.config/taler-monitoring/env"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# helper is required for real wallet DB (otherwise accept "works" empty / no coins)
|
||||
if ! command -v taler-helper-sqlite3 >/dev/null 2>&1; then
|
||||
err prereq "taler-helper-sqlite3 not on PATH" \
|
||||
"problem: wallet-cli needs taler-helper-sqlite3 for sqlite backend — put it on PATH next to wallet-cli"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CUR="${EXPECT_CURRENCY:-GOA}"
|
||||
|
|
@ -522,9 +534,16 @@ else
|
|||
info "explorer secret" "resolved via EXP_PW / EXP_PW_FILE / stage SSH / koopa"
|
||||
fi
|
||||
if [ -n "${CLI_JS:-}" ] && [ -f "${CLI_JS}" ]; then
|
||||
info "wallet-cli" "$CLI_JS"
|
||||
ok "wallet-cli" "$CLI_JS"
|
||||
else
|
||||
info "wallet-cli" "PATH taler-wallet-cli ($(command -v taler-wallet-cli 2>/dev/null || echo missing))"
|
||||
ok "wallet-cli" "PATH $(command -v taler-wallet-cli)"
|
||||
fi
|
||||
ok "wallet-helper" "$(command -v taler-helper-sqlite3)"
|
||||
# prove wcli can start (avoids minting 32 probes then SKIP_ACCEPT command-not-found)
|
||||
if ! wcli balance >"$SCRATCH/wcli-smoke.out" 2>&1; then
|
||||
err prereq "wallet-cli smoke failed" \
|
||||
"problem: wcli balance failed — fix CLI_JS/PATH/helper. detail: $(tr '\n' ' ' <"$SCRATCH/wcli-smoke.out" | head -c 240)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- auto-account ---
|
||||
|
|
@ -910,10 +929,13 @@ else:
|
|||
fi
|
||||
ok "confirm $AMT ${ms_confirm}ms (client, on selected)"
|
||||
|
||||
# settle: poll wallet balance + bank transfer_done only — never run-until-done
|
||||
# settle: poll wallet balance + bank transfer_done — never run-until-done.
|
||||
# Prefer real coin delta (status OK). If bank transfer_done first, keep polling
|
||||
# briefly for available coins (OK) before accepting OK_BANK (pay needs available).
|
||||
t0=$(now_ms)
|
||||
settled=0
|
||||
xfer="?"
|
||||
bank_done=0
|
||||
if [ "$IS_ZERO" = "1" ]; then
|
||||
settled=1
|
||||
note="zero-amount: no coin delta expected"
|
||||
|
|
@ -931,13 +953,23 @@ sys.exit(0 if Decimal(sys.argv[1]) > Decimal(sys.argv[2]) else 1)
|
|||
fi
|
||||
xfer=$(curl -sS -m 10 "${BANK}/taler-integration/withdrawal-operation/${WID}" \
|
||||
| python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get("transfer_done"), d.get("status"))' 2>/dev/null || echo "?")
|
||||
# bank done is enough to leave settle without hanging on wallet
|
||||
if echo "$xfer" | grep -qi True; then
|
||||
note="bank transfer_done (no run-until-done) avail=${after} $xfer"
|
||||
break
|
||||
bank_done=1
|
||||
# nudge wallet to pick up wire (bounded; not run-until-done)
|
||||
wcli transactions >"$SCRATCH/tx-settle-$tag.out" 2>&1 || true
|
||||
if command -v timeout >/dev/null 2>&1 || command -v gtimeout >/dev/null 2>&1; then
|
||||
_to=$(command -v gtimeout 2>/dev/null || command -v timeout)
|
||||
"$_to" 8 wcli advanced run-pending >"$SCRATCH/run-pending-settle.out" 2>&1 || true
|
||||
fi
|
||||
# after bank done, still prefer coins; allow remaining rounds for available
|
||||
note="bank transfer_done waiting coins avail=${after} $xfer"
|
||||
fi
|
||||
sleep "$LADDER_SETTLE_SLEEP"
|
||||
done
|
||||
# If bank done but still no coin delta after all rounds, OK_BANK (pay-wait may finish)
|
||||
if [ "$settled" != "1" ] && [ "$bank_done" = "1" ]; then
|
||||
note="bank transfer_done avail=$(wallet_avail) $xfer (no run-until-done)"
|
||||
fi
|
||||
fi
|
||||
ms_settle=$(elapsed_ms "$t0")
|
||||
after=$(wallet_avail)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ _wrap_keys=(
|
|||
APT_DEPLOY_ENSURE SURFACE_SCOPE TALER_DOMAIN_FROM_CLI STRICT_EXIT SOURCE_SUITE_PATH
|
||||
MONPAGES_INVENTORY MONPAGES_CHECK_BARE MONPAGES_BARE_STRICT MONPAGES_REQUIRE_PUBLIC
|
||||
CHECK_BANK MERCHANT_REQUIRED CHECK_LANDING
|
||||
WALLET_CLI CLI_JS PATH LADDER_MODE LADDER_PAY LADDER_PAY_WAIT_AVAILABLE_S
|
||||
)
|
||||
for _k in "${_wrap_keys[@]}"; do
|
||||
if [ -n "${!_k+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -37,6 +37,12 @@ export MONPAGES_INVENTORY="job"
|
|||
|
||||
export LADDER_MODE=max
|
||||
export LADDER_PAY="${LADDER_PAY:-1}"
|
||||
export LADDER_PAY_WAIT_AVAILABLE_S="${LADDER_PAY_WAIT_AVAILABLE_S:-180}"
|
||||
export APT_DEPLOY_ENSURE=0
|
||||
# Prefer host wallet-cli install used by mon (find_wallet_cli / WALLET_CLI)
|
||||
export PATH="${HOME}/.local/bin:${PATH:-}"
|
||||
if [ -z "${WALLET_CLI:-}" ] && [ -f "${HOME}/.local/bin/taler-wallet-cli.mjs" ]; then
|
||||
export WALLET_CLI="${HOME}/.local/bin/taler-wallet-cli.mjs"
|
||||
fi
|
||||
|
||||
exec bash "$AGENT_DIR/run-host-report.sh" "$@"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
: "${LADDER_FREE_TEMPLATE:=goa-free}"
|
||||
: "${LADDER_FREE_TEMPLATE_INSTANCE:=}"
|
||||
: "${LADDER_USE_FREE_TEMPLATE:=1}"
|
||||
: "${LADDER_PAY_WAIT_AVAILABLE_S:=90}"
|
||||
: "${LADDER_PAY_WAIT_AVAILABLE_S:=180}"
|
||||
: "${LADDER_PAY_SETTLE_ROUNDS:=6}"
|
||||
|
||||
MAX_PAY_BEST_AMT="${MAX_PAY_BEST_AMT:-}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue