Commit Graph

9657 Commits

Author SHA1 Message Date
Oliver Gugger
6f702a43aa
watchtower: extend and rename SecretKeyRing 2020-05-20 09:05:15 +02:00
Oliver Gugger
b0cb110e86
watchtower: rename SessionPrivKey to SessionKeyECDH 2020-05-20 09:05:15 +02:00
Oliver Gugger
140731af00
lnd+watchtower: rename NodePrivKey to NodeKeyECDH 2020-05-20 09:05:14 +02:00
Oliver Gugger
7f1b865b53
multi: rename server's identityPriv to identityECDH 2020-05-20 09:05:14 +02:00
Oliver Gugger
cf0380ac81
keychain: add single key wrapper implementations 2020-05-20 09:04:05 +02:00
Oliver Gugger
6cf1844b0e
keychain: add new interface methods to wallet 2020-05-20 09:04:04 +02:00
Oliver Gugger
d6ba0a5b85
keychain: add new abstraction interfaces 2020-05-20 09:04:04 +02:00
Conner Fromknecht
afc60353a1
Merge pull request #4213 from carlaKC/txdetails-addlabel
lnrpc: add optional labels to on chain transactions
2020-05-19 14:44:55 -07:00
carla
d021eae392
itest: add label check to sweep coins test
Add a label to our sweep all coins itest and check that it is correctly
set.
2020-05-19 13:31:51 +02:00
carla
e8ca306f12
lnrpc: display transaction label in transaction details 2020-05-19 13:31:51 +02:00
carla
52137459e4
lncli: add label flag to send many and send coins 2020-05-19 13:31:51 +02:00
carla
93a1b61218
walletrpc: add transaction label to PublishTransaction 2020-05-19 13:31:51 +02:00
carla
099161ed0b
multi: add label to WalletController SendOutputs and dependent rpcs
Add a label parameter to the WalletController SendOutputs endpoint and
update rpcs that use it to allow optional provision of labels.
2020-05-19 13:31:51 +02:00
carla
75370ce6b4
multi: update WalletController PublishTransaction to include label
Add label parameter to PublishTransaction in WalletController
interface. A labels package is added to store generic labels that are
used for the different types of transactions that are published by lnd.

To keep commit size down, the two endpoints that require a label
parameter be passed down have a todo added, which will be removed in
subsequent commits.
2020-05-19 13:30:00 +02:00
Olaoluwa Osuntokun
c2516d9352
Merge pull request #4286 from guggero/remove-global-cfg
multi: remove global cfg variable
2020-05-18 19:45:43 -07:00
Olaoluwa Osuntokun
34e21eca78
Merge pull request #4291 from wpaulino/btcd-getblock-compat
build: update to latest btcd and btcwallet versions
2020-05-18 18:25:01 -07:00
Wilmer Paulino
db2589ee8d
itest: add disconnection error to whitelist 2020-05-18 16:14:31 -07:00
Oliver Gugger
4d3bd6f178
Merge pull request #4295 from guggero/fix-queue
mod: update to queue/v1.0.4
2020-05-18 14:51:16 +02:00
Carla Kirk-Cohen
bdb6a3cc7b
Merge pull request #4294 from carlaKC/actions-updatecheckout
github: update checkout action to v2
2020-05-18 14:05:04 +02:00
Oliver Gugger
bd40f73be3
mod: update to queue/v1.0.4 2020-05-18 11:52:49 +02:00
carla
d29271f1da
github: update checkout action to v2
Checkout v1 has a known flake:
https://github.com/actions/checkout/issues/23#issuecomment-572688577.

For our linter to pass, we need to checkout our full history (default
depth is 1 commit). We could set fetch-depth, but we will eventually
move that depth past the linter's start point commit and need to
implement another fix. Indead, we add an extra step in our linter to
fetch full history so that the linter reference commit is found.
2020-05-18 11:39:09 +02:00
Wilmer Paulino
0e3fc4c7a6
build: update to latest btcd and btcwallet versions
This update introduces backwards compatibility for btcd nodes running
versions prior to v0.20.1-beta.
2020-05-15 17:00:16 -07:00
Olaoluwa Osuntokun
280bf8d26c
Merge pull request #4226 from breez/fix-chainrpc-crash
Fix crash when ChainNotifier is being accessed too early.
2020-05-15 16:17:40 -07:00
Olaoluwa Osuntokun
02f8a0db2b
Merge pull request #4277 from joostjager/fix-signer-err
lnwallet: return signer error
2020-05-15 16:15:50 -07:00
Olaoluwa Osuntokun
c6ae06242d
Merge pull request #4274 from wpaulino/wtclient-add-tower-filter
wtclient: load missing info into client sessions upon new tower
2020-05-15 16:13:22 -07:00
Wilmer Paulino
c760700545
wtmock: prevent race conditions by not using ClientSession pointers
These race conditions originate from the mock database storing and
returning pointers, rather than returning a copy.

Observed on Travis:

