Commit Graph

171 Commits (v0.20.1-beta)

Author SHA1 Message Date
sputn1ck 0f924b36cd
multi: bump lndclient and lnd version to latest
Co-authored-by: Oliver Gugger <gugger@gmail.com>
2 years ago
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
2 years ago
Andras Banki-Horvath 85145ca4bb
loop: set minimum LND version to 0.15.0 2 years ago
Andras Banki-Horvath 391ef57ea3
loopout: enable p2tr without keyspend 2 years ago
Andras Banki-Horvath 901a935514
loopin: enable p2tr htlcs without keyspend 2 years ago
Andras Banki-Horvath 00cf4bf71c
multi: make the next protocol version optional 2 years ago
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.
2 years ago
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
2 years ago
Andras Banki-Horvath 9610becebd
multi: add the aggregate internal pubkey to the v3 htlc 2 years ago
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.
2 years ago
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.
2 years ago
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.
2 years ago
sputn1ck ece0f76e7f
loop: update listswaps api 2 years ago
Yong e98d813885
Merge pull request #495 from sputn1ck/check_p2pk_dest
loopout: reject P2PK addresses
2 years ago
sputn1ck ce596468e9
loopout: reject unsupported address formats
This commit adds a check to reject unsupported address
formats such as P2PK or P2TR addresses
2 years ago
sputn1ck a34f22c443
make fmt 2 years ago
sputn1ck a1271fee40
multi: fix linter issues 2 years ago
sputn1ck f0bf9302cc
make: dockerize linter 2 years ago
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.
2 years ago
Harsha Goli 7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2 years ago
Andras Banki-Horvath 5b737855c1
loopd: update minimum required LND version to v0.14.2-beta 2 years ago
Andras Banki-Horvath 1d1354d2cb
config: make total payment timeout and retries configurable 2 years ago
Elle Mouton 2d7745ecf4 loopd/daemon: rename createDefaultMacaroonFile
Rename createDefaultMacaroonFile to withMacaroonService since this is
now a more appropriate name.
2 years ago
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.
2 years ago
Andras Banki-Horvath b3d8f5f096
loopd: close dbs when the daemon stops 2 years ago
carla 16799838f7
multi: surface loop in parameters on rpc 2 years ago
carla 4689040333
multi: surface suggested loop in swap on rpc 2 years ago
carla 5280721636
multi: add ability to autoloop in 2 years ago
carla 5e47a0c6e9
multi: add loop in swap builder implementation 2 years ago
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.
2 years ago
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.
2 years ago
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.
2 years ago
Harsha Goli 52087c8bb4
Merge pull request #434 from arshbot/default-macaroon-locations
loopd: Consider network when making LND paths
2 years ago
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
2 years ago
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
2 years ago
carla 91a90968d0
multi: surface swap type on rpc 2 years ago
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.
2 years ago
Carla Kirk-Cohen 04b4f0a389
Merge pull request #432 from carlaKC/export-listnerconfig
loopd: export NewListenerConfig
3 years ago
carla 618310fe6f
loopd: export NewListenerConfig 3 years ago
Turtle 1503001ee5
loopd: conditionally create default macaroon file
In some cases we don't want the default macaroon file to be created on
disk, so we allow passing in a boolean that toggles the macaroon
creation.
3 years ago
Oliver Gugger 2c6e035235
multi: bump lnd compile time dependency to v0.14.0-beta.rc1 3 years ago
carla cca5926263
multi: bump lndclient to v0.12.0-13
To allow code with more up-to-date dependencies to import loop, we
bump our lndclient version. The minimum loop version remains 11.1
since we're not using any new apis.
3 years ago
Martin Habovstiak 158e22f2a7 Documented the menaing of returned bool 3 years ago
Martin Habovstiak c00da1cf09 Renamed explicitConfig to hasExplicitConfig
`hasExplicitConfig` is considered cleaner.
3 years ago
Martin Habovštiak 2c1e437f26
Remove extra space
Co-authored-by: Yong <yy2452@columbia.edu>
3 years ago
Martin Habovstiak 84582bbb88 Improve error handling of config file
This makes two changes to handling of errors when configuration file
could not be loaded:

1. Only NotFound errors are considered OK - access errors and other FS
   issues are now treated as fatal.
2. Failing to load config file specified explicitly via `--configfile`
   option is alway a fatal error.

Rationale: If the configfile was specified explicitly then it indicates
the user really wishes to load it. While the user could want it to be
optionally loaded for extra configuration options, this can be
accomplished using an empty file.

If the config file was not specified explicitly then its' path was
computed from loop directory. If the file is inaccessible due to
permissions or other FS errors it's nearly certain other following
operations will fail as well. Failing early with a clear message is thus
beneficial.

This still leaves room for uncaught user error (e.g. mistakenly naming
config file inside loop dir as `loop.conf` instead of `loopd.conf`) but
it's greatly reduced and such error should be easier to identify.

(Indirectly) closes #412
3 years ago
Andras Banki-Horvath 0e7ed91d5d
loop: integrate the probe api with loop-in quote
In this commit we add a call to the new probe endpoint directly into the
loop-in quote call. Furthermore we add an option to include private
channels in the loopin swap payment request. This is also useful for when
users quote/probe directly using the client API and specify hop hints.
3 years ago
Andras Banki-Horvath f786aaa016
loop: add support for the probe API 3 years ago
Oliver Gugger a7fff0ac2f
multi: update lnd master with grpc-gateway upgrade
To make loop work with the latest lnd version inside of LiT, we need
to upgrade the grpc-gateway library to the same v2 version here too.
3 years ago
Oliver Gugger 7091b90e95
Merge pull request #404 from guggero/fix-alpn-error
loopd: fix ALPN issue with Python
3 years ago