2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-08 01:10:29 +00:00
Commit Graph

183 Commits

Author SHA1 Message Date
George Tsagkarelis
af7a470aea
liquidity+loopd: add sticky loop out swap with amount backoff 2023-03-09 00:43:07 +02:00
George Tsagkarelis
b025b9ae37
multi: add recurring autoloop budget 2023-02-22 19:48:03 +02:00
Andras Banki-Horvath
4ab6c65186
dep+build: bump LND dependency to include GenCertPair fix 2023-02-09 11:22:14 +01:00
Andras Banki-Horvath
476f47275b
loopd: set minimum LND version to 0.15.99-beta 2023-02-06 20:46:03 +01:00
Andras Banki-Horvath
a7451622e5
mod: bump LND and lndclient to include musig2 1.0rc2 changes
This commit bumps LND and lndclient to make it possible to upgrade
taproot HTLC construction with a MuSig2 version. This is required to
support both old (MuSig2 0.4) and new (MuSig2 1.0) clients.
2023-02-06 20:46:03 +01:00
George Tsagkarelis
fa0393b331
multi: add OutAddr parameter for autoloop loop out 2022-12-16 12:02:46 +02:00
Andras Banki-Horvath
049b17ff96
misc: refactor loop tests to use require where possible 2022-11-30 18:16:45 +01:00
Andras Banki-Horvath
bdb4b773ed
swap: refactor htlc construction to allow passing of internal keys
This commit is a refactor of how we construct htlcs to make it possible
to pass in internal keys for the sender and receiver when creating P2TR
htlcs. Furthermore the commit also cleans up constructors to not pass in
script versions and output types to make the code more readable.
2022-11-30 18:16:44 +01:00
Andras Banki-Horvath
105d3d1ab4
loopd: bump minimum lnd version to v0.15.4 2022-11-18 21:24:31 +01:00
Andras Banki-Horvath
88956455b4
multi: completely remove support for NP2WSH htlcs
This commit removes all code related to NP2WSH htlcs. These were
historically used when segwit adoption was very sporadic and are not
used anywhere anymore. Some historical swaps stored in the DB may be
listed with incorrect htlc adresses from here on.
2022-11-04 17:14:53 +01:00
Andras Banki-Horvath
b36885fb65
loopd: correct htlc output type on view command
Previously view may have set the output type wrongly for internal p2wsh
and p2tr loop-in swaps which is corrected in this commit.
2022-11-04 17:14:50 +01:00
Andras Banki-Horvath
977b72019d
loopd: bump minimum lnd version to v0.15.1-beta
In this commit we bump the minimum LND version required to run loopd to
v0.15.1-beta in order to ensure that the underlying chain backend
supports taproot (https://github.com/lightningnetwork/lnd/pull/6798)
2022-10-07 12:24:25 +02:00
sputn1ck
0f924b36cd
multi: bump lndclient and lnd version to latest
Co-authored-by: Oliver Gugger <gugger@gmail.com>
2022-07-07 17:28:22 +02:00
András Bánki-Horváth
11ab596080
Merge pull request #497 from bhandras/taproot-musig2
multi: upgrade to using P2TR htlcs and added support for MuSig2 loopout sweep
2022-07-06 22:46:29 +02:00
Andras Banki-Horvath
85145ca4bb
loop: set minimum LND version to 0.15.0 2022-06-30 16:59:59 +02:00
Andras Banki-Horvath
391ef57ea3
loopout: enable p2tr without keyspend 2022-06-30 16:59:55 +02:00
Andras Banki-Horvath
901a935514
loopin: enable p2tr htlcs without keyspend 2022-06-30 16:59:55 +02:00
Andras Banki-Horvath
00cf4bf71c
multi: make the next protocol version optional 2022-06-30 16:59:54 +02:00
Elle Mouton
8ccd35e0c1
loopd: move RequiredPermissions to dedicated dir
This commit moves the RequiredPermissions map to its own directory so
that projects importing the permissions list dont need to import all the
dependencies of the loopd package.
2022-06-14 15:13:34 +02:00
András Bánki-Horváth
8f23c6789b
Merge pull request #477 from bhandras/taproot-htlc
multi: changes to the taproot HTLC  required for both client and server
2022-06-09 20:10:37 +02:00
Andras Banki-Horvath
9610becebd
multi: add the aggregate internal pubkey to the v3 htlc 2022-06-09 10:20:16 +02:00
sputn1ck
1df6685653
looprpc: fix suggestswaps response
This commit fixes the SuggestSwaps rpc call. Previously, when multiple
DisqualifiedPeers were provided, all pubkeys would be the same.
2022-06-08 12:09:02 +02:00
yyforyongyu
425a007aaf
loopd+liquidity: persist parameters on disk
This commit saves the RPC request used to construct the `Parameters` on
disk. Since it's a proto message, an easy way to read/write it is to
rely on the proto marshal/unmarshal methods. A side effect is that
migration also becomes easy as proto message have its own internal
mechanism to keep track of the compatibility.
2022-06-07 20:18:11 +08:00
yyforyongyu
8217ee31c3
liquidity+loopd: refactor SetParameters to take a rpc request
This commit refactors the method `manager.SetParameters` to take a
`SetLiquidityParamsRequest`. As we'll see in the following commit, this
will enable us saving the params to disk more easily.
2022-06-07 19:19:52 +08:00
sputn1ck
ece0f76e7f
loop: update listswaps api 2022-05-31 16:26:55 +02:00
Yong
e98d813885
Merge pull request #495 from sputn1ck/check_p2pk_dest
loopout: reject P2PK addresses
2022-05-25 00:10:22 +08:00
sputn1ck
ce596468e9
loopout: reject unsupported address formats
This commit adds a check to reject unsupported address
formats such as P2PK or P2TR addresses
2022-05-20 10:22:11 +02:00
sputn1ck
a34f22c443
make fmt 2022-05-20 10:16:47 +02:00
sputn1ck
a1271fee40
multi: fix linter issues 2022-05-20 10:16:46 +02:00
sputn1ck
f0bf9302cc
make: dockerize linter 2022-05-20 10:16:42 +02:00
Harsha Goli
dec6dd7e70
swap: HTLCV3 added
In this commit we add the version 3 htlc, which is implemented with
taproot script spending the two payment paths: the claim path case, and
the timeout case.
2022-04-22 11:36:09 -04:00
Harsha Goli
7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2022-03-25 11:00:16 +01:00
Andras Banki-Horvath
5b737855c1
loopd: update minimum required LND version to v0.14.2-beta 2022-03-16 13:23:41 +01:00
Andras Banki-Horvath
1d1354d2cb
config: make total payment timeout and retries configurable 2022-02-14 10:14:47 +01:00
Elle Mouton
2d7745ecf4 loopd/daemon: rename createDefaultMacaroonFile
Rename createDefaultMacaroonFile to withMacaroonService since this is
now a more appropriate name.
2022-01-17 16:13:19 +02:00
Elle Mouton
ad7cdc8ed2 multi: use lndclient MacaroonService
Since the code for creating and using a macaroon service is the same for
multiple projects (pool, loop, litd etc), the code has been unified in
lndclient. So this commit removes the macaroon service code and instead
uses the lndclient code.
2022-01-17 16:13:19 +02:00
Andras Banki-Horvath
b3d8f5f096
loopd: close dbs when the daemon stops 2021-12-22 10:32:11 +01:00
carla
16799838f7
multi: surface loop in parameters on rpc 2021-12-15 09:11:46 +02:00
carla
4689040333
multi: surface suggested loop in swap on rpc 2021-12-15 09:10:28 +02:00
carla
5280721636
multi: add ability to autoloop in 2021-12-15 09:01:22 +02:00
carla
5e47a0c6e9
multi: add loop in swap builder implementation 2021-12-15 09:01:20 +02:00
carla
213f5c7c8b
loopd: alias server rpc import with looprpc
Packages importing loopd can't import 2x looprpc packages (in the
form of swapserverrpc and looprpc). To get around this, we alias
each import with a different name, updating the server in this
commit.
2021-12-14 11:35:30 +02:00
carla
996b5e43ab
loopd: alias client rpc import with clientrpc
Packages importing loopd can't import 2x looprpc packages (in the
form of swapserverrpc and looprpc). To get around this, we alias
each import with a different name, starting with the client in this
commit.
2021-12-13 15:28:38 +02:00
carla
dad103530f
multi: move server proto files to their own directory
Protobuf does not allow naming conflicts for files within the same
process, because all proto messages register themselves in a global
registry.

