Commit Graph

120 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
Oliver Gugger 45dbd582d1
multi: bump lnd min version to v0.11.1-beta
The version v0.10.1-beta of lnd is quite old with v0.13.0-beta just
being published as RC2. Maintaining backward compatibility in the
lndclient library is quite an effort. We decided to merge the v0.11.1
branch into master meaning that all our projects now have this minimum
version requirement.
3 years ago
Oliver Gugger 32f1f2657b
multi: bump lnd to version v0.13.0-beta.rc2
This commit bumps the _compile time_ version of lnd to v0.13.0-beta.rc2.
This does not have an effect on the user, the run time backward compatibility
will be preserved. Only the next commit will bump that minimum version.
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
Oliver Gugger 39c8c9278d
loopd+loopdb: add timeout to DB open
To make sure we don't just block for forever if another Loop daemon
process is already running, we add a timeout and error out if obtaining
the unique file lock fails after 5 seconds.
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 Kirk-Cohen fd4214e68d
Merge pull request #333 from carlaKC/autoloop-3-peerrules
autoloop: add peer level rules for aggregate liquidity management
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
Andras Banki-Horvath 591a244867
loop: add sane default for --lnd.macaroonpath 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
Oliver Gugger 2a089d131e
loopd: all only specifying one lnd macaroon
Fixes #299 by allowing only one macaroon to be specified in the
--lnd.macaroonpath config option/command line flag.
3 years ago
carla 476ae39ce9
multi: make server side restrictions function generic 3 years ago
carla 24aa429aa0
liquidity: rename ticker and default to autoloop 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 Kirk-Cohen d85cc010b0
Merge pull request #327 from carlaKC/325-waitunlocked
loopd: wait for lnd to be unlocked on startup
3 years ago
carla 3818e4576e
loopd: wait for lnd to be unlocked before starting 3 years ago
carla 6c2d88b3a5
multi: bump lndclient to version with wait for unlock 3 years ago
Oliver Gugger 1a57e03df4
loopd: pass macaroon root key ID in context 3 years ago
Oliver Gugger fb9034220c
mod: update lnd to v0.12.0 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 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