Commit graph

2556 commits

Author SHA1 Message Date
Slyghtning
a014f01c08
Merge 800d1837ee into 6d1dbcb599 2026-08-12 11:47:51 +02:00
Slyghtning
6d1dbcb599
Merge pull request #1194 from hieblmi/instantout-fixes
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
instantout: improve reservation and swap handling
2026-08-12 10:55:24 +02:00
Slyghtning
f826260266
docs: document instant out reliability improvements
Record the Instant Out and reservation validation, recovery,
fee-limit, lifecycle, and custom macaroon updates in the next release
notes.
2026-08-11 21:27:36 +02:00
Slyghtning
e772f8ccfa
instantout: enforce the accepted swap fee
Carry the accepted quote into each request, persist it, and reject
invoices above that limit. Preserve compatibility for requests that
omit the cap while distinguishing an explicit zero.
2026-08-11 21:27:35 +02:00
Slyghtning
b596eabab3
instantout: recheck reservation timing during recovery
Refresh the chain height when a swap resumes, verify both the
reservation and HTLC windows, and select the HTLC path when either
remaining window is too short.
2026-08-11 21:27:35 +02:00
Slyghtning
b689e361c1
instantout: close unfinished MuSig2 sessions
Clean up abandoned signing sessions on error paths while leaving
completed sessions to lnd.
2026-08-11 21:27:35 +02:00
Slyghtning
6853e69a05
instantout: verify finalized MuSig2 witnesses
Run script validation for every combined signature before accepting a
finalized transaction, surfacing invalid witnesses immediately.
2026-08-11 21:27:35 +02:00
Slyghtning
b3776e92f4
instantout: validate MuSig2 response dimensions
Check nonce, signature, session, and transaction input counts before
indexing signing vectors, returning clear errors for incomplete data.
2026-08-11 21:27:34 +02:00
Slyghtning
51eb8f410a
reservation: validate confirmed output amounts
Compare each confirmed transaction output with the expected reservation
amount before advancing the state machine.
2026-08-11 21:27:34 +02:00
Slyghtning
c75d7e3e81
reservation: bound and prune active state machines
Limit newly accepted reservation state machines, resume all persisted
reservations, remove terminal entries from memory, and make cleanup
resilient to observer-driven eviction.
2026-08-11 21:27:34 +02:00
Slyghtning
41b884f610
reservation: reject duplicate reservation entries
Check active and persisted reservations before creating a new state
machine, preserving the existing reservation when a duplicate arrives.
2026-08-11 21:21:53 +02:00
Slyghtning
2989ceee42
reservation: isolate asynchronous initialization errors
Use a goroutine-local result for event dispatch so observer errors
remain independent and initialization outcomes stay deterministic.
2026-08-11 21:21:53 +02:00
Slyghtning
806c1f9356
reservation: keep processing after notification errors
Log individual reservation initialization failures and continue
consuming later notifications instead of stopping the manager.
2026-08-11 21:21:53 +02:00
Slyghtning
7cab89d45b
looprpc: align instant out permissions with loop out
Apply the loop:out permission to Instant Out and reservation RPCs so
their authorization requirements match the rest of the Loop Out API.
2026-08-11 21:21:52 +02:00
Boris Nagaev
aa79fa5262
Merge pull request #1193 from starius/loop-out-validation-reserves
loopd: account for channel reserves in loop out validation
2026-08-11 10:07:26 -05:00
Boris Nagaev
95e184a40f
loopd: account for channel reserves in loop out validation
Use each channel's local balance minus its reserve when simulating Loop
Out payment bandwidth, clamping the result at zero. This prevents swaps
from starting when the gross balance covers the amount and routing fee
but the spendable balance does not.

Add one-sat boundary tests and a bug-fix release note. Leave a TODO for
server-fee and prepay capacity because enforcing their maximum fee caps
could reject viable swaps whose actual routing fees are lower.
2026-08-10 18:48:56 -05:00
Slyghtning
800d1837ee
backup: add encrypted L402 static address backups 2026-08-10 14:18:17 +02:00
Slyghtning
c9c80b212d
docs: add multi-address release notes 2026-08-10 14:18:06 +02:00
Slyghtning
84e98f35b3
docs: fix static deposit man page spacing 2026-08-10 14:18:06 +02:00
Slyghtning
ae453f0c17
staticaddr: fix multi-address test regressions 2026-08-10 14:18:06 +02:00
Slyghtning
4bc75d8ec6
staticaddr: expose addresses in deposit listings
Include the owning static address in every deposit RPC response and CLI
listing. Users can distinguish deposits created by different receive and
change addresses without reconstructing scripts externally.

