Commit Graph

83 Commits (692620d367e9a6c4506ed7ccf233e0f7a3b523f1)

Author SHA1 Message Date
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 0212a41ed0
liquidity: make swap suggestions fee-aware 4 years ago
carla 1d8609bae3
liquidity: add sweep fee limit and confirmations to suggestions
To decide whether we event want to attempt a swap, we add a fee limit
that we check against our estimate for the current number of
confirmations we want our sweep to confirm in. If fees are higher than
this limit, we do not suggest swaps.
4 years ago
carla 7740231bac
liquidity: make swap suggestions aware of ongoing swaps 4 years ago
carla ad8b5d0552
liquidity: add clock for mocking time in tests 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 ad2b37e709
loopd: add suggestions endpoints to macaroons 4 years ago
Oliver Gugger 688659421b
mod+loopd: bump to lnd v0.11.1-beta.rc3
To make sure we can use the latest version of loop in LiT, we need to
make sure loop compiles against the actual v0.11.1 branch of lnd. There
were some conflicting changes to the macaroon service that didn't make
it to the branch that we need to roll back. Those changes don't affect
loop at all as we were always using the default root key ID anyway.
4 years ago
Oliver Gugger 8c5bcf7c50
config: expand macaroonpath flag 4 years ago
Oliver Gugger 617964e25f
loopd: allow loopd to be used as external subserver
When loopd runs in the same process as lnd (in LiT), it hooks itself
into lnd's RPC server as an external subserver. But because the user
should still be able to use the default loop macaroon, the loop daemon
must be able to validate its own macaroons as lnd's macaroon service
doesn't know the root key for it.
4 years ago
Oliver Gugger 751c70e6c7
loopd: add macaroon authentication to the daemon's server connection
To secure access to loop's RPC server, we add a macaroon authentication
service and its gRPC interceptors to the daemon's server connection.
4 years ago
Oliver Gugger ff17553f3b
mod+loopd: update to lnd 0.11.1
We update to the newest version of lnd so we can use the updated
macaroon service.
NOTE: This is a compile time dependency update only, no RPC level update
is required.
4 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
Oliver Gugger a8d93bec6a
loopd: add TLS to the daemon's server connection 4 years ago
Oliver Gugger 17e0165d4c
loopd: add TLS config to listenerCfg struct
As a preparation to be able to listen on a TLS enabled listener, we add
a TLS config parameter to the listener setup functions.
4 years ago
carla 6b93c70b8a
looprpc: add swap suggestions endpoint 4 years ago
carla 340766fbb5
liquidity: add swap suggestions endpoint to manager 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
Andras Banki-Horvath 9fdd531130
swap: add HTLC script version 4 years ago
carla ed04120a1a
loopd: set network in default config path 4 years ago
carla d229a1a607
config: add default network value 4 years ago
Carla Kirk-Cohen 048a365e02
Merge pull request #267 from carlaKC/215-readyonstart
loopd: wait for lnd to be synced before starting
4 years ago
carla b4e4d5c73d
loopd: block until lnd is synced to chain 4 years ago
carla d7150d5556
loopd: add data, loop and config options 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
Joost Jager b61b886c16
loopd: group and clarify swap server parameters 4 years ago
Oliver Gugger c2e513ecd0
loopd: remove short flags to avoid collision 4 years ago
Oliver Gugger 74b3580e01
loopd+cmd/loopd: rename main Start function to Run 4 years ago
Oliver Gugger 774a44fac1
loopd: add StartAsSubserver method and started flag 4 years ago
Oliver Gugger 506d0c2257
loopd: refactor into Start/Stop methods 4 years ago
Oliver Gugger 215e5b99d6
loopd: extract daemon into struct 4 years ago
Oliver Gugger e696a38ec8
loopd: export Config struct 4 years ago
Oliver Gugger 5f70a05463
loopd: export DefaultConfig 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
Joost Jager c62acd5b85
lndclient: add outgoing channel set restriction
Expose the channel set restriction that was introduced in LND 0.10.1 on
the proxy object.
4 years ago
Andras Banki-Horvath 936bb851f2 loopin: fix htlc address in LoopIn SwapResponse 4 years ago
Joost Jager 27a2b1a775
loopd: fix setting of max parts 4 years ago