Commit Graph

73 Commits (master)

Author SHA1 Message Date
George Tsagkarelis 0914074b10
loop: integrate sweepbatcher to loopout flow 3 months ago
George Tsagkarelis b43fa11cc1
utils: add htlc & swap related helpers 3 months ago
sputn1ck 4d558b1418
loop: expose server grpc connection 3 months ago
Slyghtning caa646367f
loopin: finalize swap if unsifficient confirmed funds 5 months ago
Slyghtning c0b419346c
loopin: restore abandon chan on restart 5 months ago
Slyghtning 5e91c446b8
loopd: abandon loop-ins 5 months ago
Oliver Gugger 08026dab93
multi: update linter, fix issues 7 months ago
Slyghtning 20316042d9
trivial: clean up typos and comments 8 months ago
George Tsagkarelis 921f4d06e7
multi: integrate initiator string to various calls 9 months ago
sputn1ck 270bc3104e
multi: add sql stores to loopd
This commit adds the ability to choose between different sql stores
for loopd. The default is sqlite, but it can be changed to postgres.
10 months ago
sputn1ck becc8a38d8
multi: use context in loopdb call
This commit adds a context to our loopdb interface, which we should use
in the sqlite migration.
10 months ago
sputn1ck 4baf88c414
multi: fix linter issues
This commit fixes outstanding linter issues, that we're not found by
running `make lint` locally. The linter issues were found by running
`docker run -v $(pwd):/build loop-tools golangci-lint run --whole-files`

I added the `revive` to the excludes as it would be to much of a
refactor and IMO seems unneccesary. E.g.
`interface.go:222:6: exported: type name will be used as
loop.LoopInTerms by other packages, and that stutters; consider
 calling this InTerms (revive)`. I think `loop.LoopInTerms` is fine.
1 year ago
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.
1 year ago
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.
1 year ago
Andras Banki-Horvath 5d7b0abdf5
loopout: add unit test for the MuSig2 sweep case 2 years ago
Andras Banki-Horvath ce3026daa9
client: LoopInQuote to support v3 htlc for fee estimate 2 years ago
Andras Banki-Horvath bf59159ddb
client: LoopOutQuote to support estimate using v3 htlc 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 9610becebd
multi: add the aggregate internal pubkey to the v3 htlc 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 1d1354d2cb
config: make total payment timeout and retries configurable 2 years ago
Andras Banki-Horvath b3d8f5f096
loopd: close dbs when the daemon stops 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
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
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.
3 years ago
carla 16111352a8
multi: add cancel swap function to execute config 3 years ago
Oliver Gugger fdbf7e95e1
client: fix double hex encoding of node pubkey 3 years ago
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.
3 years ago
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.
3 years ago
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.
4 years ago
Andras Banki-Horvath 9fdd531130
swap: add HTLC script version 4 years ago
Joost Jager 43323ffbe2
loopout: extend htlc expiry based on conf target 4 years ago
carla cd2b08aec6
multi: consume and log sever state updates 4 years ago
Joost Jager 1869ad670f
looprpc: expose server message to clients 4 years ago
Joost Jager 8b215edaa2
multi: create init result structs 4 years ago
Joost Jager 68012f051a
loopout: create LoopOutSwapInfo struct 4 years ago
Joost Jager 0c9fcd790e
lndclient: move to github.com/lightninglabs/lndclient 4 years ago
Joost Jager b61b886c16
loopd: group and clarify swap server parameters 4 years ago
carla 2ebbc78131
swap: add constructor for swap config 4 years ago
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.
4 years ago
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.
4 years ago
Andras Banki-Horvath 7a44eec36f loopin: refactor LoopIn to return struct instead of tuple 4 years ago
Joost Jager 12ae3d6a40
loopd: make maximum number of payment parts configurable 4 years ago
Joost Jager 5588876b48
loopd: extract client configuration 4 years ago
Oliver Gugger 3da09aac0e
client: use cached info to log connected node 4 years ago
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
4 years ago
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.
4 years ago