Commit graph

2515 commits

Author SHA1 Message Date
Slyghtning
9e97992e18
assets: validate accepted RFQ asset rates
Validate the bid rate before returning an accepted asset sell quote.
This prevents malformed rates from reaching downstream quote arithmetic,
where nil or non-positive values can panic. Cover valid and malformed
responses with table-driven tests.
2026-08-03 10:05:05 +02:00
Slyghtning
cfbade1239
assets: reject malformed RFQ asset rates
Validate the rate pointer and decimal coefficient before converting
asset units. Return errors for nil, malformed, non-positive, and
oversized-scale rates instead of allowing nil dereferences or
division-by-zero panics. Add regression tests for each case.
2026-08-03 10:05:05 +02:00
Slyghtning
dc39d63d8d
assets: avoid locking cache during RPC
Restrict the asset-name cache mutex to map access so a slow
QueryAssetStats call cannot block cached readers. Use an RWMutex for
independent cache reads and add a concurrent regression test.
2026-08-03 10:05:05 +02:00
Slyghtning
c7d5e466cd
assets: validate RFQ timeout conversion
Convert the configured duration once during client creation. Round
positive fractional durations up to the whole seconds accepted by tapd.
Reject zero, negative, and overflowing values, and cover the conversion
boundaries with unit tests.
2026-08-03 10:05:05 +02:00
Slyghtning
514c3f06ad
loopd: close tapd client connections
Close the TapdClient when daemon initialization fails, during normal
shutdown, and after the view command completes. This prevents gRPC
transport resources from leaking across embedded daemon lifecycles and
error paths.
2026-08-03 10:05:04 +02:00
Slyghtning
8f831e85ae
Merge pull request #1188 from lightninglabs/gateway-v0.6.0
Some checks failed
CI / Commit Message (push) Has been cancelled
CI / RPC compilation check (push) Has been cancelled
CI / SQL compilation check (push) Has been cancelled
CI / go mod check (push) Has been cancelled
CI / build and lint code (push) Has been cancelled
CI / verify that auto-generated documentation is up-to-date (push) Has been cancelled
CI / run unit-test sqlite3 race (push) Has been cancelled
CI / run unit-test postgres race (push) Has been cancelled
CI / run LiT itests (push) Has been cancelled
CI / run LiT unit tests (push) Has been cancelled
github: pin gateway v0.6.0 (Opus 5, /gateway check)
2026-07-28 09:07:41 +02:00
saubyk
2dda482660
github: pin gateway v0.6.0 (Opus 5, /gateway check)
Bumps both pins together: the gateway-action SHA and the runtime_ref it
resolves. runtime_ref is pinned explicitly rather than left to the
action's default, so bumping only the action would leave the job on the
v0.5.0 runtime.

v0.6.0 adds no trigger and no input, so the rest of the shim is
unchanged.

Also corrects a copy-paste artifact in the adjacent comment, which said
runtime upgrades go through an lnd PR.
2026-07-27 20:46:33 -07:00
Slyghtning
dede47e727
Merge pull request #1187 from hieblmi/review-gateway
github: add gateway code-review workflow
2026-07-27 21:53:55 +02:00
Slyghtning
f51148a3a0
github: add gateway code-review workflow 2026-07-27 13:25:29 +02:00
Slyghtning
4acabf72ee
Merge pull request #1181 from hieblmi/release-notes
docs: backdated and new release notes
2026-07-27 12:55:37 +02:00
Slyghtning
6b942941fb
docs: complete historical release notes
Document every published Loop release and preserve authoritative notes.

Add the next-release workflow and rebuild chronological navigation.

