Commit Graph
100 Commits
Author SHA1 Message Date
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
9qeklajcandGitHub c4d27ba02a Merge pull request #634 from Routstr/fix/combined-db-pool-exhaustion
fix: combine DB pool-exhaustion and session-lifecycle fixes
2026-07-30 00:45:00 +02:00
9qeklajc 5ea5024608 resolve review comments 2026-07-29 22:50:33 +02:00
thefux c75dee147a fix: set routstr-core port to 8011 to avoid Portainer conflict on 8000 2026-07-28 00:08:47 +00:00
9qeklajc 48c11eb7bc fix Lightning settlement test typing 2026-07-27 00:07:36 +02:00
9qeklajc c829685f80 fix Cashu fallback and Lightning settlement 2026-07-26 23:23:32 +02:00
9qeklajc 39f801561b fix: recreate refund sweep migration on latest head 2026-07-26 12:52:24 +02:00
9qeklajc ff55788e2d fix: address PR 634 review feedback 2026-07-26 12:44:37 +02:00
9qeklajc 1138cdd4ef Merge main and recreate mint URL migration 2026-07-26 00:16:10 +02:00
9qeklajcandGitHub f15eab9f10 Merge pull request #635 from Routstr/re-apply-migration
reapply fee migration
2026-07-25 23:54:53 +02:00
9qeklajc 344c3c5f21 reapply fee migration 2026-07-25 23:42:50 +02:00
9qeklajcandGitHub 1d4b8d7cb2 Merge pull request #633 from Routstr/fix/cashu-token-create-post
fix: avoid 414 errors when creating keys from Cashu tokens
2026-07-24 23:43:56 +02:00
9qeklajc 1131c2d583 test: keep dynamic settings validation mypy-safe 2026-07-24 23:41:01 +02:00
9qeklajc 7108d554c8 merge: combine PR #632 with broader pool-exhaustion fixes 2026-07-24 23:22:01 +02:00
9qeklajc 1eddf89d52 merge: preserve PR #630 history 2026-07-24 23:06:51 +02:00
9qeklajc b0c70ecddc fix: send Cashu token creation payload in request body 2026-07-24 23:01:10 +02:00
9qeklajc 2410a4a6ce fix: address review findings on payout liability staleness, sweep races, and cancellation safety
- periodic_payout: fetch liability per mint/unit right before computing
  available balance, so a concurrent top-up can only shrink the payout
- refund sweep: atomically claim each refund before redeeming; release the
  claim on failure so retries still happen and concurrent sweeps cannot
  misreport a sweep as client-collected
- check_invoice_payment: catch BaseException so task cancellation after a
  successful mint still emits the reconciliation alert
- tests: DB-guard race test where both mints succeed (exactly one credit);
  pool_size=1 test proving the fee payout releases its connection during
  the external send
