Commit Graph

803 Commits (7ac6e26e90c4f5e086cfce356121da03c8bf0cdb)
 

Author SHA1 Message Date
Carla Kirk-Cohen 7ac6e26e90
Merge pull request #413 from Kixunil/config-file-error-handling
Improve error handling of config file
3 years ago
Martin Habovstiak 158e22f2a7 Documented the menaing of returned bool 3 years ago
Martin Habovstiak c00da1cf09 Renamed explicitConfig to hasExplicitConfig
`hasExplicitConfig` is considered cleaner.
3 years ago
Martin Habovštiak 2c1e437f26
Remove extra space
Co-authored-by: Yong <yy2452@columbia.edu>
3 years ago
Martin Habovstiak 84582bbb88 Improve error handling of config file
This makes two changes to handling of errors when configuration file
could not be loaded:

1. Only NotFound errors are considered OK - access errors and other FS
   issues are now treated as fatal.
2. Failing to load config file specified explicitly via `--configfile`
   option is alway a fatal error.

Rationale: If the configfile was specified explicitly then it indicates
the user really wishes to load it. While the user could want it to be
optionally loaded for extra configuration options, this can be
accomplished using an empty file.

If the config file was not specified explicitly then its' path was
computed from loop directory. If the file is inaccessible due to
permissions or other FS errors it's nearly certain other following
operations will fail as well. Failing early with a clear message is thus
beneficial.

This still leaves room for uncaught user error (e.g. mistakenly naming
config file inside loop dir as `loop.conf` instead of `loopd.conf`) but
it's greatly reduced and such error should be easier to identify.

(Indirectly) closes #412
3 years ago
Oliver Gugger a5aec7b2e9
Merge pull request #411 from guggero/falafel-js-stubs
looprpc: add JSON stubs for interacting with looprpc from a WASM context
3 years ago
Alex Bosworth 63f34ec45c
Merge pull request #410 from lightninglabs/update-to-v0.15.0-beta
version: bump version to v0.15.0-beta
3 years ago
Oliver Gugger 360e3347be
Travis+make: compile JSON/WASM stubs 3 years ago
Oliver Gugger ca9ec4cfe7
looprpc: generate JSON/WASM client stubs 3 years ago
Alex Bosworth 7c4c021c07
version: bump version to v0.15.0-beta 3 years ago
András Bánki-Horváth 91ad53a811
Merge pull request #387 from bhandras/loop_in_probe
loop-in:  allow clients to request server probes and extend loop-in quote with additional parameters for more accurate swap fees
3 years ago
Andras Banki-Horvath bfb191c233
docs: update release notes 3 years ago
Andras Banki-Horvath 9af6576dae
cli: add optional last hop to the loop in quote 3 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
Oliver Gugger 7d044f58e8
Merge pull request #409 from lightninglabs/grpc-gateway-update
multi: update lnd to master with grpc-gateway upgrade
3 years ago
Oliver Gugger a7fff0ac2f
multi: update lnd master with grpc-gateway upgrade
To make loop work with the latest lnd version inside of LiT, we need
to upgrade the grpc-gateway library to the same v2 version here too.
3 years ago
Carla Kirk-Cohen 7a3e3bdad0
Merge pull request #368 from yyforyongyu/fix-test
loopout: fix TestCustomSweepConfTarget
3 years ago
Carla Kirk-Cohen 478f242f91
Merge pull request #407 from carlaKC/355-surfaceloopingrpcerr
multi: surface grpc error codes from server to client
3 years ago
Alex Bosworth b9a3d1d920
Merge pull request #408 from lightninglabs/update-to-v0.14.2-beta
version: bump version to v0.14.2-beta
3 years ago
Alex Bosworth e4911a7269
version: bump version to v0.14.2-beta 3 years ago
Carla Kirk-Cohen 79100cc413
Merge pull request #405 from carlaKC/533-newserverstate
looprpc: add swap multiple swap scripts server state to rpc enum
3 years ago
Oliver Gugger 7091b90e95
Merge pull request #404 from guggero/fix-alpn-error
loopd: fix ALPN issue with Python
3 years ago
carla b8f1fd1c4e
release_notes: add grpc error code surfacing 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 94692678f3
looprpc: add swap multiple swap scripts server state to rpc enum
Add a new failure state that the server may send to the client.
This state is sent for loop in swaps where the client has
erroneously published multiple outputs for a loop in swap (this
could happen if an end user created an external tx with too many
outputs). Failing the swap server side protects users from potential
footguns where they publish the hltc then the server can claim more
money than was paid out off chain. This can never happen when the
loop client publishes the htlc because it only ever contains one
output.
3 years ago
Oliver Gugger 5178cd1158
release_notes: update with Python ALPN fix 3 years ago
Oliver Gugger e7ee29bd83
Merge pull request #403 from guggero/docker-rpc
looprpc: generate protos with docker
3 years ago
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 77f7b73570
looprpc: document missing CLI commands 3 years ago
Oliver Gugger 4e45c2908a
loopd: fix ALPN issue with Python
There is an open issue for Python gRPC clients that is
currently being debugged grpc/grpc#23172

