* feat: implement exponential backoff for paid_invoices_stream across all Lightning backends
- Add exponential backoff retry logic to CLN REST, LND REST, and LND gRPC backends
- Start with 1 second delay, exponentially increase up to 5 minutes maximum
- Reset delay to 1 second on successful reconnection
- Improve error logging to include retry delay information
- Replace fixed delays with adaptive backoff to handle network issues gracefully
- Prevents system overload during persistent connection problems
Resolves issues with rapid reconnection attempts that could overwhelm Lightning nodes during network instability.
* remove unused import
* feat: extend exponential backoff to all remaining backends and invoice listener
- Implement exponential backoff in LNbits paid_invoices_stream for both SSE and WebSocket modes
- Add exponential backoff guidance comments to Blink and Strike backends (not implemented)
- Apply exponential backoff to invoice_listener in tasks.py that calls paid_invoices_stream
- Ensure consistent retry behavior across all Lightning backend integrations
- Improve system resilience during network interruptions and backend failures
All backends and the invoice listener now use the same exponential backoff strategy:
- Start with 1 second delay, exponentially increase up to 5 minutes maximum
- Reset delay to 1 second on successful reconnection
- Enhanced error logging with retry delay information
* blink + strike remove comments
* remove hardcoded values in favor of settings
* immediate first retry
* settings
* fix name settings
* management rpc
* hook up the RPC server
* working
* format
* update build script fix import error
* remove accidental commit of vscode extension data
* working ✔
* \n
* add get mint quote get melt quote
* gRPC cli update quotes commands
* update mint melt quotes from cli
* comment under get cli command group
* keyset rotation not yet implemented
* try fix
* change back contact info default to be empty list
* fix import
* add server mTLS
* ll
* script for generating certificates
* rename settings
* move generation script
* do not save TTL expiry into Cache object, rather always load from settings.
* update lightning fees
* update auth limits
* auth rate limit cli
* optional arguemnts
* better error messages
* tests for db update mint/melt quotes
* start mint rpc tests
* add tos_url field to get-info grpc response
* format checks
* add types to click groups where it's needed
* tests on updating quotes
* fix tests
* skip updating mint quote state if on regtest
* test edge case
* unified test_add_remove_contact
* mark pytest-asyncio
* fix missing db argument
* hopefully no more silly errors
* fix test_db_update_mint_quote_state
* pass in the quote id string.
* add keyset rotation
* test for keyset rotation through gRPC command
* fix logger warning
* remove rotation test because it breaks other tests
* use different bolt11 invoices
* assert returned melt quote has quote
* is_postgres
* try different things
* skip if deprecated api
* format checks
* update .gitignore
* default location for certificates
* wip store balance
* store balances in watchdog worker
* move mint_auth_database setting
* auth db
* balances returned as Amount (instead of int)
* add test for balance change on invoice receive
* fix 1 test
* cancel tasks on shutdown
* watchdog can now abort
* remove wallet api server
* fix lndgrpc
* fix lnbits balance
* disable watchdog
* balance lnbits msat
* test db watcher with its own database connection
* init superclass only once
* wip: log balance in keysets table
* check max balance using new keyset balance
* fix test
* fix another test
* store fees in keysets
* format
* cleanup
* shorter
* add keyset migration to auth server
* fix fakewallet
* fix db tests
* fix postgres problems during migration 26 (mint)
* fix cln
* ledger
* working with pending
* super fast watchdog, errors
* test new pipeline
* delete walletapi
* delete unneeded files
* revert workflows
* lets check if this gets stuck with postgres or not
* check if it works if I add sleeps
* replace startup_ledger with await ledger._check_pending_proofs_and_melt_quotes() in tests
* fix typo to trigger tests again
* manage state of proofs
* test set proofs unreserved
* melt recovers state on error
* fix wallet test
* fix tests
* fix another test
* get_mint_quote returns MintQuote
* fix tests
* refactor
* fix deprecated tests
* add new unset type
* move keysets methods into newly created `LedgerKeysets` + `maybe_update_derivation_path` on init
* keyset rotation
* fix error
* make format
* format
* test keyset rotation + fix bug
* format
* fix for multiple specified derivation paths
* specify return value
* #616: Removed blocking call from ledger startup. Instead added it to a background task that repeats every hour.
* make task interval configurable, remember task and cancel it on shutdown
* comments
* add sleep to tests because the background task is async
---------
Co-authored-by: Caleb Beery <cjbeery@gmail.com>
* mint migrations: fill in missing keyset ids in proofs and promises
* do not throw exception
* add error where proofs are missing an id but no keyset was found
* fix balance view initialization
* add amount, unit, request to melt and mint responses
* make new fields optional to not break compat with old mints
* make new flags optional for backwards compat
- Update `mint` method to use allowed amounts from the mint
- Add `get_allowed_amounts` method to fetch supported denominations
- Modify `test_mint_amounts_wrong_order` to expect new error message
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* Update README.md - Add Redis info?
Add some Redis info (maybe not all this is needed?)
* use redis docker compose
* clean up
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* auth server
* cleaning up
* auth ledger class
* class variables -> instance variables
* annotations
* add models and api route
* custom amount and api prefix
* add auth db
* blind auth token working
* jwt working
* clean up
* JWT works
* using openid connect server
* use oauth server with password flow
* new realm
* add keycloak docker
* hopefully not garbage
* auth works
* auth kinda working
* fix cli
* auth works for send and receive
* pass auth_db to Wallet
* auth in info
* refactor
* fix supported
* cache mint info
* fix settings and endpoints
* add description to .env.example
* track changes for openid connect client
* store mint in db
* store credentials
* clean up v1_api.py
* load mint info into auth wallet
* fix first login
* authenticate if refresh token fails
* clear auth also middleware
* use regex
* add cli command
* pw works
* persist keyset amounts
* add errors.py
* do not start auth server if disabled in config
* upadte poetry
* disvoery url
* fix test
* support device code flow
* adopt latest spec changes
* fix code flow
* mint max bat dynamic
* mypy ignore
* fix test
* do not serialize amount in authproof
* all auth flows working
* fix tests
* submodule
* refactor
* test
* dont sleep
* test
* add wallet auth tests
* test differently
* test only keycloak for now
* fix creds
* daemon
* fix test
* install everything
* install jinja
* delete wallet for every test
* auth: use global rate limiter
* test auth rate limit
* keycloak hostname
* move keycloak test data
* reactivate all tests
* add readme
* load proofs
* remove unused code
* remove unused code
* implement change suggestions by ok300
* add error codes
* test errors
* startup: do not rollback unknown melt quote states
* fix: provide overpaid fees on startup
* fix: check if outputs in db
* fix test: expect melt quote pending if payment state is unknown
* fix up comment