This is problematic because the server's itests import the client's
looprpc package to make rpc queries to the loopd client, thus importing
duplicate common.proto and server.proto from the client's looprc package
(since they're both in there as well).

This change moves the server's proto files into their own directory so
that they are not imported when we want to use the client's files. We
cannot change the package name for the server, because that would be
a breaking change (the package name is included in URIS). Fortunately,
we have the go_package option which allows us to place generated files
in a different location.
2021-12-13 13:56:40 +02:00
Harsha Goli
52087c8bb4
Merge pull request #434 from arshbot/default-macaroon-locations
loopd: Consider network when making LND paths
2021-12-08 17:11:34 -05:00
Harsha Goli
3fb75131ea
loopd: Consider network when making LND paths
In this commit we consider the passed network options when assuming the
LND macaroon path if not passed by user
2021-12-08 13:54:03 -05:00
Harsha Goli
f1a7d8fb49
multi: pass private, routehints from loopcli - loopd - loop server
This commit passes routehints all the way from when/if the user passes
them from the cli all the way to the backend loop server. If private is
used, this commit passes that boolean down to different stages, where it
is then converted into routehints.

main: add --private and --route_hints to quote

Adds --private and --route_hints flags to quote cli
2021-12-07 21:04:07 -05:00
carla
91a90968d0
multi: surface swap type on rpc 2021-11-30 13:18:28 +02:00
carla
25b8d20f75
liquidity: add type to rules
In preparation for adding loop in swaps, we relate liquidity rules
to a specific type of swap that we want to dispatch. This allows us
to use a single rule format for multiple swap types.
2021-11-30 13:18:27 +02:00
Carla Kirk-Cohen
04b4f0a389
Merge pull request #432 from carlaKC/export-listnerconfig
loopd: export NewListenerConfig
2021-11-18 10:03:33 +01:00