Commit Graph

6523 Commits

Author SHA1 Message Date
Wilmer Paulino
95560238ce
server: update to lastest tor controller api 2018-09-11 19:37:12 -07:00
Wilmer Paulino
8599b30c78
config: modify private key path to be onion type agnostic 2018-09-11 19:37:11 -07:00
Wilmer Paulino
9ae0ac53a2
tor/controller: add tor version number check
In this commit, we add a check for the Tor server's version number to
ensure it supports creating v3 onion services through its control port.
2018-09-11 19:37:10 -07:00
Wilmer Paulino
e38174c7ce
tor/controller: add support for v3 onion services
In this commit, we extend our Tor controller to also support creating v3
onion services, as they are now supported by the Tor daemon. We also
refactor our existing AddOnion method to take in a config struct that
houses all of the required options to create/restore an onion service.
2018-09-11 19:37:09 -07:00
Olaoluwa Osuntokun
ea5a18f4e5
Merge pull request #1886 from Roasbeef/lax-migration-assumptions
channeldb: relax bucket assumptions for latest db migration
2018-09-11 19:18:03 -07:00
Olaoluwa Osuntokun
2c48ec8dde
Merge pull request #1877 from halseth/garbage-collect-link-nodes
[integration tests] Fix flake in persistent connection pruning test
2018-09-11 19:17:21 -07:00
Conner Fromknecht
0c74575c44
contractcourt/chain_arbitrator: parallel chain watcher start
This commit restructures the initialization procedure
for chain watchers such that they can proceed in parallel.
This is primarily to help nodes running with the neutrino
backend, which otherwise forces a serial rescan for each
active channel to check for spentness.

Doing so allows the rescans to take advantage of batch
scheduling in registering for the spend notifications,
ensuring that only one or two passes are made, as opposed
to one for each channel.

Lastly, this commit ensures that the chain arb is properly
shutdown if any of it's chain watchers or channel arbs
fails to start, so as to cancel their goroutines before
exiting.
2018-09-11 16:10:29 -07:00
Olaoluwa Osuntokun
09924f3f2c
channeldb: relax bucket assumptions for latest db migration
In this commit, we no longer assume that the bucket hierarchy has been
created properly when applying the latest DB migration. On older nodes
that never obtained a channel graph, or updated _before_ the query sync
stuff was added, then they're missing buckets that the migration expects
them to have.

We fix this by simply creating the buckets as we go, if needed.
2018-09-11 16:09:25 -07:00
Olaoluwa Osuntokun
d050cedd02
Merge pull request #1872 from Roasbeef/create-proper-buckets
channeldb: fix bucket creation hierarchy in createChannelDB
2018-09-11 16:04:40 -07:00
Paul Litvak
e43b83fa74 cmd/lncli: Fixed conflicting payinvoice amount output 2018-09-12 01:27:54 +03:00
Joost Jager
a7fec827cc
routing: validate channel update in failure message 2018-09-11 20:12:09 +02:00
Joost Jager
b5fd32ff77
discovery+routing: move validation logic to routing package
Previously, gossiper was the only object that validated channel
updates. Because updates can also be received as part of a
failed payment session in the routing package, validation logic
needs to be available there too. Gossiper already depends on
routing and having routing call the validation logic inside
gossiper would be a circular dependency. Therefore the validation
was moved to routing.
2018-09-11 20:12:07 +02:00
Joost Jager
ac8a3af84c
routing: add channel update validation test 2018-09-11 20:10:15 +02:00
Joost Jager
47d2e1e024
routing: add option to specify explicit id for test channels 2018-09-11 20:10:15 +02:00
Joost Jager
c5c580ab54
routing: add private key map to test graph instance 2018-09-11 20:10:14 +02:00
Joost Jager
5daf75b264
routing: restructure test context creation 2018-09-11 20:10:14 +02:00
Joost Jager
2d255e3bc3
routing: use fixed time value in tests 2018-09-11 20:10:14 +02:00
Johan T. Halseth
598904fbb9
lnd_test: restart nodes twice to trigger pruning logic 2018-09-11 10:25:48 +02:00
Johan T. Halseth
a926665358
lnd_test: make sure we stay disconnected using WaitInvariant in testGarbageCollectLinkNodes 2018-09-11 10:25:48 +02:00
Conner Fromknecht
3f3e2bf4e8
dep: add golang.org/x/time for rate limiter 2018-09-11 00:12:36 -07:00
Conner Fromknecht
a56e7122d6
discovery/syncer: use rate limiter for gossip queries
This commit replaces the simplistic rate limiting
technique added in 557cb6e2, to use the
golang.org/x/time's rate limiter. This has the
benefit of performing traffic shaping to meet a
target maximum rate, and yet tolerate bursts. Bursts
are expected during initial sync, though should become
more rare afterwards. Performing traffic shaping with
this mechanism should improve the ability of the gossip
syncer to detect sustained bursts from the remote peer,
and penalize them appropriately.

