Commit graph

288 commits

Author SHA1 Message Date
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
Slyghtning
9e56be74c5
log: unified static address logger 2024-12-12 18:31:04 +01:00
Slyghtning
3914ab840f
staticaddr: deposits for server and daemon 2024-12-12 18:31:03 +01:00
Slyghtning
ded2526db7
perms: list unspent outputs 2024-12-12 18:31:02 +01:00
Slyghtning
14810b7e6d
perms: static address creation permission 2024-12-12 18:31:01 +01:00
Slyghtning
40c731f654
daemon: integrate static address manager and sql store 2024-12-12 18:31:01 +01:00
Slyghtning
22b1f53e3e
daemon: add signet support 2024-11-21 13:47:23 +01:00
Slyghtning
5db270dcd8
log: remove unused logWriter 2024-11-18 15:43:36 +01:00
ziggie
59d7d08aee
loopd: nil-pointer bug when showing subsystems 2024-11-18 15:43:35 +01:00
Boris Nagaev
697e8d6255
sweep: log tx label in GetSweepFee methods
Added argument 'label' to GetSweepFee and GetSweepFeeDetails. It is logged
together with expected weight, fee and feerate.
2024-11-11 20:35:35 -03:00
sputn1ck
830220af66
looprpc: add FetchL402 rpc
This commit adds the FetchL402 rpc to the client proto, which will allow
users to force fetching an L402 without doing a loop out or in.
2024-10-30 17:18:34 +01:00
sputn1ck
e9f1a1aef3
ntfn: use l402 store for tokens
This commit changes the way we fetch the l402 tokens for the
notification stream. Instead of fetching them from the server and
paying an invoice, we now look into our local store for the token.
This means that a loop client will not autofetch a token.
2024-10-30 17:12:28 +01:00
sputn1ck
f2fb722901
reservation: add initchan
This fixes a flake in the unit tests
2024-10-22 11:46:31 +02:00
Slyghtning
caa8cc850d
loopout: trace logs for hasBandwidth mpp check 2024-10-15 10:08:31 +02:00
sputn1ck
7409ae73c6
loopd: add notification manager
This commit adds the notification manager to the
loopd daemon.
2024-10-08 14:58:41 +02:00