Commit graph

302 commits

Author SHA1 Message Date
Slyghtning
55081cd8fe
staticaddr: ignoreUnknown flag for DepositsForOutpoints 2025-09-26 12:03:48 +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
23f6c24c0c
staticaddr: fix swap amount in listswaps command 2025-09-25 11:13:34 +02:00
Slyghtning
95a456791b
loopd: deposit selection for GetLoopInQuote
If a quote request contains an amount and flag
SelectDeposits set to true the quoting coin-
selects the required deposits to meet the
swap amount in order to quote for the number
of deposits.
2025-09-25 11:13:34 +02:00
Slyghtning
a862f8ba60
test: unit test ListUnspentDeposits 2025-08-22 16:18:15 +02:00
Slyghtning
d3a2badc8b
loopd: filter unavailable deposits in ListUnspentDeposits
ListUnspentRaw returns the unspent wallet view of the
backing lnd wallet. It might be that deposits show up
there that are actually not spendable because they
already have been used but not yet spent by the server.
We filter out such deposits in ListUnspentDeposits.
2025-08-22 15:54:19 +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
38a44968c7
loopd: atomic var to enforce daemon singelton 2025-08-19 22:08:29 +02:00
Slyghtning
bd6271e633
loopd: log correct error if daemon start fails 2025-08-19 21:57:00 +02:00
Slyghtning
6e7441ba8d
staticaddr: migrate swap hashes to deposits 2025-08-01 11:26:32 +02:00
Boris Nagaev
fab4a646df
Merge pull request #967 from starius/neutrino-fixes
staticaddr: neutrino fixes
2025-06-25 13:41:50 -03:00
Andras Banki-Horvath
d12dc0362d
loopd: avoid panic if asset client is not set 2025-06-24 14:55:42 +02:00
Boris Nagaev
6f50b27b7d
loopd: increase withdrawal manager start timeout
This is needed for neutrino.
2025-06-24 01:44:32 -03:00
Boris Nagaev
1036214160
sweepbatcher: add an option to ignore HTLC txids
Added option WithSkippedTxns, which has one historical problematic tx by default.
Sweeps originating from these transactions are omitted when reading from DB.

loopdb: add column sweep_batches.cancelled and replaced DropBatch with
CancelBatch. It is needed, because sweep.batch_id is a foreign key to batch.

Changed StoreMock.InsertSweepBatch not to reuse batch_id. This is needed by
the test, which checks that new batch has fresh ID.
2025-06-17 14:47:49 -03:00
Slyghtning
13247c4651
staticaddr: wait for address manager initiation 2025-06-13 15:37:38 +02:00
Slyghtning
614d61937e
loopd: retrieve historic withdrawal info 2025-06-10 17:07:32 +02:00
Viktor Tigerström
cdcacfe753
multi: update GetInfoResponse response
Update the output of the `commit_hash` field in the GetInfoResponse.
The `commit_hash` field will contain the most recent commit_hash that
the build was based on. If the build had uncommitted changes, this field
will contain the most recent commit hash, suffixed by "-dirty".

Note that this change also changes the output of `commit` field in the
`--version` command. The `Commit` field will now contain most recent git
commit tag.
2025-05-22 18:01:36 +02:00
Slyghtning
cf0651af38
staticaddr: add expiry to NewAddress response 2025-05-15 14:56:49 +02:00
sputn1ck
1ce9bdd0d3
multi: use reservation ids in instant out quote 2025-04-30 15:35:25 +02:00
ffranr
64e6bbd451
perms: move perms.go into looprpc
The Lightning Node Connect (LNC) WASM client currently imports both
`looprpc` and the entire `loop` module to access `perms.go`. This
creates problems because `loop` imports `taproot-assets`, resulting in
too many symbols for the WASM build.