This commit also modifies the default parameters to
accept bursts of 10 queries, with a target rate of 1
reply every 5 seconds.
2018-09-11 00:12:35 -07:00
David Knezic
5675b5b80f release: Add ARMv6 platform to release.sh 2018-09-10 22:19:21 +02:00
Olaoluwa Osuntokun
3e67321aa7
channeldb: fix bucket creation hierarchy in createChannelDB
In this commit, we fix a bug in the bucket creation code in
createChannelDB. This bug can cause migrations on older nodes to fail,
as we expect the bucket to already have been created. With this commit,
we ensure that all the buckets under the main node and edges bucket are
properly created. Otherwise, a set of the newer migrations will fail to
apply for nodes updating from 0.4.
2018-09-09 15:49:28 -07:00
Olaoluwa Osuntokun
874002022f
channeldb: remove unused fwdPackageLogBucket key
In this commit, we move the declaration of the key for an unused bucket.
In the past, this bucket was used to store the revocation forwarding
package log. However, this has been moved under the key
`fwdPackagesKey`.
2018-09-09 15:47:52 -07:00
Olaoluwa Osuntokun
1941353fb2
Merge pull request #1824 from cfromknecht/gossip-delay-reply
discovery/syncer: delay replies after initial sync to prevent DOS
2018-09-09 15:28:22 -07:00
Francisco Calderon
98712c037d cmd/lncli: fix missing whitespaces on lncli queryroutes desc
Adds whitespaces missing on command description,
without those whitespaces at the end of the line
it showed the words together
2018-09-09 15:16:00 -07:00
michael1011
81ec87401f
added missing spaces to Makefile 2018-09-09 10:48:37 +02:00
Olaoluwa Osuntokun
6831ad3fa3
Merge pull request #1861 from wpaulino/connect-tor-if-active
server: ensure persistent connections to tor addrs are made if active
2018-09-08 18:13:06 -07:00
Olaoluwa Osuntokun
e63a5c3d77
Merge pull request #1855 from halseth/amt-paid-msat
Add amt_paid_msat to invoice
2018-09-08 18:12:39 -07:00
Olaoluwa Osuntokun
b343ef24e7
cmd/lncli+fundingmanager: use a default num min confs for 1 for openchannel 2018-09-08 14:41:03 -07:00
Olaoluwa Osuntokun
d4fdc41c8c
Merge pull request #1864 from Roasbeef/btcwallet-update-panic-fix
build: update btcwallet to latest version
2018-09-07 13:12:56 -07:00
Johan T. Halseth
d742529bb2
rpcserver: set AmtPaidMsat when creating RPC invoice 2018-09-07 14:13:48 +02:00
Johan T. Halseth
90a9f5882a
lnrpc: add field amt_paid_msat to Invoice 2018-09-07 14:13:48 +02:00
maurycy
ac24b12bf2
multi: fix various typos in comments 2018-09-07 06:51:49 +02:00
Olaoluwa Osuntokun
712453bbc2
build: update btcwallet to latest version
In this commit, we update btcwallet to the latest version which fixes a
panic bug when attempting to notify a relevant transaction.
2018-09-06 20:44:59 -07:00
Wilmer Paulino
59c404a6d3
server: ensure persistent connections to tor addrs are made if active
In this commit, we restrict the persistent connection logic on startup
to only attempt to establish connections to Tor addresses if Tor
outbound support is enabled. Otherwise, we'll continually attempt to
reach the address even though we never will.
2018-09-06 18:51:19 -07:00
Olaoluwa Osuntokun
dcd8190c80
Merge pull request #1853 from cfromknecht/short-chan-id-compare
lnwire/lnwire_test: assert nil 0-length sid reply msg
2018-09-06 18:20:31 -07:00
Olaoluwa Osuntokun
0121fe8465
Merge pull request #1862 from Roasbeef/chan-series-test-fixes
multi: fix panic bug in chan series, itest test flake, update neutrino to latest version
2018-09-06 18:19:33 -07:00
Olaoluwa Osuntokun
5aed80b5ce
build: update to latest version of neutrino
In this commit we update to the latest version of neutrino which fixes a
bug in the filter header syncing logic.
2018-09-06 16:58:08 -07:00
Olaoluwa Osuntokun
555b7db602
test: fix flake in link node garbage collection test
In this commit, we fix a flake in the link node garbage collection test
by ensuring the channels have been fully closed on both sides before we
attempt to restart and ensure that they don't actually establish
connections. Without this check, it's possible that either side hasn't
yet processed all the blocks, so they'll still reconnect to each other on
start up.
2018-09-06 16:57:32 -07:00
Olaoluwa Osuntokun
27ecfbbd36
lntest: log the expected and last balance in WaitForBalance error case 2018-09-06 16:49:27 -07:00
Olaoluwa Osuntokun
09d4660524
chanseries: fix panic bug by ensuring we access a non-nil edge
In this commit, we fix an existing but that would cause the daemon to at
times crash. Before this commit, we access the wrong edge, which would
possibly actually be nil, leading to a panic. In this commit we fix this
by ensuring we access the proper edge which is known to be non-nil at
this point in the control flow.
2018-09-06 16:48:55 -07:00
Conner Fromknecht
dc0030f11d
discovery/gossiper: remove go-errors pkg 2018-09-05 22:08:16 -07:00
Conner Fromknecht
045a2c7fff
discovery/syncer_test: add DOS delayed replies test 2018-09-05 22:08:16 -07:00
Conner Fromknecht
557cb6e253
discovery/syncer: delay replies after initial sync to prevent DOS 2018-09-05 22:08:16 -07:00
Olaoluwa Osuntokun
fb95858afc
Merge pull request #1740 from valentinewallace/fix-historical-ntfns-reorg-test
chainntnfs/interface_test: fix unreliable historical block ntfns test
2018-09-05 21:01:42 -07:00
Olaoluwa Osuntokun
a1137a4f68
Merge pull request #1818 from cfromknecht/aplt-track-pending-conns
autopilot: prevent duplicate conns to same peer
2018-09-05 21:01:18 -07:00
Conner Fromknecht
85a2d4640f
lnwire/lnwire_test: assert nil 0-length sid reply msg 2018-09-05 20:54:06 -07:00
Conner Fromknecht
d5f97f7bdc
autopilot/multi: replace PubKey -> NodeKey on directive 2018-09-05 20:10:37 -07:00
Conner Fromknecht
e702a6a266
autopilot/agent_test: remove Fatalf calls from goroutines 2018-09-05 20:10:36 -07:00