It can be mitigated server-side by specifying h2 in the metadata header.
3 years ago
Oliver Gugger 86df44362f
make+looprpc: use Docker to compile and format protos 3 years ago
Oliver Gugger 67c81204f6
looprpc: extract REST annotations into yaml 3 years ago
Olaoluwa Osuntokun df5924f25a
Merge pull request #400 from Roasbeef/lnd-013
build: pin against lnd v0.13.0
3 years ago
Olaoluwa Osuntokun e24559fdc7
build: pin against lnd v0.13.0 3 years ago
Alex Bosworth 12d8fd0b76
Merge pull request #398 from lightninglabs/update-to-v0.14.1-beta
version: bump version to v0.14.1-beta
3 years ago
Alex Bosworth cec9a9fe06
version: bump version to v0.14.1-beta 3 years ago
Carla Kirk-Cohen 71eb88b2fa
Merge pull request #396 from carlaKC/subscribesingle-eof
loopin: handle SubscribeSingleInvoice termination
3 years ago
Carla Kirk-Cohen 087066bafe
Merge pull request #395 from carlaKC/390-uniquenames
looprpc: prefix server and lnd enums to create unique names
3 years ago
carla 0e72c2bf92
loopin: handle EOF case for SubscribeSingleInvoice
From lnd 0.13.0, the SubscribeSingleInvoice rpc will return an EOF
once it has served a final state to the stream. This is handled in
our lndclient wrapper by closing the channels that we send updates/
errors on. When we are exclusively consuming updates from these
streams, we don't need to handle this case because we will receive
our final update and exit. However, in the case where we continue
to listen on the update channels after consuming the final update,
we need to handle this EOF/closed channels case. This is done by
setting the channels to nil after they're closed so that we no
longer select on them but can continue waiting for our other cases
to complete.

We have similar handling in loopout's waitForHtlcSpendConfirmed.
3 years ago
carla 7dca93fd88
go.mod: bump to lndclient version that handles EOF 3 years ago
carla cae72b5848
loopin/test: move invoice updates to loopin test context 3 years ago
carla a3c8e54bf4
release_notes: note proto warning fixed 3 years ago
carla 1bdcc2cd41
looprpc: prefix server and lnd enums to create unique names 3 years ago
Alex Bosworth 9d3d9ce680
Merge pull request #393 from lightninglabs/bump-to-v0.14.0-beta
version: bump version to v0.14.0-beta
3 years ago
Alex Bosworth 2d48842605
version: bump version to v0.14.0-beta 3 years ago
Alex Bosworth beff8964f7
Merge pull request #391 from mauricepoirrier/patch-1
docs: typo
3 years ago
Maurice Poirrier 346ec2176c
docs: typo 3 years ago
Carla Kirk-Cohen 124eeea9d3
Merge pull request #378 from carlaKC/383-cancelation
loopout: Add swap cancelation for swaps that cannot route off-chain
3 years ago
carla 6350d873e0
release_notes: add swap cancelation feature 3 years ago