Rename the reproducible-build guide for clarity.
2026-07-27 11:54:05 +02:00
Slyghtning
edad26b876
Merge pull request #1165 from GustavoStingelin/feat/monitor-static-address
Some checks failed
CI / Commit Message (push) Has been cancelled
CI / RPC compilation check (push) Has been cancelled
CI / SQL compilation check (push) Has been cancelled
CI / go mod check (push) Has been cancelled
CI / build and lint code (push) Has been cancelled
CI / verify that auto-generated documentation is up-to-date (push) Has been cancelled
CI / run unit-test sqlite3 race (push) Has been cancelled
CI / run unit-test postgres race (push) Has been cancelled
CI / run LiT itests (push) Has been cancelled
CI / run LiT unit tests (push) Has been cancelled
multi: add static address loop in monitor
2026-07-24 15:19:11 +02:00
Slyghtning
4732ec71e9
Merge pull request #1185 from lightninglabs/dependabot/go_modules/swapserverrpc/google.golang.org/grpc-1.82.1
build(deps): bump google.golang.org/grpc from 1.79.3 to 1.82.1 in /swapserverrpc
2026-07-24 10:57:12 +02:00
Slyghtning
4ca7a9c5ec
Merge pull request #1180 from hieblmi/multi-address-proto
Some checks are pending
CI / Commit Message (push) Waiting to run
CI / RPC compilation check (push) Waiting to run
CI / SQL compilation check (push) Waiting to run
CI / go mod check (push) Waiting to run
CI / build and lint code (push) Waiting to run
CI / verify that auto-generated documentation is up-to-date (push) Waiting to run
CI / run unit-test sqlite3 race (push) Waiting to run
CI / run unit-test postgres race (push) Waiting to run
CI / run LiT itests (push) Waiting to run
CI / run LiT unit tests (push) Waiting to run
swapserverrpc: add multi-address proofs
2026-07-23 21:14:50 +02:00
Slyghtning
cb97b2a37f
swapserverrpc: add multi-address proofs
Carry each deposit client derivation key and an optional generated
change descriptor in static-address loop-in and withdrawal requests. The
server can use these fields to validate scripts it does not store
directly.
2026-07-23 20:59:45 +02:00
Boris Nagaev
4161f5d128
multi: bump google.golang.org/grpc to v1.82.1 2026-07-23 13:13:57 -05:00
Alex Bosworth
d80733a710
Merge pull request #1184 from lightninglabs/alexbosworth-patch-19
version: bump version to v0.34.0-beta
2026-07-23 10:10:51 -07:00
Slyghtning
dbf1205b57
Merge pull request #1183 from hieblmi/gate-commit-messages
Some checks are pending
CI / Commit Message (push) Waiting to run
CI / RPC compilation check (push) Waiting to run
CI / SQL compilation check (push) Waiting to run
CI / go mod check (push) Waiting to run
CI / build and lint code (push) Waiting to run
CI / verify that auto-generated documentation is up-to-date (push) Waiting to run
CI / run unit-test sqlite3 race (push) Waiting to run
CI / run unit-test postgres race (push) Waiting to run
CI / run LiT itests (push) Waiting to run
CI / run LiT unit tests (push) Waiting to run
build: add commit message tooling
2026-07-22 21:16:13 +02:00
Alex Bosworth
a463c734ea
version: bump version to v0.34.0-beta 2026-07-22 08:53:15 -07:00
Slyghtning
eb63b0b4fe
build: add commit message tooling
Add a repository-local tool to lint, format, and safely reword commit
messages. Preserve markdown lists, quotes, code blocks, and trailers
while enforcing subject and body width limits.

