Commit graph

2192 commits

Author SHA1 Message Date
Slyghtning
175b7d601b
loooprpc: replace deprecated grpc.Dial with grpc.NewClient
- Update assets/client.go to use grpc.NewClient
- Update swap_server_client.go to use grpc.NewClient
- Replace grpc.WithInsecure() with insecure.NewCredentials()
2025-12-19 10:03:14 +01:00
Slyghtning
a3db145ced
loop: delete unused file uncharge_state.go 2025-12-18 08:55:27 +01:00
Slyghtning
34415750fb
Merge pull request #1059 from hieblmi/reregister
staticaddr: re-register on htlc tx conf error
2025-12-18 08:54:20 +01:00
Boris Nagaev
258d33cce5
staticaddr: clear stale HTLC confs on re-register
- reset htlcConfirmed when the HTLC conf subscription errors and we re-register
- add regression test ensuring re-registers after a conf error require a fresh
  confirmation instead of sweeping on a stale one
2025-12-17 10:11:30 +01:00
Boris Nagaev
f6ac0b5ebe
staticaddr: surface invoice subscription errors
- propagate invoice subscription errors in MonitorInvoiceAndHtlcTx via
  HandleError instead of silently logging
- add regression tests covering HTLC conf re-registration and invoice
  subscription error propagation
2025-12-17 10:10:31 +01:00
Boris Nagaev
f274c689b1
staticaddr: add unit test for HTLC re-registration 2025-12-17 09:21:51 +01:00
Slyghtning
1dd145bc32
staticaddr: re-register on htlc tx conf error 2025-12-17 09:21:51 +01:00
Slyghtning
2ed9e5bde6
Merge pull request #1061 from ViktorT-11/2025-12-replace-litd-swapserverrpc-dep
workflow: replace `swapserverrpc` in `lit-setup`
2025-12-17 08:42:29 +01:00
Viktor Torstensson
a0850f7e35
workflow: replace swapserverrpc in lit-setup
In order for the LiT CI jobs to use the `swapserverrpc` protos that
exist on the latest `master` version of the `loop` repo, we need to
update the `lit-setup` action to replace the litd `swapserverrpc`
dependency with the latest version that exists in the `loop` repo.
2025-12-16 16:47:57 +01:00
Slyghtning
c3f3199625
Merge pull request #1043 from hieblmi/withdraw-psbt
staticaddr: psbt withdrawals
2025-12-09 13:30:15 +01:00
Slyghtning
780584993b
staticaddr: unit test CalculateWithdrawalTxValues 2025-12-09 12:21:51 +01:00
Slyghtning
880694c8df
staticaddr: harden and test signMusig2Tx 2025-12-09 12:21:51 +01:00
Slyghtning
078399da80
staticaddr: replace ServerWithdrawDeposits rpc /w ServerPsbtWithdrawDeposits 2025-12-09 12:21:51 +01:00
Slyghtning
a918842374
staticutil: refactor methods into utils 2025-12-09 12:21:51 +01:00
Slyghtning
e77dc53760
swapserverrpc: deprecate ServerWithdrawDeposits 2025-12-09 12:21:50 +01:00
Slyghtning
29ea8234df
swapserverrpc: psbt-base ServerWithdraw endpoint 2025-12-09 12:21:50 +01:00
Boris Nagaev
e79b1d445d
Merge pull request #1044 from starius/sweepbatcher-db-tx
sweepbatcher: persist confirmed batches atomically
2025-12-04 15:05:34 -03:00
Boris Nagaev
6d58965930
sweepbatcher: persist confirmed batches atomically
Fixes a crash window where handleConf updated the batch row to confirmed but
failed before marking sweeps complete, so re-added sweeps spawned a duplicate
batch or kept retrying. Batch confirmation and sweep completion are now
persisted inside a single DB transaction ConfirmBatchWithSweeps, and handleConf
uses the helper to atomically store the batch and the set of confirmed sweeps.

