Commit Graph

6946 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
32b7ce0756 Merge pull request #3013 from halseth/go-mod-btcwallet-9d95f76e99a7
[dependency update] update to latest btcwallet, btcutil, btcd, neutrino
2019-04-26 15:09:37 -07:00
Johan T. Halseth
1387af8c94 Merge pull request #2982 from Roasbeef/faster-chain-watcher-dlp-tests
contractcourt: speed up TestChainWatcherDataLossProtect by ditching q…
2019-04-26 10:27:56 +02:00
Johan T. Halseth
ef6c2f5adc mod: update to latest btcwallet, btcd, btcutil, neutrino
Resolves a crash when using neutrino backend, and a bugfix for filter
matchin.
2019-04-26 10:17:02 +02:00
Olaoluwa Osuntokun
f1df2eadb7 Merge pull request #2820 from cfromknecht/session-key-derivation
wtclient: session private key derivation
2019-04-25 17:59:46 -07:00
Olaoluwa Osuntokun
b44556fa8a Merge pull request #1926 from halseth/lnd-package
Move daemon from main to lnd package
2019-04-25 17:52:19 -07:00
Olaoluwa Osuntokun
279a17b3bf contractcourt: speed up TestChainWatcherDataLossProtect by ditching quickcheck
In this commit, we speed up the `TestChainWatcherDataLossProtect`
_considerably_ by enumerating relevant tests using table driven tests
rather than generating random tests via the `testing/quick` package.
Each of these test cases are also run in parallel bringing down the
execution time of this test from a few minutes, to a few seconds.
2019-04-25 16:03:28 -07:00
Olaoluwa Osuntokun
b63584980a Merge pull request #3008 from halseth/lntest-dont-return-nil-error
[trivial] lntest: don't return from ensureConnected on non-error
2019-04-24 17:07:06 -07:00
Olaoluwa Osuntokun
7ba1344468 Merge pull request #3007 from halseth/lnd-test-balance-flake
lnd_test: check Dave's balance in WaitNoErr
2019-04-24 17:05:12 -07:00
Olaoluwa Osuntokun
d32db4a813 Merge pull request #2956 from halseth/complete-payment-request-wait-for-update
[lnd_test] wait for state update in completePaymentRequests
2019-04-24 17:04:06 -07:00
Johan T. Halseth
7f4d1cee6d lntest: don't return from ensureConnected on non-error
This would casue the method to return before the peer list check was
performed.
2019-04-24 09:44:15 +02:00
Johan T. Halseth
ab327dc8c1 lnd_test: check Dave's balance in WaitNoErr
Resolves a flake.
2019-04-24 09:01:38 +02:00
Conner Fromknecht
d1ff783a9e watchtower/wtclient/client_test: test no ack create session 2019-04-23 20:08:02 -07:00
Conner Fromknecht
71f72894f8 watchtower/wtclient/client: ensure dispatcher can force quit...
during session creation.
2019-04-23 20:07:46 -07:00
Conner Fromknecht
9603bfa602 watchtower/wtclient/session_negotiator: don't backoff on first attempt 2019-04-23 20:07:29 -07:00
Conner Fromknecht
1622a212d7 watchtower/wtserver: add NoAckCreateSession for testing 2019-04-23 20:07:12 -07:00
Conner Fromknecht
1000223c71 watchtower/wtwire/error_code: add DeleteSessionCodeNotFound string 2019-04-23 20:06:56 -07:00
Conner Fromknecht
590f5811e8 watchtower/wtserver/server: print connFailure error code name 2019-04-23 20:06:38 -07:00
Conner Fromknecht
ec6e2010d6 watchtower/wtmock: validate key index reservation 2019-04-23 20:06:20 -07:00
Conner Fromknecht
978a0a8de6 watchtower/wtserver/server: permit unused session overrwite 2019-04-23 20:06:04 -07:00
Conner Fromknecht
9b1bc9fd79 watchtower/wtwire/create_session_reply: return last applied 2019-04-23 20:05:47 -07:00
Conner Fromknecht
9aa775e64e watchtower/wtserver/server: only generate addrs for reward sessions 2019-04-23 20:05:29 -07:00
Conner Fromknecht
999cbbdc54 watchtower/wtserver/server: check blob type first 2019-04-23 20:05:12 -07:00
Conner Fromknecht
bebe6461a9 watchtower/wtclient: use HD session key derivation 2019-04-23 20:04:55 -07:00
Conner Fromknecht
0404aedede watchtower/wtclient/interface+wtmock: add session key reservation 2019-04-23 20:04:40 -07:00
Conner Fromknecht
df390df966 watchtower/wtmock/client_db: clone bytes w/ nil 2019-04-23 20:04:23 -07:00
Conner Fromknecht
c6f95c5667 watchtower/wtdb/client_session: replace keydesc w/ KeyIndex 2019-04-23 20:04:06 -07:00
Conner Fromknecht
2f9f46cf24 keychain/derivation: adds watchtower session key family 2019-04-23 20:03:48 -07:00
Conner Fromknecht
3af6eafc8e watchtower/wtclient/interface: add SecretKeyRing iface 2019-04-23 20:03:15 -07:00
Conner Fromknecht
7d99005dde watchtower/wtclient/interface: add LoadTower and mock impl 2019-04-23 19:17:21 -07:00
Conner Fromknecht
1c22474ad3 Merge pull request #2989 from meeDamian/gateway-v1.0.5
Update jackpal/gateway to v1.0.5
2019-04-23 14:14:30 -07:00
Johan T. Halseth
ccff4fc0a5 make: point makefile to new main package 2019-04-23 20:57:33 +02:00
Johan T. Halseth
b53899c43c lnd: rename package main->lnd 2019-04-23 20:57:33 +02:00
Johan T. Halseth
9d1e1db42e lnd: move main method to cmd/lnd/main.go 2019-04-23 20:56:33 +02:00
Olaoluwa Osuntokun
6c60caa852 Merge pull request #2922 from ccdle12/prevent-sendcoins-pubkey
rpcserver: Prevent SendCoins to Pubkey
2019-04-22 16:03:48 -07:00
Olaoluwa Osuntokun
6c4566bfce Merge pull request #2949 from wpaulino/lncfg-parse-network
lncfg: parse network for TCP addresses to listen on correct interface
2019-04-22 16:01:28 -07:00
Olaoluwa Osuntokun
6e3cf06bd4 Merge pull request #2987 from frennkie/patch-1
Update sample-lnd.conf - use lncli to show debug levels
2019-04-22 15:45:53 -07:00
Damian Mee
16875748e9 Update jackpal/gateway to v1.0.5 2019-04-23 02:15:03 +07:00
frennkie
07b991dc53 Update sample-lnd.conf 2019-04-22 18:05:57 +02:00
ccdle12
c46457fb5b rpcserver+lnd_test: adding check in SendCoins to prevent txs sent to pubkeys 2019-04-20 10:12:20 +08:00
Conner Fromknecht
ab4a6750cc Merge pull request #1865 from ExchangeUnion/litecoin-simnet
config: Experimental support for Litecoin/simnet
2019-04-19 14:43:47 -07:00
Olaoluwa Osuntokun
a19b6d7b69 Merge pull request #2978 from Roasbeef/latest-neutrino
build: update to latest version of neutrino
2019-04-18 23:06:26 -07:00
Wilmer Paulino
998680ad59 routing: fall back to edge MaxHTLC within findPath instead of Capacity
In this commit, we make our findPath function use an edge's MaxHTLC as
its available bandwidth instead of its Capacity. We do this as it's
possible for the capacity of an edge to not exist when operating as a
light client. For channels that do not support the MaxHTLC optional
field, we'll fall back to using the edge's Capacity.
2019-04-18 21:57:42 -07:00
Wilmer Paulino
0b0a9f4172 channeldb+routing: refactor DeleteChannelEdge to use ChannelID
In this commit, we refactor DeleteChannelEdge to use ChannelIDs rather
than ChannelPoints. We do this as the only use of DeleteChannelEdge is
when we are pruning zombie channels from our graph. When running under a
light client, we are unable to obtain the ChannelPoint of each edge due
to the expensive operations required to do so. As a stop-gap, we'll
resort towards using an edge's ChannelID instead, which is already
gossiped between nodes.
2019-04-18 21:57:41 -07:00
Wilmer Paulino
760f38736e fundingmanager: populate additional edge info after adding to graph
This commit serves as another stop-gap for light clients since they are
unable to obtain the capacity and channel point of graph edges. Since
they're aware of these things for their own channels, they can populate
the information within the graph themselves once each channel has been
successfully added to the graph.
2019-04-18 21:57:40 -07:00
Wilmer Paulino
aed0c2a90e discovery: support optional message fields when processing announcements
In this commit, we extend the gossiper with support for external callers
to provide optional fields that can serve as useful when processing a
specific network announcement. This will serve useful for light clients,
which are unable to obtain the channel point and capacity for a given
channel, but can provide them manually for their own set of channels.
2019-04-18 21:57:39 -07:00
Wilmer Paulino
5d3621cc83 routing: skip max htlc validation when capacity is 0
Since light clients no longer have access to an edge's capacity, they
are unable to validate whether the max HTLC value for an updated edge
policy respects the capacity limit. As a stop-gap, we'll skip this
check.
2019-04-18 21:57:38 -07:00
Wilmer Paulino
f2637d63ba routing: prevent fetching blocks for graph edges with AssumeChannelValid
This serves as a stop-gap for light clients as blocks need to be
downloaded from the P2P network, and even with caches, would be too
costly for them to verify. Doing this has two side effects however:
we'll no longer know of the channel capacity and outpoint, which are
essential for some of lnd's responsibilities.
2019-04-18 21:57:37 -07:00
Wilmer Paulino
fd1aa478a9 routing: disable FilteredChainView when AssumeChannelValid is active
In this commit, we disable attempting to determine when a channel has
been closed out on-chain whenever AssumeChannelValid is active. Since
the flag indicates that performing this operation is expensive, we do
this as a temporary optimization until we can include proofs of channels
being closed in the gossip protocol.

With this change, the only way for channels being removed from the graph
will be once they're considered zombies: which can happen when both
edges of a channel have their disabled bits set or when both edges
haven't had an update within the past two weeks.
2019-04-18 21:57:37 -07:00
Wilmer Paulino
7e7b8a1940 routing: prune graph nodes after pruning zombie channels
We do this to ensure we don't leave any stray nodes in our graph that
were part of the zombie channels that we've pruned.
2019-04-18 21:57:36 -07:00
Wilmer Paulino
7eb720e535 routing: mark policy as stale if edge remains double disabled
To ensure we don't mark an edge as live again just because an update
with a fresh timestamp was received, we'll ensure that we reject any
new updates for zombie channels if they remain disabled when running
with AssumeChannelValid.
2019-04-18 21:57:35 -07:00