Commit graph

2298 commits

Author SHA1 Message Date
Alex Bosworth
21acb23486
Merge pull request #1116 from lightninglabs/alexbosworth-patch-14
version: bump version to v0.33.0-beta
2026-04-08 08:26:18 -07:00
Alex Bosworth
7943875d3f
version: bump version to v0.33.0-beta
bump version to v0.33.0-beta
2026-04-07 09:58:12 -07:00
Boris Nagaev
0aab352991
Merge pull request #1114 from starius/max-fee-rate
cmd/loop: add max swap fee flags for static in
2026-04-07 10:57:42 -05:00
Boris Nagaev
ad7b92e839
docs: regenerate loop CLI reference 2026-04-06 23:06:55 -05:00
Boris Nagaev
659d812634
cmd/loop: add max swap fee flags for static in
Add --max_swap_fee_sat and --max_swap_fee_ppm flags to `loop static in`.
When set, the resolved cap is checked against the current quote before
confirmation and sent in MaxSwapFeeSatoshis instead of the quoted fee,
giving scripts a budget ceiling without the quote-then-retry workaround.
2026-04-06 23:06:55 -05:00
Boris Nagaev
6d18faafa9
cmd/loop: add static loop-in fee cap helper
Add resolveMaxSwapFee helper that computes an effective maximum swap fee
from --max_swap_fee_sat and --max_swap_fee_ppm CLI flags. When both are
set the tighter (lower) cap wins. The helper also rejects early if the
server-quoted fee already exceeds the resolved cap.
2026-04-06 23:06:55 -05:00
Boris Nagaev
30472d0f28
Merge pull request #1103 from starius/reapply-bumps
Reapply bumps
2026-03-25 01:37:03 -05:00
Boris Nagaev
5a482249f8
Reapply "build: bump google.golang.org/grpc to v1.79.3"
This reverts commit 98ca6a0986.
2026-03-20 17:06:14 -05:00
Boris Nagaev
358e5ceac9
Reapply "looprpc: bump github.com/docker/cli to 29.2.0"
This reverts commit 240a748049.
2026-03-20 17:06:09 -05:00
Boris Nagaev
dcd8084603
Reapply "build: bump github.com/docker/cli"
This reverts commit 6bb39c7441.
2026-03-20 17:06:02 -05:00
Boris Nagaev
d141818ae5
Merge pull request #1102 from starius/revert-grpc
Revert grpc-go update
2026-03-19 10:24:42 -05:00
Boris Nagaev
6bb39c7441
Revert "build: bump github.com/docker/cli"
This reverts commit 5c86ad6ed2.
2026-03-19 10:00:34 -05:00
Boris Nagaev
240a748049
Revert "looprpc: bump github.com/docker/cli to 29.2.0"
This reverts commit 9d9b7b99ae.
2026-03-19 10:00:30 -05:00
Boris Nagaev
98ca6a0986
Revert "build: bump google.golang.org/grpc to v1.79.3"
This reverts commit 629bf3721b.
2026-03-19 10:00:22 -05:00
Boris Nagaev
428b0bac77
Merge pull request #1086 from lightninglabs/dependabot/go_modules/github.com/docker/cli-29.2.0incompatible
build: bump github.com/docker/cli from 28.1.1+incompatible to 29.2.0+incompatible
2026-03-19 09:20:03 -05:00
Boris Nagaev
629bf3721b
build: bump google.golang.org/grpc to v1.79.3 2026-03-19 01:20:06 -05:00
Boris Nagaev
9d9b7b99ae
looprpc: bump github.com/docker/cli to 29.2.0
Folloup for 37c14c98107ec85aa0577acada3ac2c533afb0b1
2026-03-18 18:11:55 -05:00
dependabot[bot]
5c86ad6ed2
build: bump github.com/docker/cli
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 28.1.1+incompatible to 29.2.0+incompatible.
- [Commits](https://github.com/docker/cli/compare/v28.1.1...v29.2.0)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-version: 29.2.0+incompatible
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-18 18:11:55 -05:00
Boris Nagaev
5b3fb0a084
Merge pull request #1099 from starius/fix-lit-test
ci: use current LiT itest target
2026-03-18 11:25:14 -05:00
Boris Nagaev
e93220534a
ci: use current LiT itest target
CI failed: https://github.com/lightninglabs/loop/actions/runs/23082982774/job/67447021668?pr=1090

The workflow called `make itest-no-backward-compat`, but
lightning-terminal removed that target in
4cedb44ee0
("itest: remove custom channels tests and backward compat infrastructure").
2026-03-17 16:42:06 -05:00
Slyghtning
91d1a3ecaa
Merge pull request #1096 from hieblmi/revert-dyn-conf
staticaddr: revert dynamic conf
2026-03-13 11:37:24 +01:00
Slyghtning
c8b59beed6
Revert "swapserverrpc: add proto messages for confirmation error details"
This reverts commit 69a0798fdb.
2026-03-13 11:18:42 +01:00
Slyghtning
650640c854
Revert "staticaddr: support dynamic deposit confirmation requirements"
This reverts commit 66a17f47e6.
2026-03-13 11:18:42 +01:00
Slyghtning
798d86a433
Merge pull request #1091 from hieblmi/fix-clock
Inject clocks into swap lifecycle and update swap tests
2026-03-13 11:15:21 +01:00
Slyghtning
864029135a
Merge pull request #1095 from hieblmi/claude-review-approve
.github: add low-risk label trigger for Claude review with approval
2026-03-13 09:59:28 +01:00
Slyghtning
06d978cbc8
.github: add low-risk label trigger for Claude review with approval
- Add pull_request_target trigger for fork secret access
- Use pull_request_target in claude-approve if-condition
- Replace CLAUDE.md references with AGENTS.md
- Replace simple approve/comment prompt with comprehensive
  risk-classification prompt (intrinsic PR risk + finding severity)
- Use --request-changes instead of comment when not approving
2026-03-13 09:01:12 +01:00
Slyghtning
b702aebbf4
multi: inject clocks into swap lifecycle and update tests
Inject clock.Clock into swapConfig so that swap initiation times
are deterministic and testable. Update all swap tests to use
TestClock with a fixed time, and assert that InitiationTime
matches the clock value.
2026-03-13 08:58:56 +01:00
Slyghtning
ff800df41d
.github: restrict @claude trigger to org members and collaborators (#1094) 2026-03-12 10:04:19 +01:00
Slyghtning
de05ee8573
.github: add @claude mention trigger to review workflow (#1093) 2026-03-12 10:00:05 +01:00
Slyghtning
541974f715
Merge pull request #1085 from starius/pgx-err-no-rows
staticaddr: remove redundant pgx.ErrNoRows checks
2026-03-12 09:26:45 +01:00
Slyghtning
66a17f47e6
staticaddr: support dynamic deposit confirmation requirements
Reduce MinConfs from 6 to 3 to allow faster swap attempts while the
server enforces risk-based confirmation requirements. Update
SelectDeposits to prioritize more-confirmed deposits first, increasing
the likelihood of server acceptance. Add client-side logging of
insufficient confirmation details from server error responses.
2026-03-11 20:58:35 +01:00
Slyghtning
69a0798fdb
swapserverrpc: add proto messages for confirmation error details
Add DepositConfirmationStatus and InsufficientConfirmationsDetails
messages to support structured error responses when deposits lack
sufficient confirmations for dynamic risk requirements.
2026-03-11 20:58:34 +01:00
Slyghtning
8a1f34acb8
Merge pull request #1078 from hieblmi/static-fixes
staticaddr: various fixes
2026-03-11 19:42:13 +01:00
András Bánki-Horváth
d2bc4f9550
Merge pull request #1092 from hieblmi/claude-on
.github: enable claude review bot
2026-03-11 16:50:11 +01:00
Slyghtning
22bd27b72e
.github: enable claude review bot 2026-03-11 16:31:47 +01:00
Slyghtning
5d96b70950
looprpc: align migrate replace 2026-03-09 14:39:46 +01:00
Slyghtning
3aa3d0e646
go: replace broken uint128 module host 2026-03-09 14:39:46 +01:00
Slyghtning
fdf2b91069
loopout_test: fix goroutine leak in TestCustomSweepConfTarget
Send the batch confirmation after AssertRegisterConf so the batch
exits cleanly, and use a cancellable context so the batcher stops
before leaktest runs.
2026-03-09 14:39:46 +01:00
Slyghtning
0d7daa0945
tools: bump charmbracelet/x/ansi to v0.11.6
Also bump cellbuf, colorprofile, and term to versions compatible
with the new ansi API.
2026-03-09 14:39:45 +01:00
Slyghtning
a10c741a26
lint: fix linter issues 2026-03-09 14:39:45 +01:00
Slyghtning
bb9124a80a
tools: update golangci-lint 2026-03-09 14:39:45 +01:00
Boris Nagaev
a5c598dc34
loopin: cancel probe invoice with a live context
The probe monitor goroutine cancelled the probe invoice with the same
monitoring context used by awaitProbe. The caller cancels that context as soon
as swap initiation returns.

If cancellation races with or precedes the invoice-cancel RPC, the cleanup can
be skipped and the probe invoice may remain open longer than intended.

Fix by calling CancelInvoice with context.WithoutCancel(ctx) so cleanup is not
aborted by caller cancellation.

Add a regression test that cancels the parent context between probe success
and invoice cleanup, and verifies CancelInvoice still receives a live context.
2026-03-09 14:39:45 +01:00
Boris Nagaev
f191775773
routing_plugin: release with a live context
`ReleaseRoutingPlugin` called `Done` with the caller context. In the
loop-out payment flow this cleanup is deferred, so the context may already be
canceled by the time teardown runs.

That can prevent mission-control restoration in `Done`, leaving
plugin-induced routing state behind after a swap exits.

Fix this by detaching cancellation in `ReleaseRoutingPlugin` and passing
`context.WithoutCancel(ctx)` to `Done`, so teardown still executes during
caller cancellation.

Also add a regression test that cancels the caller context before release and
asserts the plugin `Done` call still receives a live context.
2026-03-09 14:39:45 +01:00
Slyghtning
3e526faf82
openchannel: cancel shims with a live context
In manager.go, deferred shim cleanup was calling
FundingStateStep with the original request ctx.
If the user had already canceled that context,
the cleanup RPC would run with a canceled context
and could fail to remove the pending shim. I changed
that cleanup path to use context.WithoutCancel(ctx)
so the cancellation RPC still has a live context.
2026-03-09 14:39:45 +01:00
Slyghtning
0b295123e7
staticaddr: remove dead code across managers
Remove unused errChan fields from the loopin, openchannel, and withdraw
managers. These channels were declared and initialized but never read
from or written to.

Remove the unused activeLoopIns map from the loopin manager. The map
was only written to but never read, making it dead code.

Remove the stale withdraw.Store interface whose method signatures no
longer match the concrete SqlStore API used by the manager.

Remove unused config fields from openchannel.Config (Server,
AddressManager, ChainNotifier, Signer) and deposit.ManagerConfig
(AddressClient, SwapClient, ChainParams) along with their daemon
wiring. Also remove the now-orphaned openchannel.AddressManager
interface.

Remove the unused GetStaticAddress and Close methods from
address.SqlStore and the GetStaticAddress method from the address.Store
interface, as the codebase only uses GetAllStaticAddresses.
2026-03-09 14:39:44 +01:00
Slyghtning
f80aee4dae
staticaddr: avoid startup SendEvent data races 2026-03-09 14:39:44 +01:00
Slyghtning
a9977dd5f4
godoc: address copy-paste errors accross the codebase 2026-03-09 14:39:44 +01:00
Slyghtning
c1036ff705
withdraw: handle confirmation registration failures 2026-03-09 14:39:44 +01:00
Slyghtning
d39e247a74
withdraw: use %v instead of %w in log.Errorf
The %w formatting verb is only meaningful for fmt.Errorf where it
enables error wrapping. In log.Errorf it prints as %%!w(error=...),
producing garbled log output. Use %v and add the missing colon
separator.
2026-03-09 08:37:50 +01:00
Slyghtning
33891ae6ae
withdraw: check error from RegisterSpendNtfn before using channels
handleWithdrawal did not check the error returned by
RegisterSpendNtfn before spawning a goroutine to read from the
notification channels. If registration failed, spentChan would be nil
and the goroutine would block forever on a nil channel read.

Add the missing error check so the function returns early on
registration failure.
2026-03-09 08:37:50 +01:00