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

1009 Commits

Author SHA1 Message Date
carla
4689040333
multi: surface suggested loop in swap on rpc 2021-12-15 09:10:28 +02:00
carla
66d16f52a7
liquidity/test: add autoloop in tests 2021-12-15 09:01:23 +02:00
carla
5280721636
multi: add ability to autoloop in 2021-12-15 09:01:22 +02:00
carla
f6c3d77c51
liquidity/test: use mock for server restrictions
This change makes the test easier to change when we add loop in
restrictions as well.
2021-12-15 09:01:21 +02:00
carla
5e47a0c6e9
multi: add loop in swap builder implementation 2021-12-15 09:01:20 +02:00
Alex Bosworth
b09969e167
Merge pull request #447 from lightninglabs/bump-to-v0.16.0-beta
version: bump version to v0.16.0-beta
2021-12-14 09:28:23 -08:00
Alex Bosworth
0911db6418
version: bump version to v0.16.0-beta 2021-12-14 09:14:30 -08:00
Carla Kirk-Cohen
c523789f21
Merge pull request #446 from carlaKC/alias-imports
multi: always alias swapserverrpc import for use as a package
2021-12-14 11:57:32 +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
3b911cfd4f
loop: alias import for swapserverrpc in swap server client 2021-12-13 15:27:05 +02:00
carla
167cef4f6b
loopdb: alias swapserverrpc with looprpc
Packages importing loop can't import this package without aliasing
the import.
2021-12-13 15:23:36 +02:00
Carla Kirk-Cohen
85dc0b26be
Merge pull request #445 from carlaKC/module-swapserverrpc
swapserverrpc: add module for server protos
2021-12-13 14:03:42 +02:00
carla
a9e774898f
swapserverrpc: make swapserverrpc its own module
To make it possible to replace the swapserverrpc module in the server,
we declare it as its own submodule. This allows the server to make
changes to its local protos (and replace loop's copy with the local
version), to use changes that are not yet merged to the client repo.
2021-12-13 13:59:16 +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
Carla Kirk-Cohen
f01f440715
Merge pull request #444 from carlaKC/loopin-removeshadowedvar
multi: remove shadowed label variable in loopin swaps
2021-12-13 08:37:07 +02:00
carla
26886731d4
multi: remove shadowed label variable in loopin swaps
We already have a Label field in the embedded SwapContract
field for loop in swaps. This commit removes an erroneously
added Label field in LoopInContract which may be a cause of
ambiguity when referencing this field.
2021-12-09 13:40:34 +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
b7ba19394b
Merge pull request #415 from lightninglabs/routehints
loopin: Add --private parameter
2021-12-08 13:54:39 -05:00
Harsha Goli
bf84aef4be
release_notes: add release notes for bugfix 2021-12-08 13:54:03 -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
05693411f7
Merge pull request #436 from arshbot/assume-yes
main: add --force to loop in/loop out
2021-12-08 13:51:45 -05:00
Harsha Goli
8dba29ad3e
docs: updated release notes 2021-12-07 21:04:08 -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
Harsha Goli
4299147895
main: add --private flag to loop in
Adding the --private flag informs loopd that the connected node is
considered private (all channels are marked private) and the loop in
server may have trouble routing the payment. To handle this, loopd will
construct some hophints that will be sent to the loopin server to help
route. This commit merely adds the flag to the cli.
2021-12-07 14:23:41 -05:00
Harsha Goli
9db43a4dbd
loop: Reimplement SelectHopHints from lnd
In this commit, instead of importing SelectHopHints from lnd, we chose
to reimplement the functionality here, for the purpose of adding hop
hints in case the user informs us the client node is considered private.

