Commit Graph

38 Commits (87b02b77151ef2238d4a0b80b49d62becf9a3a8a)

Author SHA1 Message Date
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.
4 years ago
carla eb6b476469
looprpc: add autoloop parameters to rpc server 4 years ago
carla 8166d936e1
multi: add opt-in automated swap dispatch to liquidity manager 4 years ago
carla 7b56804bbe
multi: move label validation to rpc and simplify validation function
Previously labels with reserved prefixes were added to provide us
with a way to identify automatically dispatched loops. This commit moves
the validation of these labels to the rpc level so that it will only
apply to user-initiated swaps.
4 years ago
carla f23a527927
looprpc: add fee and backoff parameters to rpc 4 years ago
carla 7e9034b2ff
liquidity: return OutRequest from swap suggestions and set fees
This commit updates swap suggestions to return loop out requests with
sufficient fields populated so that a loop out can directly be
dispatched from a suggestion. This requires setting of fees an min
sweep conf targets (our htlc conf target and addresss will be set by
the daemon's client rpc server if we do not provide them). We also do
some test refactoring so that we can more easily test the suggest swaps
endpoint.
4 years ago
carla 6b93c70b8a
looprpc: add swap suggestions endpoint 4 years ago
carla 6fcbf54c02
looprpc: add get and set liquidity parameters endpoints 4 years ago
carla ce10cc7959
liquidity: add manager with updatable parameters 4 years ago
carla 852f459391
multi: add htlc confirmations parameter to client loop out request 4 years ago
carla 8da0ea6048
looprpc: add label to swap creation and display in list swaps 4 years ago
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.
4 years ago
Joost Jager 43323ffbe2
loopout: extend htlc expiry based on conf target 4 years ago
Joost Jager e72d998e78
loopout: show expiry range in terms 4 years ago
Joost Jager 8d1ec50fa7
looprpc: split quote message 4 years ago
Joost Jager 24099aa4f9
looprpc: split terms message 4 years ago
Joost Jager 1869ad670f
looprpc: expose server message to clients 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 83f25c98a3
loopd: return missing p2wsh loop out address 4 years ago
Oliver Gugger 506d0c2257
loopd: refactor into Start/Stop methods 4 years ago
Joost Jager ccec719423
looprpc: add outgoing channel set restriction
Expose the new channel set restriction on the loopd client rpc.
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 936bb851f2 loopin: fix htlc address in LoopIn SwapResponse 4 years ago
Andras Banki-Horvath 0aa978bd09 loopin: modify internally published htlc to use p2wsh 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 62f654eef1 client: make ListSwaps thread safe 4 years ago
Andras Banki-Horvath 7a44eec36f loopin: refactor LoopIn to return struct instead of tuple 4 years ago
carla fc99c8b320
multi: add confirmation target to loop in 4 years ago
carla f726fc2bc8
loopd: add missing zero case to validateConfTarget
Update validate function to return default target for zero value
confirmation targets, as indicated by the comment. This change
introduces a behaviour change for direct rpc calls to loopd (ie,
those not made by the loop cli tool). Previously, these calls
would fail and indicate that the conf target must be > 2, now
they will succeed with the default conf target. The loop cli
tool is unaffected because we already set the default value.

When clients upgrade from a previous version of loopd which did
not have this check, preexisting loops will be unaffected, because
loop ins had the default of 6 confirmations set, and loop outs with
<2 conf target would not have been created.
4 years ago
carla 1f5aeff45f
multi: unify default sweep/htlc conf targets
Create a HtlcConfTarget which is used as a default for quote
and loop in. Update loop out quote to use the existing var
rather than just 6 inline.
4 years ago
Andras Banki-Horvath f4be20cc5e loopd: add missing mutex unlock and fix subtle reace condition 4 years ago
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.
4 years ago
Oliver Gugger b694a76be0
looprpc+loopd: deprecate string ID 4 years ago
Oliver Gugger 3e25bc3174
loopd+looprpc: add REST compatible status calls 4 years ago
Oliver Gugger 403b4097de
loopd: move global state into server state 4 years ago
Johan T. Halseth b2d1d99521
loopd call swapserver with SwapPublicationDeadline set 4 years ago
Johan T. Halseth 644b5b16f7
cmd+loopd: move loopd to new folder loopd 4 years ago