Commit Graph

10131 Commits

Author SHA1 Message Date
Glen Cooper
a9673a408d
Update INSTALL.md
latest version of Go has increase from 1.13 to 1.15
2020-08-15 09:55:27 +00:00
yyforyongyu
89c3eb7765
itest: test macaroon creation/deletion 2020-08-14 12:36:21 +08:00
yyforyongyu
c8a2916d91
lncli: support list/delete on marcaroon IDs 2020-08-14 12:36:21 +08:00
yyforyongyu
c0e2513350
lnrpc+rpcserver: support list/delete on marcaroon IDs 2020-08-14 12:33:13 +08:00
Conner Fromknecht
fc12656a1a
build/version: bump to v0.11.0-beta.rc4 2020-08-13 19:42:02 -07:00
Olaoluwa Osuntokun
18f32f3006
Merge pull request #4534 from Roasbeef/btcwallet-dust-fix
build: update to btcwallet version with dust bug fix
2020-08-13 18:33:36 -07:00
Olaoluwa Osuntokun
6fcdae65c7
build: update to btcwallet version with dust bug fix
In this commit, we update our btcwallet dep to the latest version. This
version includes a bug fix for dust calculation. Without this bug fix,
users would potentially significantly overpay on fees, as dust was
computed using the desired fee of the transaction rather than the min
relay fee.
2020-08-13 17:16:52 -07:00
Conner Fromknecht
1124d79922
build/version: bump to 0.11.0-beta.rc3 2020-08-13 15:45:15 -07:00
Olaoluwa Osuntokun
1fb71a1881
Merge pull request #4533 from Roasbeef/btcwallet-update
btcwallet: update btcwallet version, ensure ConfirmedBalance holds the coin select mutex
2020-08-13 15:26:54 -07:00
Olaoluwa Osuntokun
3380db12b4
Merge pull request #4521 from Roasbeef/mpp-hop-hints
lnrpc/invoicesrpc: extend hop hint selection to account for MPP
2020-08-13 15:25:19 -07:00
Olaoluwa Osuntokun
174faa7955
lnrpc/invoicesrpc: only try to add hop hints if we have channels 2020-08-13 14:47:27 -07:00
Olaoluwa Osuntokun
f6d6d6609f
lnrpc/invoicesrpc: extend hop hint selection to account for MPP
In this commit, we update the hop hint selection to account for the fact
that with MPP, a single payment may consume multiple channels. As is, if
a user only has two 0.5 BTC channels, and tries to make a 1 BTC channel,
then the current logic won't include any hop hints.

To solve this, we first add all the channels which in isolation can
carry the payment in question. We then do another pass that accumulates
channels until either we reach our hop-hint limit, or the total
bandwidth that we've accumulate is greater than 2x the payment amount.
2020-08-13 14:47:25 -07:00
Olaoluwa Osuntokun
f42d7780f1
lnrpc/invoicesrpc: refactor out hop hint accumulation into a new function 2020-08-13 14:47:24 -07:00
Olaoluwa Osuntokun
ab055efa56
lnrpc/invoicesrpc: move hop hint eligibility for chan to new method 2020-08-13 14:47:23 -07:00
Olaoluwa Osuntokun
7a83731edb
lnrpc/invoicesrpc: move hop hint selection into new method 2020-08-13 14:47:22 -07:00
Olaoluwa Osuntokun
e860a9e23d
lnwallet: ensure ConfirmedBalance holds the coin select mutex
In this commit, we make a new wrapper method around the internal
`WalletController` method to ensure it holds the coin select mutex while
the balance is being computed.
2020-08-13 13:01:00 -07:00
Olaoluwa Osuntokun
bb2e7358cf
build: update to latest btcwallet version
This version fixes a race condition related to some of the new coin
selection calls.

