taler-monitoring/ladder/README.md

45 lines
1.9 KiB
Markdown

# Amount ladder modules
**Entry:** `../check_amount_ladder.sh` via:
```bash
./taler-monitoring.sh ladder # classic 23-rung withdraw + pay
./taler-monitoring.sh max-ladder # max-search withdraw + pay
./taler-monitoring.sh goa-ladder # legacy phase name = classic ladder
```
| Path | Role |
|------|------|
| `../check_amount_ladder.sh` | Orchestrator: classic / max **withdraw**, then pay phase |
| `lib_pay.sh` | **Pay** module: free-amount template, classic pay list, max **payable** ≤ available |
| `extract_rpubs.py` | Force-select: scrape `reservePub` from wallet dumps |
There is **no** `check_goa_ladder.sh` — removed; use the phases above.
## Modes
- **classic** (default): 23-rung withdraw 0→mids→max-1→max, then matching pay plan (never overspend).
- **max** (`max-ladder`): adaptive max withdraw, then adaptive max pay via public free template (hacktivism: `goa-free`).
## Env (pay)
| Variable | Default | Meaning |
|----------|---------|---------|
| `LADDER_PAY` | `1` | `0` = skip all pays |
| `LADDER_USE_FREE_TEMPLATE` | `1` | public POST template with `{"amount":…}` |
| `LADDER_FREE_TEMPLATE` | `goa-free` | template id (hacktivism) |
| `LADDER_FREE_TEMPLATE_INSTANCE` | merchant instance | e.g. `goa-demo-cp4zqk` |
| `LADDER_PAY_WAIT_AVAILABLE_S` | `90` | after withdraw, wait for spendable **available**>0; logs **withdraw board in start order** (OK/OK_BANK) with live `pendingIncoming``done` + timer (same wallet DB) |
## Wallet daemon (harness-style)
taler-harness keeps a **WalletService** up for the whole withdraw/confirm/wirewatch path.
Mon ladder defaults to the same idea:
| Env | Default | Meaning |
|-----|---------|---------|
| `LADDER_WALLET_SERVE` | `1` | `advanced serve` + `--wallet-connection` (no `run-until-done`) |
| `LADDER_WALLET_SERVE=0` | — | one-shot CLI only (coins may stay `pendingIncoming` / `OK_BANK`) |
Implementation: `ladder/lib_wallet_serve.sh` (shared with the e2e pattern).