To fix this, we will move `perms.go`—which defines RPC endpoint
permissions—into `looprpc`. After this change, the LNC WASM client will
import only `looprpc`, while the rest of `loop` can continue importing
`taproot-assets` without affecting the LNC WASM build.
2025-04-28 12:56:21 -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
Sam Korn
5cc119b610
looprpc: add test for ListSwaps pagination and filtering 2025-04-19 22:31:45 -06:00
Sam Korn
b55521cb41
looprpc: add simple pagination to the ListSwaps command
This commit adds the ability to set a max_swaps and an index_offset
flag to the ListSwaps command. These new fields are applied AFTER
the initial filtering step. The response also now passes additional
information about the index count and total swaps filtered.
2025-04-19 22:31:45 -06:00
Andras Banki-Horvath
9a6266f9f7
loop: add the commit_hash to GetInfoResponse, change version semantics
With this commit we extend GetinfoResponse with the strict commit hash
(which also includes whether the build tree was clean or dirty).
2025-04-04 12:47:30 +02:00
sputn1ck
6e49e3710c
loopd: add asset client to autoloop cfg 2025-03-25 15:27:53 +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
Boris Nagaev
e0e66a9b38
loopd: fix data races of logger 2025-03-19 15:00:30 +01:00
Boris Nagaev
2249c41d2f
loopdb: switch to go.etcd.io/bbolt
github.com/coreos/bbolt has race conditions:
https://github.com/golang/go/issues/54690
2025-03-19 15:00:30 +01:00
Oliver Gugger
65251e8821
multi: update linter, fix issues 2025-03-10 22:59:50 +01:00
Oliver Gugger
722ad8839d
multi: update lnd compile-time dependency to v0.19.0 2025-03-10 22:59:49 +01:00
Slyghtning
c7cc47bdc3
loopd: arbitrary withdrawal amount for static address deposits 2025-02-09 15:57:26 +01:00
sputn1ck
95aae0e800
loopout/asset: add asset rate 2025-01-22 15:40:57 +01:00
sputn1ck
fddad8a964
looprpc: rename assetamt to max amt 2025-01-22 15:40:57 +01:00
sputn1ck
3e3c863819
loopout: add asset accounting 2025-01-21 18:26:20 +01:00
sputn1ck
1440b6bb1d
loopout: add asset loop out payment flow 2025-01-21 18:26:19 +01:00
sputn1ck
8451f29f8f
loopd: add asset client to swap config 2025-01-21 14:38:02 +01:00
Slyghtning
10b970c5cc
staticaddr: no experimental flag for static 2024-12-13 21:40:42 +01:00
Slyghtning
fc6c9f224c
staticaddr: add initiation height of address 2024-12-12 18:31:10 +01:00
Slyghtning
042b513d50
staticaddr: dest addr and fee rate for withdrawals 2024-12-12 18:31:10 +01:00
sputn1ck
a98e16184e
loopd/staticaddr: add ntfn manager 2024-12-12 18:31:09 +01:00
Slyghtning
439d178b96
staticaddr: cmd listdeposits and listswaps 2024-12-12 18:31:08 +01:00
Slyghtning
21c37a910a
loopd: static address loop-in support 2024-12-12 18:31:08 +01:00
Slyghtning
f3ec81fb68
staticaddr: configurable max htlc tx fee
In this commit we introduce maximum fee percentages
for the static loop-in htlc transactions. Since
the server has the ability to publish htlc transactions
without settling the swap payment we have to restrict
the amount the server allocates for fees of these
transactions.
2024-12-12 18:31:07 +01:00
Slyghtning
c11e90138b
staticaddr: enable deposits for swaps
The static address state machine adds states
to reflect the state of a deposit during a
loop-in swap.
2024-12-12 18:31:06 +01:00
Slyghtning
b9e5875f4e
looprpc: static address loop-ins 2024-12-12 18:31:06 +01:00
Slyghtning
82b95798ab
loopd: quoting for static address loop-ins 2024-12-12 18:31:06 +01:00
Slyghtning
8595c4ac6e
loopd: static address summary 2024-12-12 18:31:05 +01:00
Slyghtning
a7f2f2d8c8
loopd: static address withdrawals support 2024-12-12 18:31:05 +01:00