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

83 Commits

Author SHA1 Message Date
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
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
Oliver Gugger
ca9ec4cfe7
looprpc: generate JSON/WASM client stubs 2021-08-03 13:18:35 +02:00
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.
2021-07-30 13:22:12 +02:00
Andras Banki-Horvath
f786aaa016
loop: add support for the probe API 2021-07-30 13:22:12 +02:00
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.
2021-07-29 17:02:06 +02:00
carla
94692678f3
looprpc: add swap multiple swap scripts server state to rpc enum
Add a new failure state that the server may send to the client.
This state is sent for loop in swaps where the client has
erroneously published multiple outputs for a loop in swap (this
could happen if an end user created an external tx with too many
outputs). Failing the swap server side protects users from potential
footguns where they publish the hltc then the server can claim more
money than was paid out off chain. This can never happen when the
loop client publishes the htlc because it only ever contains one
output.
2021-07-16 10:28:17 +02:00
Oliver Gugger
77f7b73570
looprpc: document missing CLI commands 2021-07-14 16:08:53 +02:00
Oliver Gugger
86df44362f
make+looprpc: use Docker to compile and format protos 2021-07-13 09:41:28 +02:00
Oliver Gugger
67c81204f6
looprpc: extract REST annotations into yaml 2021-07-13 09:37:08 +02:00
carla
1bdcc2cd41
looprpc: prefix server and lnd enums to create unique names 2021-06-03 10:52:25 +02:00
carla
3aee9ae924
looprpc: add new server states for client-initiated cancelation 2021-05-24 08:46:05 +02:00
carla
71501ef2e8
looprpc: add server cancelation rpc to server.proto 2021-05-24 08:40:12 +02:00
yyforyongyu
c4d46a24a0
looprpc: add conf_target to loop in/out quote resp 2021-03-08 02:23:25 +08:00
carla
90561f8ac7
multi: add fee percentage to rpc 2021-03-04 10:14:52 +02:00
carla
dd1a2de731
multi: add flat fee percentage to autoloop 2021-03-04 10:14:37 +02:00
carla
949e76bb2a
looprpc: add peer level rules to rpc 2021-02-17 10:56:32 +02:00
carla
22bd4cabb4
looprpc: add disqualified channels to suggest swaps response 2021-02-08 09:39:03 +02:00
carla
71ace95ac8
loop: rename autoloop specific parameters 2021-02-03 08:54:48 +02:00
carla
74f2c96810
looprpc: add custom client sizes for autoloop 2020-12-01 13:06:37 +02:00
Oliver Gugger
58c1c25a8b
looprpc: add initiator field to swap requests 2020-11-06 10:43:00 +01:00
Oliver Gugger
785acf74ca
looprpc: unify formatting 2020-11-06 10:42:59 +01:00
carla
87b02b7715
multi: add force tick endpoint behind debug server
To itest our autolooper, we need to be able to trigger dispatch on
demand. This functionality is included in a separate rpc server behind
a dev flag. Since it is unlikely that we need to split loop into
multiple rpc servers, this commit simply adds an additional debug server
rather than opting for a full subserver setup.
2020-10-15 13:53:27 +02:00
Carla Kirk-Cohen
afc41adab0
Merge pull request #295 from carlaKC/205-autoout
liquidity: add budget-limited autoloop
2020-10-15 08:50:46 +02:00
Oliver Gugger
61b2387be7
looprpc+swap_client: add user agent string to swaps 2020-10-13 08:28:55 +02:00
carla
eb6b476469
looprpc: add autoloop parameters to rpc server 2020-10-12 13:34:56 +02:00
carla
f23a527927
looprpc: add fee and backoff parameters to rpc 2020-09-30 12:46:35 +02:00
Joost Jager
c8666caf20
loopin: mpp pre-swap probe 2020-09-17 13:24:54 +02:00
Andras Banki-Horvath
133f3cac5f multi: integrate the new htlc v2 scripts to loop in/out
This commit bumps the current protocol version and integrates htlc v2
with loop in/out for new swaps, while keeping htlc v1 for any pending
swaps with previous protocol versions.
2020-09-09 19:54:01 +02:00
carla
6b93c70b8a
looprpc: add swap suggestions endpoint 2020-09-03 10:36:44 +02:00
carla
6fcbf54c02
looprpc: add get and set liquidity parameters endpoints 2020-09-02 11:50:15 +02:00
carla
852f459391
multi: add htlc confirmations parameter to client loop out request 2020-08-04 20:29:09 +02:00
carla
8da0ea6048
looprpc: add label to swap creation and display in list swaps 2020-08-03 11:00:56 +02:00
carla
a9849bb317
multi: add failure reason to swap client server
To provide more information about swaps, we add a failure reason field
to our swaps. We do not extend our existing state enum to remain
backwards compatible.
2020-07-30 09:15:42 +02:00
Gabriel Comte
6e916f2e40 looprpc/docs: fix typo 2020-07-17 16:10:29 +02:00
Joost Jager
e72d998e78
loopout: show expiry range in terms 2020-07-16 21:30:15 +02:00
Joost Jager
05fd1da496
looprpc: update server proto 2020-07-16 21:30:13 +02:00
carla
cd2b08aec6
multi: consume and log sever state updates 2020-07-16 21:02:06 +02:00
Joost Jager
8d1ec50fa7
looprpc: split quote message 2020-07-14 19:26:30 +02:00
Joost Jager
24099aa4f9
looprpc: split terms message 2020-07-14 15:26:23 +02:00
Joost Jager
1869ad670f
looprpc: expose server message to clients 2020-06-30 16:59:10 +02:00
Joost Jager
c6c30e2988
multi: log server message 2020-06-30 16:59:04 +02:00
Joost Jager
8a4ce0ed89
looprpc: fix doc on routing fee units 2020-06-15 14:58:21 +02:00
Joost Jager
0ef659a486
looprpc: generate with latest lnd versions of the proto generators
3ef41dd198
2020-06-15 14:58:19 +02:00
carla
65c847674d
multi: add preimage push to loop out after sweep attempt
Once we have revealed our preimage to the world with a sweep attempt,
we can safely push our preimage to the server to speed up on chain
claim.

Rather than rely on the server, we use the state of our invoice in lnd
to determine whether we should continue trying to push the preimage to
the server.
2020-06-08 12:54:08 +02:00
Joost Jager
ccec719423
looprpc: add outgoing channel set restriction
Expose the new channel set restriction on the loopd client rpc.
2020-05-21 11:22:06 +02:00
Andras Banki-Horvath
c6e3829acd looprpc: bump protocol version 2020-05-05 15:49:06 +02:00
Andras Banki-Horvath
f0aff9b7bd looprpc+loopin: support for native segwit htlcs
This commit extends SwapResponse and SwapStatus with np2wsh and p2wsh
htlc output addresses to support both nested and native segwit htlcs
in loop-in.

Furthermore the commit adds support for native segwith loop-in htlcs.
When the htlc is paid internally, as of this commit we'll use NP2WSH,
otherwise users are free to select whether to pay the NP2WSH or the
P2WSH htlc.
2020-05-05 15:49:05 +02:00
Joost Jager
92730e0eaf
multi: report protocol version 2020-04-28 16:01:30 +02:00