Expose linting, formatting, and rewording through Make targets and
document the supported workflows. Run the linter in CI for pull request
and push commit ranges so malformed messages are caught before merging.
2026-07-22 14:27:25 +02:00
Slyghtning
41bc5f85df
Merge pull request #1182 from hieblmi/release-notes-34-beta
docs: add `v0.34.0-beta` release notes
2026-07-22 10:09:20 +02:00
Slyghtning
2cc2b9cbb6
docs: add v0.34.0-beta release notes 2026-07-22 09:47:03 +02:00
Gustavo Stingelin
d5fb8b8da8
cmd/loop: clarify traditional swap command scope 2026-07-21 11:33:48 -03:00
Gustavo Stingelin
4a2bcb3374
cmd/loop: display static loop-in monitor stages 2026-07-21 11:33:48 -03:00
Gustavo Stingelin
e3e6205a4b
staticaddr/loopin: publish status updates after persistence 2026-07-21 11:33:47 -03:00
Gustavo Stingelin
f5cc85f7f3
loopd: include static loop-ins in monitor snapshots 2026-07-21 11:33:47 -03:00
Gustavo Stingelin
7200a7ce09
loopd: synchronize cached swap lookups 2026-07-21 11:33:47 -03:00
Gustavo Stingelin
34cf98e8e8
loopd: map static address loop-ins to swap status 2026-07-21 11:33:47 -03:00
Gustavo Stingelin
df7dfba12a
staticaddr/loopin: preserve loop-in last update time 2026-07-21 11:33:46 -03:00
Gustavo Stingelin
4c03e46928
looprpc: expose static loop-in monitor state 2026-07-21 11:33:46 -03:00
Slyghtning
4bb7d5ee29
Merge pull request #1179 from GustavoStingelin/feat/static-address-fsm-diagrams
Some checks are pending
CI / RPC compilation check (push) Waiting to run
CI / SQL compilation check (push) Waiting to run
CI / go mod check (push) Waiting to run
CI / build and lint code (push) Waiting to run
CI / verify that auto-generated documentation is up-to-date (push) Waiting to run
CI / run unit-test sqlite3 race (push) Waiting to run
CI / run unit-test postgres race (push) Waiting to run
CI / run LiT itests (push) Waiting to run
CI / run LiT unit tests (push) Waiting to run
fsm: generate and verify static address diagrams
2026-07-21 14:59:35 +02:00
Boris Nagaev
9bccb649f4
Merge pull request #1175 from starius/bump-for-dependabot
build: fix dependency security alerts
2026-07-21 02:40:48 -05:00
Boris Nagaev
359997ca7b
Merge pull request #1177 from chandachewe10/master
Some checks are pending
CI / RPC compilation check (push) Waiting to run
CI / SQL compilation check (push) Waiting to run
CI / go mod check (push) Waiting to run
CI / build and lint code (push) Waiting to run
CI / verify that auto-generated documentation is up-to-date (push) Waiting to run
CI / run unit-test sqlite3 race (push) Waiting to run
CI / run unit-test postgres race (push) Waiting to run
CI / run LiT itests (push) Waiting to run
CI / run LiT unit tests (push) Waiting to run
fix dead error variable and silent invoice cancel in setStateAbandoned
2026-07-21 01:12:14 -05:00
Gustavo Stingelin
2e80b92cf9 build: rename reservation FSM diagram 2026-07-20 12:08:22 -03:00
Gustavo Stingelin
9f2d724c3e build: verify generated FSM diagrams 2026-07-20 12:08:02 -03:00
Gustavo Stingelin
0176e96e3c staticaddr: generate FSM diagrams 2026-07-20 12:07:26 -03:00
Gustavo Stingelin
e77a1ab634 fsm: harden diagram generation 2026-07-20 12:07:26 -03:00
Gustavo Stingelin
1d5b1c564a fsm: make diagram generation deterministic 2026-07-18 16:27:11 -03:00
Boris Nagaev
378825414b
assets: make tapd macaroon path network-aware
Build the default tapd admin macaroon path from the configured Bitcoin
network while preserving explicit path overrides. Add regression tests for
tapd credential loading and network-specific path selection.
2026-07-18 00:43:17 -05:00
Boris Nagaev
8716a51722
loopin: classify already-settled invoice RPC errors
lnd returns ErrInvoiceAlreadySettled from its RPC handler as an
uncoded gRPC error. On the client it is reconstructed as an Unknown
status, so comparing it directly with the Go sentinel never matches.

