Commit Graph
1829 Commits
Author SHA1 Message Date
9qeklajcandGitHub 2e04cf5925 Merge pull request #655 from Routstr/add-specific-error-message
use specific error message/code
0.4.5
2026-08-09 14:26:21 +02:00
9qeklajc 6fa98ca5ae use specific error message/code 2026-08-09 14:21:00 +02:00
9qeklajcandGitHub f90db08205 Merge pull request #654 from Routstr/audit/money-path-red-tests-github
test: money-path audit — 8 RED tests for live fund-loss vulnerabilities
2026-08-08 00:51:00 +02:00
9qeklajc 239e2e5d5d test: mock store_cashu_transaction in credit_balance unit tests
The three credit_balance unit tests mock the DB session but let
credit_balance call the real store_cashu_transaction_with_retry, which
opens its own session against the global engine. In CI that database has
no cashu_transactions table; since storage failures now propagate
(a60b04ae) instead of being silently swallowed, the tests failed with
sqlite3.OperationalError. Patch the audit store like the existing
propagation test already does.
2026-08-08 00:47:35 +02:00
9qeklajcandGitHub 6e833f608c Merge pull request #652 from Routstr/fix/reduce-docker-build-context
fix(docker): exclude runtime state from build context
0.4.5-beta
2026-08-08 00:38:13 +02:00
9qeklajcandGitHub d26ff08877 Merge pull request #640 from Routstr/test/issue-639-forwarded-model-id
test: reproduce forwarded model ID alias regression
2026-08-06 23:43:48 +02:00
9qeklajc a60b04aea0 fix: propagate Cashu transaction storage failures 2026-08-06 23:35:37 +02:00
9qeklajc bc5c56ecc3 clean up 2026-08-06 22:58:44 +02:00
thefux 667f9bf6bb test: money-path audit — 8 RED tests for live fund-loss vulnerabilities
Comprehensive audit of all money-moving code paths on current main.
Found 8 live vulnerabilities where users, providers, or node runners
can lose funds, plus 1 false-green in the existing emergency refund
test suite.

Live vulnerabilities (all RED — tests assert correct/safe behaviour):

V-E1  send_refund() swallows DB failure after minting a refund token
      base.py ~line 3625 — except Exception: pass
V-E2  Emergency refund (chat) — same except: pass
      base.py ~line 3992 (existing test is a false green — 500-char
      window too short)
V-E3  Emergency refund (responses API) — identical pattern
      base.py ~line 4972
V-E4  Balance refund endpoint swallows DB failure
      balance.py ~line 628
V-E5  credit_balance() swallows 'in' transaction DB failure
      wallet.py ~line 1715
V-E6  EHBP refund token — except: pass after store
      ehbp.py ~line 762
V-E7  EHBP 'in' transaction — except: pass after store
      ehbp.py ~line 1028
V-E8  Admin withdraw returns token even when DB store fails
      admin.py ~line 475

V-E9  Window regression guard (GREEN) — documents the false-green in
      the existing test_emergency_refund_no_try_except_pass

Test results: 8 failed, 1 passed.
2026-08-06 20:58:06 +00:00
thefux de62a27fb6 fix(docker): exclude runtime state from build context 2026-08-06 19:57:27 +00:00
9qeklajc bdc19a6907 fix: preserve nullable forwarded model aliases 2026-08-06 21:54:13 +02:00
9qeklajcandGitHub 438ea9035f Merge pull request #650 from Routstr/unique-provider-id
make provider id unique
2026-08-05 14:45:35 +02:00
9qeklajc 943e083a89 make provider id unique 2026-08-05 00:49:17 +02:00
9qeklajcandGitHub 91f9cbec0b Merge pull request #649 from Routstr/improve-fallback-loop
better fallback
2026-08-05 00:40:29 +02:00
9qeklajc c7e5fba910 better fallback 2026-08-05 00:32:06 +02:00
9qeklajcandGitHub 93df935446 Merge pull request #647 from Routstr/fix/invoice-quote-not-found-v2
fix: treat 'quote not found' as definitive unpaid for invoice expiry
2026-08-04 23:19:44 +02:00
9qeklajc 27f53948ca clean up 2026-08-04 22:59:50 +02:00
thefux 48c69857ed fix: treat 'quote not found' as definitive unpaid for invoice expiry
When the mint no longer has a Lightning quote (e.g. after TTL purge or
restart), check_invoice_payment() was logging an ERROR and returning False.
This caused the periodic_invoice_watcher to keep polling the same dead
quote every 10s forever, producing infinite log spam.

Now _is_quote_not_found() detects 'Mint Error: quote not found (Code: 0)'
and returns True, allowing _expire_invoice_if_authoritatively_unpaid()
to mark the invoice as expired so the watcher stops polling it.