2026-07-24 22:14:57 +02:00
9qeklajc 1b09639265 docs: document DB pool and mint concurrency env vars in .env.example 2026-07-24 21:44:11 +02:00
9qeklajc 7394b10e75 fix-concurent-issue 2026-07-24 21:29:21 +02:00
9qeklajcandGitHub b94d95fc2b Merge pull request #623 from Routstr/fix/streaming-billing-finalization
fix: fail safely on streaming billing errors
2026-07-24 20:19:56 +02:00
9qeklajc 27f81dbf42 update migration 2026-07-24 02:36:38 +02:00
9qeklajc 66ba31d0df Merge remote-tracking branch 'origin/main' into fix/streaming-billing-finalization 2026-07-24 02:05:58 +02:00
9qeklajcandGitHub a9593ab416 Merge pull request #570 from jeroenubbink/feat/config-ownership-secrets
feat(config): store node secrets in an encrypted vault
2026-07-24 02:02:21 +02:00
9qeklajcandGitHub 6221ee8152 Merge pull request #628 from Routstr/fix/cashu-reservation-recovery
fix(wallet): recover stale Cashu reservations safely
2026-07-24 01:12:57 +02:00
9qeklajc 65ea28cb85 add test 2026-07-24 01:10:57 +02:00
9qeklajc 2ed20b1b85 resolve reviews 2026-07-24 00:24:24 +02:00
9qeklajc 92246b78d0 add import 2026-07-23 01:08:34 +02:00
9qeklajc 6023c03959 Merge branch 'main' into fix/mint-rate-limit-and-fallback 2026-07-23 00:22:38 +02:00
9qeklajc dbe7a53afd fix format 2026-07-23 00:09:03 +02:00
9qeklajc e0c74e3a46 Merge branch 'main' into fix/streaming-billing-finalization
# Conflicts:
#	routstr/auth.py
#	routstr/proxy.py
#	routstr/upstream/base.py
#	tests/integration/test_balance_negative_on_cost_overrun.py
#	tests/integration/test_free_response_stale_reservation.py
2026-07-23 00:03:01 +02:00
9qeklajcandGitHub 18965b4ea4 Merge pull request #629 from jeroenubbink/fix/bill-served-candidate
fix: bill and forward failover requests as the provider that actually served
2026-07-22 23:23:07 +02:00
9qeklajc 97dc10a8ad harden impl. 2026-07-22 23:10:27 +02:00
9qeklajc a9a6381614 fix: recreate mint URL migration from latest head 2026-07-22 22:27:50 +02:00
9qeklajc 040799a4d7 Merge branch 'main' into fix/mint-rate-limit-and-fallback 2026-07-22 21:27:46 +02:00
9qeklajc 87850c97b9 Merge branch 'main' into fix/streaming-billing-finalization 2026-07-22 21:21:06 +02:00
9qeklajcandGitHub fcc87718ff Merge pull request #621 from Routstr/fix/propagate-cashu-storage-errors
fix: propagate Cashu storage errors
2026-07-22 21:18:10 +02:00
thefux 6c762f0c3d fix: type reconciliation report mappings 2026-07-22 00:09:36 +00:00
thefux 2b4f70442a fix: recover stale Cashu reservations safely 2026-07-22 00:06:33 +00:00
9qeklajcandGitHub 99724cc5f5 Merge pull request #620 from Routstr/fix/fee-payout-crash-guard
fix: guard fee payouts against crash double-payments
2026-07-22 00:41:04 +02:00
9qeklajcandGitHub e19f679609 Merge pull request #622 from Routstr/fix/retry-cashu-storage-writes
fix: retry critical Cashu storage writes
2026-07-22 00:39:21 +02:00
9qeklajcandGitHub bd1edcef26 Merge pull request #624 from Routstr/coverage-tests-pr-619
test: extract passing coverage tests from #619
2026-07-19 12:54:51 +02:00
thefux 586af15a1b chore: fix ruff lint errors (E402, F401, I001) 2026-07-18 14:41:32 +00:00
thefux 3e906605a0 fix: strict rate-limit detection, probe non-escalation, distinct error codes
Fixes three issues that caused per-mint rate-limit state to never recover:

1. _is_mint_rate_limited: remove substring matching on 'rate limit' /
   'too many requests' in exception messages.  Only HTTP 429
   (httpx.HTTPStatusError) is now classified as a rate limit, preventing
   false positives (e.g. a 503 with 'database rate exceeded' in its body).

2. _run_probe: use apply_cooldown() instead of apply_rate_limit_cooldown()
   when a probe fails due to a rate limit.  The probe is a recovery check,
   not a new request, so it should not escalate the exponential backoff
   counter (_consecutive_rate_limits).  This prevents the cooldown from
   ratcheting 60s → 120s → 240s → ... → 7h on repeated probe failures.