Update generated RPC artifacts and command replay fixtures for the new
field.
2026-08-10 14:18:06 +02:00
Slyghtning
88039c2125
staticaddr: fund new addresses with sendcoins
Let loop static deposit create a fresh receive address and optionally
fund it through lnd SendCoins. Validate funding arguments before address
creation and expose the nested request through the client RPC.

Regenerate the RPC artifacts, CLI documentation, and replay fixtures for
the new command behavior.
2026-08-10 14:18:05 +02:00
Slyghtning
c51bced8df
staticaddr/withdraw: use generated change addresses
Create a fresh static address for partial-withdrawal change. Keep all
withdrawal outputs in the PSBT without separate signing metadata, while
preserving full-withdrawal behavior.
2026-08-10 14:18:05 +02:00
Slyghtning
b2f37bfa78
staticaddr/loopin: use generated change addresses
Create a fresh static change address for fractional loop-ins and persist
its key locator with the selected HTLC outpoint. Recovery reconstructs
the same change output instead of returning funds to the legacy root
address.
2026-08-10 14:18:05 +02:00
Slyghtning
d1b29e0bb5
staticaddr/deposit: restore owning address parameters
Join each selected deposit with its persisted static-address row during
loop-in recovery. Hydrate legacy rows as needed so restored swaps retain
the scripts and key locators required for signing.
2026-08-10 14:18:05 +02:00
Slyghtning
94a499237b
staticaddr/withdraw: send per-deposit address proofs
Include the derivation key for every withdrawal input in the server
request. This lets the server validate and sign withdrawals that combine
deposits from multiple derived addresses.
2026-08-10 14:18:05 +02:00
Slyghtning
e077cfe189
staticaddr/loopin: send per-deposit address proofs
Map every selected outpoint to the client key that derived its static
address and include those proofs in loop-in requests. Keep MuSig2
signing indexed by outpoint so request ordering cannot select the wrong
key.
2026-08-10 14:18:05 +02:00
Slyghtning
80593f97de
staticaddr: sign with per-deposit address keys
Construct cooperative MuSig2 sessions from the address parameters stored
on each deposit. Loop-ins and withdrawals can therefore combine inputs
owned by different derived static addresses.
2026-08-10 14:18:05 +02:00
Slyghtning
e2d387bbcf
staticaddr/deposit: sweep with owning address keys
Build timeout sweeps from each deposit own script, expiry, and key
locator. Derived-address deposits can now use their unilateral recovery
path without falling back to the legacy root parameters.
2026-08-10 14:18:04 +02:00
Slyghtning
f9e74cd183
staticaddr/deposit: discover all active addresses
Filter wallet UTXOs against every active static-address script and
attach the matching address parameters to new deposits. This makes
deposits to derived receive addresses visible to the deposit manager.
2026-08-10 14:18:04 +02:00
Slyghtning
8006349606
staticaddr/address: activate derived addresses
Create receive and change addresses from locally derived client keys
while reusing the server key and expiry from the legacy seed. Import,
persist, and activate each script before returning it to callers.
2026-08-10 14:18:04 +02:00
Slyghtning
991830336f
loopdb: persist deposit address ownership
Associate every deposit with the static address parameters that created
it. This lets restored deposits recover the correct script and signing
keys instead of assuming the legacy root address.
2026-08-10 14:18:04 +02:00
Slyghtning
374ab5dd4d
swap: reserve multi-address key families
Reserve separate key families for static receive and change addresses.
This keeps derived keys out of the legacy static-address and HTLC key
streams.
2026-08-10 14:18:04 +02:00
Slyghtning
1b81a06b42
Merge pull request #1192 from hieblmi/no-change-label
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: allow no-changelog to skip release notes
2026-08-06 11:06:38 +02:00
Slyghtning
57fb007f95
docs: document no-changelog release note opt-out 2026-08-04 11:02:33 +02:00
Slyghtning
6f0d817db4
github: allow no-changelog to skip release notes 2026-08-04 11:02:22 +02:00
Slyghtning
f5f76a61cc
Merge pull request #1191 from hieblmi/docs-gate
Some checks failed
CI / Release Notes (push) Has been cancelled
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: require release notes for pull requests
2026-08-03 11:48:15 +02:00
Slyghtning
4016f4a8f2
docs: instruct agents to add release notes 2026-08-03 11:18:14 +02:00
Slyghtning
414760c607
github: require release notes for pull requests 2026-08-03 11:17:54 +02:00
Slyghtning
a8e3e9c853
Merge pull request #1189 from hieblmi/tapd-client-fixes
assets: harden tapd client lifecycle and RFQ handling
2026-08-03 11:10:36 +02:00
Slyghtning
b686d97445
docs: note tapd client hardening
Document the RFQ validation, cache responsiveness, and tapd connection
lifecycle fixes in the rolling release notes.
2026-08-03 10:05:06 +02:00
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