In the future, we should modify the origin SelectHopHints to take
closures for all it's data sources, so we can use it's logic external
2021-12-07 14:23:41 -05:00
Harsha Goli
5504368844
loopin: Add --route_hints parameter
Adds the --route_hints parameter to loop quote
2021-12-07 14:23:40 -05:00
Carla Kirk-Cohen
2e6adeaa3f
Merge pull request #433 from carlaKC/419-swaptype
liquidity: add swap type and loop in fee logic
2021-12-02 09:27:42 +02:00
carla
8113c34bce
liquidity: add failed loop in swaps to swap traffic 2021-11-30 13:18:32 +02:00
carla
965b99d455
liquidity: add existing loop in swaps to budget calculations 2021-11-30 13:18:32 +02:00
carla
0f0be28599
liquidity: add loop in fees to fee categories 2021-11-30 13:18:31 +02:00
carla
c067169e6f
liquidity: add loop fee estimation and swap interface impl
Add an implementation of our swap interface which can be used for
loop in, and fee estimation. For fee estimation, we always want to
calculate worst case loop in fees, so that autoloop never goes over
its budget. However, for loop in we can't estimate how much a
timeout would cost, because we must sweep the output (can't set
a limit like loop out), and fee estimation in a few hundred blocks
(when we'd sweep the timeout) is totally unreliable.

Instead, we use a high fee rate as our best-effort fee rate for
the future. We can also be confident that that loop in swaps will
succeed, since once the htlc is locked in, all that is required
is for the server to sweep.
2021-11-30 13:18:30 +02:00
carla
3e7782e1ab
liquidity: use builder in single place
In preparation of supporting multiple swap types, we move our swap
builder into a single place, so that we can check our `maySwap`
restriction per-swap (since we'll now have different checks for
different swap types.

To save ourselves from making multiple calls to the loop server for
the restrictions placed on each swap type, we still pass a single
set of restrictions in.
2021-11-30 13:18:29 +02: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
00c2d4e5f0
liquidity: generalize threshold rule variable names
The current wording in this function is very specific to loop out.
In this commit, we refactor to use `target` and `reserve` rather
than inbound and outbound so that it can be used more generically.
2021-11-30 13:18:26 +02:00
András Bánki-Horváth
06c4c347fd
Merge pull request #440 from bhandras/lnd_bump-0.14.1-beta
mod: bump lnd to v0.14.1-beta
2021-11-29 17:13:54 +01:00
Andras Banki-Horvath
9e227fc1ee
build: adding clean 2021-11-29 16:36:50 +01:00
Andras Banki-Horvath
daa62b8ea2
mod: bump lnd to v0.14.1-beta 2021-11-29 16:33:21 +01:00
Oliver Gugger
18395d143a
Merge pull request #438 from guggero/lnd-14-final
multi: bump lnd to v0.14.0-beta final, release v0.15.1-beta
2021-11-18 14:53:24 +01:00
Oliver Gugger
f0b2bb0888
release_notes: clear on release of new version 2021-11-18 14:10:58 +01:00
Oliver Gugger
0ea64e81fb
multi: bump lnd to v0.14.0-beta final, release v0.15.1-beta
With this PR we include the final version of the lnd v0.14.0-beta
release to ensure compatibility.
The rationale for choosing Loop version 0.15.1 instead of 0.16.0 is that
this doesn't add any major new features.
2021-11-18 13:53:48 +01:00
Carla Kirk-Cohen
04b4f0a389
Merge pull request #432 from carlaKC/export-listnerconfig
loopd: export NewListenerConfig
2021-11-18 10:03:33 +01:00
Harsha Goli
e52f6eff47
main: add --force to loop in/loop out
--force skips the confirmation prompt when performing loops. This is
super userful for scripts and negates the use of gnu yes
2021-11-17 16:30:31 -05:00
carla
618310fe6f
loopd: export NewListenerConfig 2021-11-12 11:26:07 +02:00
András Bánki-Horváth
9f399c56a5
Merge pull request #431 from arshbot/loopserver-update-lnd
bump lnd versions from 12.1-beta to 13.4-beta
2021-11-12 09:52:14 +01:00
Harsha Goli
2558478707
bump lnd versions from 12.1-beta to 13.4-beta 2021-11-11 16:40:27 -05:00
Oliver Gugger
7c4d8f601e
Merge pull request #428 from lightninglabs/macaroon-stateless
Macaroon stateless
2021-11-05 10:47:08 +01:00
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.
2021-11-04 14:09:27 +01:00
Oliver Gugger
139eac6feb
Merge pull request #426 from lightninglabs/lnd-14
multi: bump lnd compile time dependency to v0.14.0-beta.rc1
2021-11-04 11:22:29 +01:00