WARNING: DATA RACE
Read at 0x00c0003222b8 by goroutine 149:
  github.com/lightningnetwork/lnd/watchtower/wtclient.(*sessionQueue).drainBackups()
      /home/runner/work/lnd/lnd/watchtower/wtclient/session_queue.go:288 +0xed
  github.com/lightningnetwork/lnd/watchtower/wtclient.(*sessionQueue).sessionManager()
      /home/runner/work/lnd/lnd/watchtower/wtclient/session_queue.go:281 +0x450

Previous write at 0x00c0003222b8 by goroutine 93:
  github.com/lightningnetwork/lnd/watchtower/wtclient.getClientSessions()
      /home/runner/work/lnd/lnd/watchtower/wtclient/client.go:365 +0x24f
  github.com/lightningnetwork/lnd/watchtower/wtclient.(*TowerClient).handleNewTower()
      /home/runner/work/lnd/lnd/watchtower/wtclient/client.go:1063 +0x23e
  github.com/lightningnetwork/lnd/watchtower/wtclient.(*TowerClient).backupDispatcher()
      /home/runner/work/lnd/lnd/watchtower/wtclient/client.go:784 +0x10b9
2020-05-14 15:39:03 -07:00
Wilmer Paulino
f6f0d3819f
wtclient: test case re-add removed tower 2020-05-14 13:48:08 -07:00
Wilmer Paulino
b195d39ad7
rpc: use existing rpc logger for wtclientrpc
The logger string used to identify the wtclient and wtclientrpc loggers
was the same, leading to being unable to modify the log level of the
wtclient logger as it would be overwritten with the wtclientrpc's one.
To simplify things, we decide to use the existing RPC logger for
wtclientrpc.
2020-05-14 13:35:03 -07:00
Wilmer Paulino
ec5c941512
wtclient: filter out inactive sessions upon adding existing/new tower 2020-05-14 13:35:02 -07:00
Wilmer Paulino
75c2ebd794
wtclient: load missing info into client sessions upon new tower
This addresses a potential panic in where we relied on this missing info
being populated.
2020-05-14 13:35:00 -07:00
Wilmer Paulino
01ab551b22
wtclient: refactor existing candidate session filtering into method 2020-05-14 13:34:59 -07:00
Olaoluwa Osuntokun
8b09ac07d3
Merge pull request #4276 from guggero/actions-failure
github: remove continue-on-error
2020-05-14 11:58:23 -07:00
Oliver Gugger
4261d3f5af
lnd: remove global cfg variable 2020-05-14 16:18:02 +02:00
Oliver Gugger
50e86f88fe
rpcserver+subrpcserver: don't use global cfg 2020-05-14 16:18:02 +02:00
Oliver Gugger
7c1304b31c
peer: don't use global cfg 2020-05-14 16:18:02 +02:00
Oliver Gugger
4343f9e9a6
server+rpcserver: don't use global cfg 2020-05-14 16:18:01 +02:00
Oliver Gugger
7e4d0aba2f
lnd+rpcserver: don't use global cfg 2020-05-14 16:18:01 +02:00
Oliver Gugger
7ce70321ac
fundingmgr+server: don't use global cfg 2020-05-14 16:18:01 +02:00
Oliver Gugger
d44f205e3f
multi: move global networkDir to cfg 2020-05-14 14:47:35 +02:00
Oliver Gugger
85d5cdfbfd
multi: move global registeredChains to cfg 2020-05-14 14:47:35 +02:00
Oliver Gugger
a7e78112b7
multi: allow external subservers to register themselves
With two new callbacks we allow processes that use lnd as a library
to register additional gRPC and REST subservers to the main server
instances that lnd creates.
2020-05-14 14:47:33 +02:00
Oliver Gugger
620eaa3199
lnd+cmd: move interrupt into cmd
If the main package is used as a library, we don't want it to
register interrupt signals itself. Rather we want to pass in the
shutdown channel manually. We do this in the cmd now.
2020-05-14 14:37:51 +02:00
Oliver Gugger
7158103d4d
lnd+config: move config parsing to cmd
Now that we have access to the configuration parsing outside of the
main package, we can move the actual parsing to the command line
package.
2020-05-14 14:37:51 +02:00
Oliver Gugger
3b2188d689
multi: move exported items to lncfg 2020-05-14 14:37:51 +02:00
Oliver Gugger
25f8a0804d
config: fix comment and linter errors 2020-05-14 14:37:50 +02:00
Oliver Gugger
1f3a5ce0d4
config: export CleanAndExpandPath 2020-05-14 14:37:50 +02:00
Oliver Gugger
bc3909050e
multi: rename and export logWriter as RootLogWriter 2020-05-14 14:37:50 +02:00
Oliver Gugger
a56ca0d0cf
config: export default values for config file
Variables related to the default configuration file location are
needed if the config parsing is happening externally. We export them
so they don't need to be copied to projects that use lnd as a library.
2020-05-14 14:37:49 +02:00
Oliver Gugger
aba29df84d
config: extract config validation
To allow external configuration parsing and validation, this commit
exports the function that checks a configuration for sanity.
Also because we touch the code, we need to fix all linter errors.
2020-05-14 14:37:49 +02:00
Oliver Gugger
d4d10b5c71
config: extract default config into function
To make it easy to extract the configuration parsing out of the main
package, the default config is exported as its own function.
2020-05-14 14:37:49 +02:00