Commit Graph

58 Commits (803773bb65a5bae560151896a86bcc161c47ca9d)

Author SHA1 Message Date
Oliver Gugger 803773bb65
loop+loopd: fix linter after re-generating protos
Apparently re-generating the protos caused the linter to pick up on
fields that are now deprecated. We need to fix that with a few comments.
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
Carla Kirk-Cohen d6db6184f3
Merge pull request #348 from yyforyongyu/344-loop-quote
looprpc: add verbose resp in loop quote
3 years ago
Carla Kirk-Cohen 4d9d398b23
Merge pull request #349 from ellemouton/validate-dest-addr-network
loopd: verify that dest addr is for correct chain
3 years ago
Elle Mouton 5399e60554 loopd: verify that dest addr is for correct chain
This commit adds verification to the loop out request to ensure that the
formatting of the specified destination address matches the network that
lnd is running on.
3 years ago
Elle Mouton 5c34dd1177 loopd: refactor loop out request validation
This commit moves loop out request validation for labels and
confirmation targets into its own function for the purpose of easy
testing and also to make the additions of future request validation easy
to add and test.
3 years ago
yyforyongyu c4d46a24a0
looprpc: add conf_target to loop in/out quote resp 3 years ago
carla 90561f8ac7
multi: add fee percentage to rpc 3 years ago
carla dd1a2de731
multi: add flat fee percentage to autoloop 3 years ago
carla c778124718
liquidity: move fees behind interface 3 years ago
carla b9aae4f8f9
loop: add peer rules to set rule command 3 years ago
carla 949e76bb2a
looprpc: add peer level rules to rpc 3 years ago
carla 22bd4cabb4
looprpc: add disqualified channels to suggest swaps response 3 years ago
carla 7c4d71b175
liquidity: add reasons for autoloops not executing 3 years ago
carla 7ba1821696
liquidity: fail suggest swaps when no rules are set
In an effort to surface more information about why autoloop is not
executing, we add an error when suggest swaps is called with no rules.
In other cases we can surface a reason enum with each rule that is set,
but in the case where we have no rules, there are no results to
accompany with reasons.
3 years ago
carla 71ace95ac8
loop: rename autoloop specific parameters 3 years ago
carla a168ba3400
liquidity: rename auto out boolean to autoloop 3 years ago
carla 74f2c96810
looprpc: add custom client sizes for autoloop 3 years ago
carla 3f0fc14c34
liquidity: allow custom autoloop swap sizes within the server's limits 3 years ago
Oliver Gugger 8758d00862
loopd: add initiator to swap requests 4 years ago
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