The check is case-insensitive and requires code 0 to avoid false positives
from other quote-related errors.
2026-08-04 19:39:43 +00:00
9qeklajcandGitHub c971862ac6 Merge pull request #636 from Routstr/ppq-auto-topup
ppq-auto-topup
2026-08-04 01:50:59 +02:00
9qeklajc 22b35ff93d increase daily topup 2026-08-04 01:47:21 +02:00
9qeklajc 2f2820eb33 fix test 2026-08-04 01:44:01 +02:00
9qeklajc a6c129c02d harden autotopup 2026-08-04 01:32:25 +02:00
9qeklajc a2e2a5c662 clean up 2026-08-04 01:13:20 +02:00
9qeklajc 8e8a9a46b6 Merge remote-tracking branch 'origin/main' into ppq-auto-topup
# Conflicts:
#	routstr/upstream/auto_topup.py
#	routstr/wallet.py
#	tests/unit/test_wallet.py
2026-08-04 00:24:27 +02:00
9qeklajcandGitHub 47d0d87a88 Merge pull request #631 from Routstr/fix/xcashu-cost-breakdown-port
fix: expose cost breakdown in paid responses
2026-08-04 00:20:20 +02:00
9qeklajc 3b2c5a0671 Merge remote-tracking branch 'origin/main' into fix/xcashu-cost-breakdown-port 2026-08-04 00:12:37 +02:00
9qeklajcandGitHub 0609c5ed77 Merge pull request #597 from Routstr/fix/mint-rate-limit-and-fallback
fix: per-mint rate limiting, trusted-mint fallback, and retry factory…
2026-08-04 00:11:08 +02:00
9qeklajc 694bc04623 harden melting 2026-08-04 00:06:53 +02:00
9qeklajc da859f2f84 clean up 2026-08-03 23:32:06 +02:00
9qeklajc dd8c4a9a8a update migartion 2026-08-03 00:05:36 +02:00
9qeklajc 2b4e4c2430 Merge remote-tracking branch 'origin/main' into fix/mint-rate-limit-and-fallback
# Conflicts:
#	tests/unit/test_fee_payout_migration.py
2026-08-02 23:29:16 +02:00
9qeklajcandGitHub 8c3d8f52ba Merge pull request #588 from Routstr/model-paths
add model path endpoint
2026-08-02 23:24:31 +02:00
9qeklajc e903aa3a9f clean up 2026-08-02 23:16:01 +02:00
9qeklajc f3eefc2638 Merge remote-tracking branch 'origin/main' into model-paths
# Conflicts:
#	routstr/core/settings.py
#	tests/unit/test_fee_payout_migration.py
2026-08-02 22:27:39 +02:00
9qeklajcandGitHub 3463149b38 Merge pull request #645 from Routstr/fix/increase-default-db-pool
fix(db): increase default connection pool capacity
2026-07-31 02:53:50 +02:00
9qeklajc dc13cde00c chore: remove unrelated PPQ PR changes 2026-07-31 02:42:14 +02:00
9qeklajc 55dba5136c docs: document PPQ auto top-up 2026-07-31 02:24:28 +02:00
9qeklajc c0aad3b3ab test: isolate BOLT11 mint selection liabilities 2026-07-31 02:16:03 +02:00
9qeklajc 19236ecc9d fix(db): increase default connection pool capacity 2026-07-31 02:14:50 +02:00
9qeklajc 7a2b485af6 Merge main into ppq-auto-topup 2026-07-31 02:10:43 +02:00
9qeklajc 2ec6b27200 fix: resolve mint fallback review comments 2026-07-31 02:10:00 +02:00
9qeklajc f9980e5c66 fix: harden PPQ auto top-up reconciliation 2026-07-31 02:06:50 +02:00
9qeklajcandGitHub 98fe5a37cd Merge pull request #644 from Routstr/fix/api-key-refund-token-retrieval-main
fix: return persisted API-key refund token
2026-07-31 01:25:18 +02:00
9qeklajc 60566313dc fix: return persisted API-key refund token 2026-07-31 01:19:18 +02:00
9qeklajc 443c910b9e Merge branch 'main' into fix/mint-rate-limit-and-fallback 2026-07-30 08:38:27 +02:00
9qeklajcandGitHub 88d301398b Merge pull request #642 from Routstr/fix/payout-safety-pool-lifecycle
Fix payout safety and proxy session lifecycle
2026-07-30 03:17:37 +02:00
9qeklajc 4cc9aef61f fix: make payouts and proxy sessions safe 2026-07-30 02:57:49 +02:00
9qeklajc 3befe063f4 fix: annotate lightning settlement test session 2026-07-30 01:19:35 +02:00
9qeklajc f8adaee362 revert: restore default compose port 2026-07-30 01:14:36 +02:00
9qeklajc 895ea90bfa Merge branch 'main' into fix/mint-rate-limit-and-fallback
# Conflicts:
#	routstr/core/settings.py
#	routstr/lightning.py
#	routstr/wallet.py
#	tests/integration/test_lightning_invoice_constraints.py
#	tests/unit/test_fee_payout_migration.py
#	tests/unit/test_fetch_all_balances.py
2026-07-30 01:09:32 +02:00