Commit graph

92 commits

Author SHA1 Message Date
Slyghtning
152385885f
staticaddr: exclude close-to-expiry depositis from SelectDeposits 2025-10-08 16:24:46 +02:00
Slyghtning
9f57c8ee01
loopin: add loop-in constants to filter expired deposits 2025-10-08 11:38:37 +02:00
Slyghtning
51258af025
staticaddr: fast-flag support
--fast allows the client to expedite the publishing
of on-chain swap transactions with change, e.g. if --amount was specified.
2025-10-07 08:53:39 +02:00
Slyghtning
55081cd8fe
staticaddr: ignoreUnknown flag for DepositsForOutpoints 2025-09-26 12:03:48 +02:00
Slyghtning
a877cfdc4c
staticaddr: checkChange method for sweep signing 2025-09-25 11:13:35 +02:00
Slyghtning
2ee772b251
staticaddr: selected swap amount migration
The selected_amount column of all previous
swaps is filled with the total value of
deposits that partook in these swaps.
2025-09-25 11:13:35 +02:00
Slyghtning
581761a12f
staticaddr: arbitrary loop-in amount
In this commit we add a new function SelectDeposits
to the loop-in manager. It coin-selects deposits that
meet an arbitrary swap amount provided by the client.
We have to ensure that the server creates the correct
change outputs for the htlc- and sweepless sweep
transactions.
2025-09-25 11:13:34 +02:00
Slyghtning
d0670f109b
staticaddr: add nil checks for withdrawals 2025-09-15 13:53:30 +02:00
Slyghtning
b36f1651a3
staticaddr: poll new deposits on block arrival 2025-09-08 16:52:36 +02:00
Slyghtning
a1fb489a47
Merge pull request #996 from hieblmi/fix-971
staticaddr: monitor tx id of expiry sweep
2025-08-27 13:31:59 +02:00
Slyghtning
0ee9a617e6
staticaddr: log errors in manager.Run 2025-08-26 09:47:18 +02:00
Slyghtning
6ee4cf96f0
staticaddr: monitor tx id of expiry sweep 2025-08-22 16:14:18 +02:00
Slyghtning
1930be8cc7
staticaddr: round up withdrawal tx weight to the nearest satoshi
this commit fixes issue
https://github.com/lightninglabs/loop/issues/966
2025-08-21 09:34:15 +02:00
Slyghtning
b2a4d7af2d
staticaddr: show deposits as part of cli swap output 2025-08-20 17:07:29 +02:00
Slyghtning
a41334dd3d
staticaddr: add swap hash to deposit structs 2025-08-20 16:58:20 +02:00
Slyghtning
e98f733ef8
linter: fix lint issues after linter v2 update 2025-08-19 21:57:00 +02:00
Slyghtning
fe7622db87
staticaddr: fetch deposits as part of swap retrieval
since deposits have been normalized in the db in the
context of a static address swap this commit now
retrieves the deposit information as part of
GetLoopInByHash and GetStaticAddressLoopInSwapsByStates.
2025-08-01 11:26:33 +02:00
Slyghtning
d7ac3148c9
staticaddr: relax scope of ToDeposit 2025-08-01 11:26:33 +02:00
Slyghtning
a1af860527
staticaddr: remove unused fsm transition 2025-08-01 11:26:33 +02:00
Slyghtning
6e7441ba8d
staticaddr: migrate swap hashes to deposits 2025-08-01 11:26:32 +02:00
Slyghtning
35901d1247
staticaddr: don't append to public variable PendingStates 2025-08-01 10:34:16 +02:00
Slyghtning
e948c94b95
staticaddr: method to fetch deposits by outpoints 2025-07-29 15:52:54 +02:00
Andras Banki-Horvath
31f996cb37
build: bump tapd to v0.6.1 and lnd to v0.19.2-beta 2025-07-16 19:05:32 +02:00
Slyghtning
412fe7ffd9
staticaddr: simplify withdrawal fsm transition
previously upon recovery, a withdrawing deposit was
first transitioned into the Deposited state by the
deposit manager, and then again into the Withdrawing
state by the withdrawal manager. The first transition
is unnecessary, so we just remain in the Withdrawing
state upon recovery.
2025-07-02 15:42:12 +02:00
Boris Nagaev
51b74512b8
staticaddr: fix error formatting in the log 2025-06-24 01:44:32 -03:00
Boris Nagaev
61542197f6
staticaddr: use tx hash not *wire.MsgTx as a key
Do not rely on GetActiveDepositsInState reusing the same *wire.MsgTx
pointer for a unique transaction.
2025-06-24 01:44:32 -03:00
Boris Nagaev
38aaa4d07a
staticaddr: recover withdrawals in parallel
Use errgroup to publish each transaction in a separate goroutine.
Publishing a transaction can take a while in neutrino mode.
2025-06-24 01:44:32 -03:00
Boris Nagaev
3ed8c7a9fc
staticaddr/withdraw: log PublishTransaction start 2025-06-24 01:44:32 -03:00
Boris Nagaev
cc5113da0a
staticaddr: remove an unused interface method 2025-06-24 01:44:32 -03:00
Slyghtning
d526192de7
staticaddr: thread-safe loop-in recovery 2025-06-23 11:00:06 +02:00
Slyghtning
3963bad3a1
staticaddr: remove duplicate deposit finalize method 2025-06-23 11:00:06 +02:00
Slyghtning
c579a3e933
staticaddr: fix deposit recovery deadlock 2025-06-23 10:35:16 +02:00
Slyghtning
13247c4651
staticaddr: wait for address manager initiation 2025-06-13 15:37:38 +02:00
Slyghtning
5718f11162
staticaddr: store historic withdrawal info 2025-06-10 17:07:30 +02:00
Slyghtning
b780a9ae91
staticaddr: simplify handleWithdrawal 2025-05-28 11:58:02 +02:00
Slyghtning
cf0651af38
staticaddr: add expiry to NewAddress response 2025-05-15 14:56:49 +02:00
Boris Nagaev
9f971cd371
staticaddr: fix crash in loop-in manager shutdown
If the notification manager shuts down, sweepReqs channel is closed and sweepReq
object received from it becomes nil, causing panic in handleLoopInSweepReq. Now
this is fixed by checking if the channel was closed and if it was shutting down
loop-in manager itself.
2025-05-13 19:21:57 -03:00
Boris Nagaev
4e4390416b
staticaddr: fix logs, use %v not %w in logs 2025-05-13 11:49:50 -03:00
Slyghtning
b5af507c6b
staticaddr: don't ignore output-already-spent publish error 2025-04-28 19:43:29 +02:00
Slyghtning
ff44b3b640
staticaddr: log deposit state transition only if executed 2025-04-28 19:43:29 +02:00
Slyghtning
82e34a6d5e
staticaddr: allow rbf'ing withdrawal transactions 2025-04-28 19:43:28 +02:00
Boris Nagaev
1af9cb793b
staticaddr: don't rename swapserverrpc to looprpc 2025-04-24 11:19:59 -03:00
Boris Nagaev
6d3f65a0f2
looprpc: rename field in WithdrawDepositsResponse
It returns an address, but the field was called pk_script, which was confusing.
Also renamed it in the code.
2025-04-24 11:19:59 -03:00
Slyghtning
8401ca58be
staticaddr: non-concurrent deposit recovery 2025-03-26 15:33:19 +01:00
Slyghtning
cecb24c673
Merge pull request #902 from hieblmi/fix-deadlock
staticaddr: lock mutex for active deposits access
2025-03-21 14:53:38 +01:00
Slyghtning
679ba13608
staticaddr: don't lock active deposits across state transition 2025-03-21 11:17:57 +01:00
Boris Nagaev
e704119f14
deposit: fix sending to finalizedDepositChan 2025-03-21 10:30:41 +01:00
Slyghtning
484681ab45
staticaddr: quit deposit fsm handler when finialized 2025-03-21 10:30:39 +01:00
Boris Nagaev
dc4a5641ac
multi: initialize block height in New, not in Run
If Run sets the current height field, it is technically a race between Run and
other methods reading the field. Setting in New is a safer option.

Removed a check that height is not 0 from static address manager.
2025-03-19 15:00:31 +01:00
Boris Nagaev
4c292f179f
staticaddr: fix race conditions in current height
Make the current height an atomic variable in staticaddr/address/manager.go and
in staticaddr/withdraw/manager.go.
Removed the initiation height from staticaddr/deposit/manager.go (not needed).
2025-03-19 15:00:30 +01:00