Fixes #4532.
2020-08-13 12:59:54 -07:00
Conner Fromknecht
2e175f54ef
Merge pull request #4528 from yyforyongyu/fix-typo
trivial: typo fix
2020-08-13 12:06:25 -07:00
Graham Krizek
86a0609ecf
config+lnd+cert: add --tlsdisableautofill to prevent information leaks.
This adds in a new boolean flag that when set, prevents LND from writing the system hostname and network interface IPs to the TLS certificate. This will ensure privacy for those that don't want private IP addresses to be exposed on a public facing LND node.
2020-08-13 09:24:39 -05:00
Johan T. Halseth
85b53c357f
htlcswitch: use kvdb.View for loading fwdpkgs
Not necessary to open a write tx.
2020-08-13 14:36:48 +02:00
Conner Fromknecht
4674573e9a
Merge pull request #4525 from guggero/no-restore-close
rpcserver: no manual close of restored channels
2020-08-12 21:17:49 -07:00
Olaoluwa Osuntokun
7c11951b3e
Merge pull request #4529 from cfromknecht/txnotifier-double-cancel
chainntnfs/txnotifier: remove events on teardown
2020-08-12 21:03:29 -07:00
Conner Fromknecht
927f0989a4
Merge pull request #4526 from Roasbeef/db-split-peer-fix
lnd: properly pass peer remote db for graph, local db for rest
2020-08-12 17:49:46 -07:00
Conner Fromknecht
ff7bfb492a
chainntnfs/txnotifier: remove events on teardown
If a concurrent call to cancel is made while the notifier is shutting
down, this would cause a panic (close of closed channel) since the
events are not removed from the notification sets.
2020-08-12 17:42:50 -07:00
yyforyongyu
57f7115437
trivial: typo fix 2020-08-13 07:33:52 +08:00
Olaoluwa Osuntokun
4603b3f981
lnd: properly pass peer remote db for graph, local db for rest
In this commit, we fix a mistake in the split for the new `peer`
package/struct when instantiating the config needed. The existing code
had the DB's swapped. In this commit, we fix this to pass the remote DB
for generic channeldb access, and the local DB for channel graph access.
2020-08-12 14:07:43 -07:00
Oliver Gugger
76cd94c277
lntest: make sure restored chans can't be closed 2020-08-12 16:49:39 +02:00
Oliver Gugger
0655a1bcfb
itest: move channel backup tests to own file 2020-08-12 16:06:34 +02:00
Oliver Gugger
fe834bc0c0
rpcserver: don't allow closing restored channels
To avoid the scenario where the user tries to force close a channel too
early that was restored through SCB, we check the channel status in the
RPC server already. If a restored channel cannot connect to its peer and
mark it as local data loss the channel arbitrator would try to publish
the commitment TX it does not have and crash.
2020-08-12 16:03:35 +02:00
nsa
3791c9efcb lnd: removing activeNetParams global, passed around instead via configs
This commit removes the activeNetParams global in chainparams.go. This
is necessary to isolate code from the lnd package so we can import it
for use in tests, other projects, etc.
2020-08-11 11:41:24 -04:00
yyforyongyu
f362f7670b
macaroons: specify root key ID in bakery 2020-08-11 19:17:48 +08:00
Conner Fromknecht
37a29b4869
Merge pull request #4496 from cfromknecht/moar-whitelist
lntest/itest: update error whitelist
2020-08-10 12:31:22 -07:00
Conner Fromknecht
687da86345
build/version: bump version to v0.11.0-beta.rc2 2020-08-07 19:51:53 -07:00
Olaoluwa Osuntokun
38265b9a46
Merge pull request #4348 from Roasbeef/etcd-local-graph-db
multi: create split local/remote database structure
2020-08-07 19:50:02 -07:00
Conner Fromknecht
0e935eadc0
lntest/itest: add failed getting UTXO error to whitelist 2020-08-07 19:29:35 -07:00
Olaoluwa Osuntokun
f58b00ef55
multi: split database storage into remote and local instances
In this commit, we split the database storage into two classes: remote
and local data. If etcd isn't active, then everything is actually just
local though we use two pointers everywhere. If etcd is active, then
everything but the graph goes into the remote database.
2020-08-07 18:44:02 -07:00
Olaoluwa Osuntokun
7355c8ba3a
lncfg: add new GetBackends which returns active DB backends
In this commit, we modify the existing `GetBackend` method to now be
called `GetBackends`. This new method will populate a new `RemoteDB`
attribute based on if the replicated backend is active or not. As is,
the local backend is used everywhere. An upcoming commit will once again
re-enable the remote backend, in a hybrid manner.
2020-08-07 18:44:00 -07:00
Olaoluwa Osuntokun
6a6521bba0
Merge pull request #4507 from Kixunil/patch-2
Updated deprecation message of noseedbackup
2020-08-06 18:53:53 -07:00
Olaoluwa Osuntokun
ef237c549a
Merge pull request #4511 from guggero/browser-websocket-fix
Bugfix: Allow browsers to send macaroon in WebSocket calls
2020-08-06 18:24:24 -07:00
Olaoluwa Osuntokun
fcb41dae37
Merge pull request #4475 from guggero/travis-windows
travis: add integration test on Windows
2020-08-06 18:15:02 -07:00
Conner Fromknecht
df5d334985
lntest/itest: add chain notifier shutting down to whitelist 2020-08-06 12:16:42 -07:00
Conner Fromknecht
eb1205d399
lntest/itest: add WS connection reset to error whitelist 2020-08-06 12:16:41 -07:00
Conner Fromknecht
1b660c7387
lntest: add canceled adding new channel to whitelist 2020-08-06 12:16:41 -07:00
Conner Fromknecht
de74798c12
lntest/itest: add whitelist entry for block hash fetch 2020-08-06 12:16:41 -07:00
Oliver Gugger
af8ffc9764
lntest: add WS test case with custom header macaroon 2020-08-06 12:11:20 +02:00
Oliver Gugger
c7cb2c0a78
docs: describe how to use WebSockets with the REST API
We add a new document that shows two examples of how to use the
WebSocket REST API with JavaScript.
2020-08-06 12:09:15 +02:00
Oliver Gugger
c5c28564e9
lnrpc: add macaroon workaround for WebSockets in browsers
For security reasons, browsers are limited in the header fields they can
send when opening a WebSocket connection. Specifically, the macaroon
cannot be sent in the Grpc-Metadata-Macaroon header field as that would
be possible for normal REST requests. Instead we only have the special
field "Sec-Websocket-Protocol" that can be used to transport custom
data. We allow the macaroon to be sent there and transform it into a
proper header field for the target request.
2020-08-06 12:07:07 +02:00
Martin Habovštiak
c4f739ac8a config: Updated deprecation message of noseedbackup
According to the recent discussion `noseedbackup` is not deprecated.
This change clarifies the message about deprecation.
Also fixes a typo.

Closes #4499
2020-08-05 21:29:24 +02:00
Conner Fromknecht
24eba7013c
Merge pull request #4509 from CandleHater/patch-2
rpc: add missing space to error message
2020-08-05 11:38:09 -07:00
Conner Fromknecht
0e558cfbed
Merge pull request #4506 from Roasbeef/free-list-sync-config-fix
config: make bbolt freelist settings mutually exclusive
2020-08-05 11:37:27 -07:00