Added TestSweepBatcherConfirmedBatchIncompleteSweeps that runs against the real
loopdb backend, injects a failure mid-transaction, and verifies the database
never ends up with confirmed=true batches paired with completed=false sweeps.
2025-12-04 00:37:01 -03:00
Alex Bosworth
f76c15ca16
Merge pull request #1051 from lightninglabs/alexbosworth-patch-11
version: bump version to v0.31.7-beta
2025-11-26 07:53:21 -08:00
Alex Bosworth
bde27d0059
version: bump version to v0.31.7-beta
bump version to 0.31.7
2025-11-26 07:44:51 -08:00
Slyghtning
2cdf084cd9
Merge pull request #1050 from ffranr/add-ci-lit-test
Add LiT CI job and runner cleanup action
2025-11-26 10:21:03 +01:00
ffranr
d56fb5b542
ci: split out postgres unit-test run for parallelism 2025-11-26 08:45:35 +00:00
ffranr
d00bfab643
ci: bump actions/checkout to v4 2025-11-26 08:45:35 +00:00
ffranr
3dd747460a
ci: add LiT tests workflow to GitHub Actions
Add a new workflow to run tests for the LiT repository. This includes
setting up dependencies, cloning the repository, and updating the
`go.mod` file to use local Loop modules.
2025-11-26 08:45:35 +00:00
Slyghtning
83628d775d
Merge pull request #1016 from hieblmi/easy-exclude-peers
easyautoloop: exclude peers
2025-11-24 13:12:55 +01:00
Slyghtning
70c95139e9
docs: update easy-exclude parameters 2025-11-21 15:44:51 +01:00
Slyghtning
afa52aa40d
liquidity: test --excludeeasypeer and --includealleasypeers 2025-11-21 15:38:13 +01:00
Slyghtning
7fc07ae99b
cmd: add --includealleasypeers 2025-11-21 15:38:12 +01:00
Slyghtning
bb8ee54817
cmd: exclude peers for easy autoloop 2025-11-21 15:34:49 +01:00
Slyghtning
854cac246e
liquidity: exclude peers for easy autoloop 2025-11-21 15:05:52 +01:00
Slyghtning
ea21d8d8f2
looprpc: exclude peers for easy autoloop 2025-11-21 15:05:51 +01:00
Boris Nagaev
62419ab17d
Merge pull request #1048 from starius/loop-stop
cli: add command "loop stop"
2025-11-20 23:33:35 -03:00
Slyghtning
bb41f0b353
Merge pull request #1049 from lightninglabs/dependabot/go_modules/looprpc/golang.org/x/crypto-0.45.0
build(deps): bump golang.org/x/crypto from 0.36.0 to 0.45.0 in /looprpc
2025-11-20 15:25:33 +01:00
Slyghtning
20c522da31
gomod: go mod tidy 2025-11-20 14:42:52 +01:00
Boris Nagaev
a4dc59099b
cli: add command "loop stop"
* add StopDaemon RPC with permissions + REST binding
* expose `loop stop` CLI (with optional --wait) and wait logic
* pass daemon shutdown callback + unit test and regenerate docs/protos
2025-11-19 23:42:48 -03:00
dependabot[bot]
c2bb0524ae
build(deps): bump golang.org/x/crypto from 0.36.0 to 0.45.0 in /looprpc
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.36.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.36.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-20 02:03:23 +00:00
Boris Nagaev
c4d6c29fc0
Merge pull request #1045 from ffranr/wip/bump-deps-lnd0.20.0
go.mod: bump lnd@v0.20.0-beta and taproot-assets
2025-11-19 00:05:35 -03:00
ffranr
24043df499
go.mod: bump lnd@v0.20.0-beta, taproot-assets@v0.7.0, taprpc@v1.0.11 2025-11-18 15:34:37 +00:00
Boris Nagaev
88658ecb59
Merge pull request #1047 from starius/go-1249
multi: downgrade Go to 1.24.9
2025-11-17 16:09:08 -03:00
Boris Nagaev
d677e9d7e6
multi: downgrade Go to 1.24.9
This is needed, because LND and LiT use 1.24.9.
2025-11-17 14:11:26 -03:00
Boris Nagaev
d9a633bc2c
Merge pull request #1046 from starius/wait-for-height
loopd: fix premature block height receipt from LND
2025-11-16 15:15:15 -03:00
Boris Nagaev
6d480cfd9e
staticaddr: require positive heights at startup
Loop now guards all static-address managers against zero block heights: each
constructor returns an error when invoked with a non-positive current height,
and `loopd` validates the height from `GetInfo` before instantiating them.
Tests and helper code were updated accordingly so we fail fast instead of
registering chain notifications with invalid hints.
2025-11-16 01:24:01 -03:00
Boris Nagaev
bde49d7a91
loopd: wait for chain notifier
Use https://github.com/lightninglabs/lndclient/pull/255
2025-11-16 00:26:02 -03:00
Boris Nagaev
deced54665
staticaddr/withdraw: make error log unique
Make it easier to distinguish this error from a similar error few lines above.
2025-11-16 00:26:02 -03:00
Boris Nagaev
0bf2c99843
go.mod: bump lndclient to v0.20.0-6
Include https://github.com/lightninglabs/lndclient/pull/255
2025-11-16 00:26:02 -03:00
Boris Nagaev
508d90f384
multi: update Go to 1.24.10 2025-11-16 00:26:02 -03:00
Boris Nagaev
de969fdf25
Merge pull request #1042 from starius/sweepbatcher-fix-race-addsweeps
sweepbatcher: handle batch shutdown during re-add
2025-11-13 01:08:45 -03:00
Slyghtning
eb8c3dddc7
Merge pull request #1038 from hieblmi/remove-htlc
loopout: don't print htlc address
2025-11-12 09:31:38 +01:00
Boris Nagaev
f8272dd2bf
Merge pull request #1041 from starius/bump-lndclient
go.mod: update lndclient to v0.20.0-4
2025-11-12 03:47:28 -03:00
Boris Nagaev
37eb3462e5
sweepbatcher: handle batch shutdown during re-add
Started from CI failure of TestSweepBatcherHandleSweepRace/loopdb [1] that
surfaced ErrBatcherShuttingDown when the AddSweep loop caught a batch right as
it finished. Reproduced via:

go test ./sweepbatcher -run TestSweepBatcherHandleSweepRace/loopdb -cpu=12,4,8 -count=1

Discovered that handleSweeps treated ErrBatchShuttingDown from batch.addSweeps
as fatal, so the batcher exited even though the sweep was already confirmed.
Fixed by treating that error as "batch already done" so we fall through to the
persisted status/monitorSpend path, and added a regression test that
deterministically simulates the shutdown window.

New regression test added:
go test ./sweepbatcher -run TestSweepBatcherHandleBatchShutdown

[1] https://github.com/lightninglabs/loop/actions/runs/19282552307/job/55136597881?pr=1041
2025-11-12 01:45:18 -03:00