3. classify_redemption_error: split the combined _is_mint_rate_limited ||
   is_mint_connection_error check into two separate classifications:
   - mint_rate_limited / cashu_mint_rate_limited (503, retryable)
   - mint_unreachable / cashu_mint_unreachable (503, retryable)
   Callers (routstrd) can now distinguish temporary rate limits from
   permanent connection failures when deciding fallback strategy.

Tests: 20 new tests covering strict 429 detection, classification
priority, probe non-escalation, and cooldown reset behaviour.
2026-07-18 14:34:42 +00:00
9qeklajc 22a94a68a4 test: extract passing coverage tests from #619 2026-07-18 15:58:54 +02:00
9qeklajc 4defe4f227 fix: identify reservation releases 2026-07-18 14:59:57 +02:00
9qeklajc f8125a8a2d Merge branch 'fix/fee-payout-crash-guard' into fix/streaming-billing-finalization 2026-07-18 14:57:15 +02:00
9qeklajc 999a5634fa fix: snapshot reservation cleanup state 2026-07-18 14:54:06 +02:00
9qeklajc 2c218cce49 fix: make reservation cleanup atomic 2026-07-18 14:48:02 +02:00
9qeklajc fa0b366f9a fix: fail safely on streaming billing errors 2026-07-18 14:42:03 +02:00
9qeklajc a3a4d69ed3 fix: make storage retries idempotent 2026-07-18 14:33:40 +02:00
9qeklajc c9533c872a fix: retry critical Cashu storage writes 2026-07-18 14:28:18 +02:00
9qeklajc 90da3803c6 fix: preserve caller recovery on storage errors 2026-07-18 14:22:16 +02:00
9qeklajc 8b3b59e176 fix: propagate Cashu transaction storage errors 2026-07-18 14:16:30 +02:00
9qeklajc be5e323c68 test: cover payout restart and migration safety 2026-07-18 14:13:20 +02:00
9qeklajc f6d1a41728 fix: checkpoint fee payouts before sending 2026-07-18 14:08:41 +02:00
9qeklajcandGitHub b3bf1f0e90 Merge pull request #613 from Routstr/fix-overflowing-in-mobile
fix overflow
2026-07-17 21:51:38 +02:00
9qeklajcandGitHub 3035292d2a Merge pull request #575 from Routstr/ehbp-proxy-refactor
EHBP proxy support, Tinfoil direct integration, rate limiting, wallet fixes and more
2026-07-17 20:22:14 +02:00
9qeklajcandGitHub ac436d0862 Merge pull request #618 from jeroenubbink/config/docker-compose-restart-unless-stopped
config: Ensure docker compose services are restarted unless explicitly stopped
2026-07-17 20:21:34 +02:00
9qeklajc 281607108c fix(ui): use dynamic viewport heights 2026-07-16 13:25:44 +02:00
9qeklajcandGitHub 8314f3c1b0 Merge pull request #614 from Routstr/pr-575-review-fixes
Fix review blockers: hop-by-hop headers, exact attestation routing, doc updates
2026-07-16 13:18:56 +02:00
9qeklajcandGitHub 1a9041766b Merge pull request #616 from Routstr/fix/ppq-upstream-inference-cost
fix: bill PPQ.AI BYOK upstream_inference_cost + BYOK fee
2026-07-16 13:16:30 +02:00
9qeklajc 1957e716a3 clean up keyset unit recog. 2026-07-15 01:45:19 +02:00
9qeklajc 69f19ff991 defensive cooldown 2026-07-15 01:43:00 +02:00
9qeklajc 8b942f3c14 show mint status correclty 2026-07-15 01:00:32 +02:00
9qeklajc 09e1c7bf2d better cooldown 2026-07-15 00:10:17 +02:00
9qeklajc cc2a96e2ef make trusted mint available for lightning topup 2026-07-14 21:59:43 +02:00
9qeklajc c6733dbb62 fix overflow 2026-07-14 21:47:26 +02:00
9qeklajc 93ab1d927b mint cooldown 2026-07-14 01:55:35 +02:00
9qeklajc 39970d8bee clean up 2026-07-14 01:23:14 +02:00
9qeklajc d7c401d204 primary mint fallback 2026-07-14 01:10:23 +02:00
9qeklajc d44b98fd0d fix fallback 2026-07-14 00:54:44 +02:00
9qeklajc 6fa3610423 fix: account for mint fees in balance checks 2026-07-14 00:11:27 +02:00
9qeklajc 65702171e4 fix: harden mint fallback and refund recovery 2026-07-13 23:37:43 +02:00
9qeklajc 65abcbce92 fix: harden mint fallback and refund recovery 2026-07-13 23:33:56 +02:00
9qeklajcandGitHub c671d277d3 Merge pull request #603 from Routstr/refund-sweep-behavior-tests
test: exercise refund sweep state transitions
2026-07-13 00:09:30 +02:00
9qeklajc 9460e24f21 fix: persist outbound Cashu tokens before sending 2026-07-13 00:07:00 +02:00
9qeklajcandGitHub f31929b538 Merge pull request #610 from Routstr/fix-mypy
fix mypy
2026-07-12 23:35:35 +02:00
9qeklajc 129ea7bb76 fix mypy 2026-07-12 23:33:22 +02:00
9qeklajcandGitHub b88c6d84fa Merge pull request #608 from Routstr/fix/refund-sweep-test-coverage
test: cover periodic refund sweep behavior
2026-07-12 23:06:51 +02:00
9qeklajc 40153d4c36 fix: report cashu transaction persistence 2026-07-12 15:07:31 +02:00
9qeklajcandGitHub 238beb3e52 Merge pull request #605 from Routstr/fix/admin-withdraw-transaction-audit
fix: record admin withdrawals as outgoing transactions
2026-07-12 15:05:20 +02:00
9qeklajc 40bf976fbc fix: recreate mint URL migration 2026-07-12 15:04:43 +02:00
9qeklajc eae20f04a7 Merge branch 'main' into fix/mint-rate-limit-and-fallback 2026-07-12 15:02:07 +02:00
9qeklajcandGitHub dc833d9f5f Merge pull request #602 from Routstr/fix/auto-topup-transaction-recovery
fix: make auto-topup tokens recoverable
2026-07-12 14:57:03 +02:00
9qeklajc 31e7ff8fbd test: cover periodic refund sweep behavior 2026-07-12 14:54:26 +02:00
9qeklajc a1850dfa55 fix: record admin withdrawals as outgoing transactions 2026-07-12 14:49:51 +02:00
9qeklajcandGitHub 9eacabde0e Merge pull request #604 from Routstr/revert-600-fix/retry-cashu-transaction-storage
Revert "Retry Cashu transaction storage on transient DB failures"
2026-07-12 14:49:28 +02:00
9qeklajcandGitHub 73f52ef1fd Revert "Retry Cashu transaction storage on transient DB failures" 2026-07-12 14:47:30 +02:00
9qeklajc 110ec5da5d test: exercise refund sweep state transitions 2026-07-12 14:46:19 +02:00
9qeklajc a5cee796c9 fix: make auto-topup tokens recoverable 2026-07-12 14:45:17 +02:00
9qeklajcandGitHub aabf08a930 Merge pull request #600 from Routstr/fix/retry-cashu-transaction-storage
Retry Cashu transaction storage on transient DB failures
2026-07-12 14:21:40 +02:00
9qeklajc 07c15de106 better retry logic 2026-07-12 14:12:29 +02:00
9qeklajc aea24d23da fix: retry Cashu transaction storage 2026-07-12 13:29:09 +02:00
9qeklajcandGitHub e100c77288 Merge pull request #599 from Routstr/fix/cost-calculation-breakdown
Fix input/output cost breakdown calculation
2026-07-12 13:25:08 +02:00
9qeklajc 057a752b1e fix cost breakdown calculation 2026-07-12 13:07:05 +02:00