2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-04 06:00:21 +00:00
Commit Graph

57 Commits

Author SHA1 Message Date
Andras Banki-Horvath
bf59159ddb
client: LoopOutQuote to support estimate using v3 htlc 2022-06-30 16:59:56 +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
9610becebd
multi: add the aggregate internal pubkey to the v3 htlc 2022-06-09 10:20:16 +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
1d1354d2cb
config: make total payment timeout and retries configurable 2022-02-14 10:14:47 +01:00
Andras Banki-Horvath
b3d8f5f096
loopd: close dbs when the daemon stops 2021-12-22 10:32:11 +01: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
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
carla
d1c26a20da
multi: surface server swap initiation grpc error codes
Formatting our error was stifling any grpc error returned by the
server. Instead, we bubble up our grpc error, setting an unknown
code if the server did not specifically return an error code.
2021-07-19 10:28:34 +02:00
carla
16111352a8
multi: add cancel swap function to execute config 2021-05-24 08:40:14 +02:00
Oliver Gugger
fdbf7e95e1
client: fix double hex encoding of node pubkey 2021-05-19 14:25:28 +02:00
Oliver Gugger
27fd6b3304
multi: use aperture instead of local lsat library
Since the lsat code was copied over to aperture a while ago for other
projects to use as well, we should migrate over to that shared code
also. This will give us the recently added "remove token if payment
failed and try again" feature for free along with some other small
updates to the lsat package.
2021-04-29 10:01:15 +02:00
Elle Mouton
65fe06cec2 loopd: verify loop out amount
This commit adds validation that checks if the loop out amount specified can
be satisfied given the nodes current channel balances.
2021-03-17 10:12:30 +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
Andras Banki-Horvath
9fdd531130
swap: add HTLC script version 2020-08-27 16:21:47 +02:00
Joost Jager
43323ffbe2
loopout: extend htlc expiry based on conf target 2020-07-16 21:30:16 +02:00
carla
cd2b08aec6
multi: consume and log sever state updates 2020-07-16 21:02:06 +02:00
Joost Jager
1869ad670f
looprpc: expose server message to clients 2020-06-30 16:59:10 +02:00
Joost Jager
8b215edaa2
multi: create init result structs 2020-06-30 16:59:08 +02:00
Joost Jager
68012f051a
loopout: create LoopOutSwapInfo struct 2020-06-30 16:59:06 +02:00
Joost Jager
0c9fcd790e
lndclient: move to github.com/lightninglabs/lndclient 2020-06-18 14:27:52 +02:00
Joost Jager
b61b886c16
loopd: group and clarify swap server parameters 2020-06-15 16:18:34 +02:00
carla
2ebbc78131
swap: add constructor for swap config 2020-06-08 12:53:07 +02:00
Joost Jager
8c544bf2ba
loopdb: store outgoing channel set
Upgrade the database schema to allow for multiple outgoing channels.
This is implemented as an on-the-fly migration leaving the old key in
place.
2020-05-21 11:22:04 +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
Andras Banki-Horvath
7a44eec36f loopin: refactor LoopIn to return struct instead of tuple 2020-05-04 18:19:20 +02:00
Joost Jager
12ae3d6a40
loopd: make maximum number of payment parts configurable 2020-04-27 16:32:12 +02:00
Joost Jager
5588876b48
loopd: extract client configuration 2020-04-27 16:30:44 +02:00
Oliver Gugger
3da09aac0e
client: use cached info to log connected node 2020-04-24 10:04:42 +02:00
Olaoluwa Osuntokun
bb38cf5c79
Merge pull request #165 from wpaulino/swap-server-over-tor
loopd: add SOCKS proxy config option to dial swap server over Tor
2020-03-15 15:53:49 -07:00
Wilmer Paulino
5b732d9012
loopd: add SOCKS proxy config option to dial swap server over Tor
This allows Loop users to further improve their privacy by not revealing
their source IP address. Note that the identity of the lnd node behind
Loop can still be revealed when performing a Loop In due to the swap
server extending an off-chain HTLC to the user.

Onion addresses don't yet exist for the swap servers, but they will be
added at a later time.
2020-03-06 16:40:30 -08:00
Oliver Gugger
3dd10f14dc
client: return miner fee of -1 if fee estimation fails 2020-03-06 10:13:16 +01:00
Joost Jager
535e964ec9
loopdb: migrate loop in channel to last hop
A database field was already in place to allow channel selection for
loop in. Unfortunately this field, which contains a short channel id,
isn't easily usable for controlling the loop server payment. Because of
non-strict forwarding, it is only possible to constrain a route to a
specific last hop pubkey.

This commit converts the existing field into a pubkey field.
2020-02-17 19:59:05 +01:00
Oliver Gugger
ccdbc3b21b
multi: thread new config values through client 2020-01-10 12:15:08 +01:00
Johan T. Halseth
d5c9a66c60
swap_server_client: call server with SwapPublicationDeadline set 2020-01-08 11:58:27 +01:00
Oliver Gugger
1650f3a18d
client+lsat: specify global timeout 2019-12-06 09:23:53 +01:00
Oliver Gugger
47bf510bd8
loopd: add RPC method to list tokens 2019-12-06 09:23:52 +01:00
Oliver Gugger
8cecae501c
lsat: add unary interceptor and simple store 2019-11-26 10:28:56 +01:00
Oliver Gugger
49cbe9aa63
loopd: add swap server TLS cert path
We need the ability to connect to a swap server that uses
a self-signed certificate. The LSAT proxy cannot proxy insecure
gRPC requests since they don't conform to the HTTP 1.1 standard.
Therefore the LSAT proxy fill only serve TLS connections.
This means, we need the TLS path option to specify the certificate
the test environment LSAT proxy uses.
2019-11-26 09:32:08 +01:00
Oliver Gugger
b574e344ea
multi: add persistent logger 2019-10-28 17:09:23 +01:00
Oliver Gugger
69f2af9fdc
loop+cmd: extract types into swap module 2019-10-09 16:14:06 +02:00
Oliver Gugger
36838cf7f4
multi: fix most obvious linter errors 2019-10-09 14:35:41 +02:00
Johan T. Halseth
0023d1a0da
looprpc: update to new server protos
We update to new set of server protos where new Terms calls are added.
Here static information will be returned from the server.

We no longer have a feebase+feerate, but get a final fee directly
returned by the server.
2019-10-08 22:28:20 +02:00
Oliver Gugger
489ab5620e
loopd: receive external HTLC flag in loop in quote request 2019-09-23 10:08:34 +02:00
Joost Jager
ecd36b921c
multi: base sweep fee estimate on actually used address type 2019-07-30 13:59:34 +02:00
Wilmer Paulino
47321ba4a4
loop: use default confirmation target for htlc sweep after expiry delta
In this commit, we introduce a delta from the on-chain HTLC's
expiration. Since clients are now able to specify a confirmation target
for the HTLC sweep, it's possible that the sweep doesn't confirm within
the intended target in the event of an increasing demand for block
space. Once the delta from the HTLC's expiration is reached, we'll begin
to use the default sweep confirmation target when sweeping the HTLC,
which should provide a timely confirmation. This is needed because if
the preimage has already been revealed, then we need to make sure we
sweep the HTLC before the server does.
2019-07-10 18:00:48 -07:00
Joost Jager
1b306ad425
loopdb: replace swap state enum by state data object
This commits lays down the foundation in the database for adding more
persistent state data to swaps.
2019-05-20 13:57:09 +02:00