This made the abandon path log a warning for an expected condition.
The older timeout path had the same comparison and could return the
RPC error instead of finishing normal timeout processing.

Add a shared classifier that accepts the local sentinel and the exact
gRPC status representation, and use it in both cancellation paths.
Add coverage for the classifier and timeout handling.
2026-07-17 15:47:21 -05:00
Chanda Chewe
89f2dcff8b
loopin: fix dead error variable and silent invoice cancel in setStateAbandoned
The err variable is always nil when the final fmt.Errorf is reached
(a non-nil err exits earlier), producing a trailing ', <nil>' in the
error string visible to callers and in logs.

Additionally, CancelInvoice errors were silently swallowed with a
bare '_' assignment. The timeout path in the same file correctly
checks for ErrInvoiceAlreadySettled; this commit makes the abandon
path consistent: ignore already-settled invoices and log any other
unexpected error so operators can diagnose issues without failing
the abandon itself.

Co-authored-by: Chanda Chewe <chandachewe10@users.noreply.github.com>
2026-07-17 11:57:28 +00:00
Boris Nagaev
74cbb651bc
cmd/loop: normalize static channel memo help 2026-07-16 13:08:01 -05:00
Boris Nagaev
338a6ef9f1
build: fix dependency security alerts 2026-07-16 13:08:01 -05:00
Slyghtning
39c97e60d2
Merge pull request #1141 from lightninglabs/dyn-conf-tracker-staging
Some checks failed
CI / RPC compilation check (push) Has been cancelled
CI / SQL compilation check (push) Has been cancelled
CI / go mod check (push) Has been cancelled
CI / build and lint code (push) Has been cancelled
CI / verify that auto-generated documentation is up-to-date (push) Has been cancelled
CI / run unit-test sqlite3 race (push) Has been cancelled
CI / run unit-test postgres race (push) Has been cancelled
CI / run LiT itests (push) Has been cancelled
CI / run LiT unit tests (push) Has been cancelled
staticaddr: dyn-conf-tracker
2026-07-16 15:25:58 +02:00
Slyghtning
43b16ff3e1
cmd/loop: warn for low-confirmation static deposits
Warn before dispatching a static loop-in that selects deposits below
the conservative six-confirmation threshold. Mirror automatic coin
selection before prompting so the warning reflects both manual and
auto-selected deposits.

Cover manual and auto-selected warning paths in CLI tests.
2026-07-15 16:52:39 +02:00
Slyghtning
c718e9a9fb
staticaddr/loopin: retry failed deposit state transitions
Keep the loop-in monitor in its recoverable state when a required deposit transition or unlock fails. Only advance after every selected deposit reaches the expected state, and retry only deposits that remain pending after a partial transition.

Preserve shutdown semantics when observer cancellation races with a completed deposit update, and add regression coverage for transition, partial-transition, and unlock failures.
2026-07-15 16:52:39 +02:00
Slyghtning
6927c67b96
staticaddr/loopin: use risk decision watcher 2026-07-12 09:14:34 +02:00
Slyghtning
332aab79ed
staticaddr/loopin: add risk decision watcher 2026-07-12 09:14:34 +02:00
Slyghtning
6593afc8bc
staticaddr/loopin: recover risk-decision deadlines
Record replayed server risk decisions through the loop-in store,
recover accepted payment-deadline timers using the persisted decision
time, and handle persisted rejections on restart. This lets recovered
static loop-ins keep pending confirmation-risk state instead of
restarting payment timing from scratch.
2026-07-12 09:14:34 +02:00
Slyghtning
f01a1f02d9
staticaddr/loopin: clean up deposits after unpaid htlc timeout
Track whether the invoice was canceled for non-payment while monitoring
the HTLC. If the HTLC never confirms before timeout, unlock the
deposits; if it did confirm, transition them to the HTLC-timeout sweep
state without issuing duplicate transitions.
2026-07-12 09:14:34 +02:00