Commit Graph

5373 Commits

Author SHA1 Message Date
Offer Markovich
da521c73f3 tests: ensure build halts if tests fail during coverage mode 2018-08-09 21:44:33 -07:00
Olaoluwa Osuntokun
61f5b3e3f1
Merge pull request #1709 from Empact/noisedial
Move noiseDial from config.go to server.go
2018-08-09 21:43:37 -07:00
Olaoluwa Osuntokun
518b0d2cf7
Merge pull request #1679 from cfromknecht/move-linter-v2
Makefile: move linter v2
2018-08-09 21:03:05 -07:00
Olaoluwa Osuntokun
d5863d03ae
Merge pull request #1660 from lightningnetwork/fetch-allll-channels
channeldb/db: return all channels if multiple chains exist
2018-08-09 20:59:28 -07:00
Olaoluwa Osuntokun
ecf009a4ef
Merge pull request #1712 from cfromknecht/run-coverage-with-debug-tag
Makefile: run coverage tests with -tags=debug
2018-08-09 20:58:31 -07:00
Olaoluwa Osuntokun
d3b1b9aa98
Merge pull request #1668 from cfromknecht/interface-tickers
Ticker Package
2018-08-09 20:55:25 -07:00
Olaoluwa Osuntokun
3438baaf0c
routing: eliminate nested db transactions by using new FetchOtherNode method 2018-08-09 20:48:06 -07:00
Olaoluwa Osuntokun
0f3c0ccf85
channeldb: add new FetchOtherNode method to ChannelEdgeInfo
In this commit, we add a new method to the ChannelEdgeInfo that will
allow the path finding logic to get the node opposite the pivot node
without first creating a new db transaction. The new method is able to
use an existing db transaction, or create a new one if needed.
2018-08-09 20:47:01 -07:00
Olaoluwa Osuntokun
ce7bfae4f7
channeldb: ensure we always check error from fetchChanEdgePolicy 2018-08-09 20:46:04 -07:00
Olaoluwa Osuntokun
0109672835
channeldb: add new db field for ChannelEdgeInfo to allow new methods 2018-08-09 20:45:39 -07:00
Joost Jager
29b6bae4ed routing: convert fee limit test to table-driven 2018-08-09 20:23:40 -07:00
Joost Jager
3e7473f4f0 routing: backward searching 2018-08-09 20:23:40 -07:00
Joost Jager
e52d829168 routing: path finding test refactored 2018-08-09 20:23:40 -07:00
Joost Jager
6c918a1806 channeldb: store unknown policies in database
The commit ensures that for every channel, there will always
be two entries in the edges bucket. If the policy from one or
both ends of the channel is unknown, it is marked as such.

This allows efficient lookup of incoming edges. This is
required for backwards payment path finding.
2018-08-09 20:23:40 -07:00
Olaoluwa Osuntokun
d2612e51bd
Merge pull request #1644 from wpaulino/kw-fees
multi: switch to sat/kw fees
2018-08-09 20:19:28 -07:00
Olaoluwa Osuntokun
d64bb5921e
Merge pull request #1635 from halseth/funding-broadcast-fail
Move funding tx broadcasting to Fundingmanager
2018-08-09 20:04:30 -07:00
Olaoluwa Osuntokun
cc6348088c
Merge pull request #1714 from Roasbeef/update-btcd-neutrino-fix
build: update to use latest btcd
2018-08-09 18:27:20 -07:00
Wilmer Paulino
336f1c156e
rpcserver: convert sat/vbyte fee rates input by the user to sat/kw
In this commit, we explicitly convert sat/vbyte fee rates input by the
user to sat/kw. We do this as users are typically more accustomed to
sat/vbyte fee rates, rather than sat/kw.
2018-08-09 17:29:53 -07:00
Wilmer Paulino
9d2eeb6304
multi: update to latest fee estimation interface 2018-08-09 17:29:52 -07:00
Wilmer Paulino
a63677a381
multi: switch to transaction weight to calculate transaction fees
Due to a recent change within the codebase to return estimated fee rates
in sat/kw, this commit ensures that we use this fee rate properly by
calculing a transaction's fees using its weight. This includes all of
the different transactions that are created within lnd (funding, sweeps,
etc.). On-chain transactions still rely on a sat/vbyte fee rate since it's
required by btcwallet.
2018-08-09 17:29:50 -07:00
Wilmer Paulino
b3d5d7ab9c
lnwallet: switch fee estimation to return sat/kw fee rates
In this commit, we modify our FeeEstimator interface to return an
estimated fee rate in sat/kw. Recently, due to low fees on the network,
users have been experiencing failures broadcasting transactions due to
not meeting specific fee requirements. This was happening more often
than not, as the estimated fee returned by backend nodes (bitcoind and
btcd) only takes into account vbytes, rather than weight. The fees
returned are also expressed in sat/kb, so we must take care that we do
not lose precision while converting to sat/kw. In the event that this
happens, a fee floor of 253 sat/kw has been added. This fee rate
originates from bitcoind rounding up the conversion from weight to
vbytes.
2018-08-09 17:29:48 -07:00
Olaoluwa Osuntokun
bf4283f069
build: update to use latest btcd
In this commit, we update the set of deps to use the latest version of
btcd. Namely this version fixes a bug in re-org handling logic, ensures
that btcd will always respond to getheaders (fixes #511), and also
ensure that it will properly respond to cfheaders messages which is
required for the neutrino sync to operate smoothly.
2018-08-09 17:15:41 -07:00
Olaoluwa Osuntokun
30b156c706
Merge pull request #1566 from wpaulino/bitcoind-rescan-client
multi: share the same bitcoind connection between multiple rescan clients
2018-08-09 17:10:57 -07:00
Conner Fromknecht
8bb4337cac
Makefile: run coverage tests with -tags=debug 2018-08-09 13:46:08 -07:00
Offer Markovich
57d87aef3b test: ensure integration tests use unique context timeouts for each assertion 2018-08-09 12:37:30 -07:00
Ben Woosley
896128efd0
Move noiseDial from config.go to server.go
noiseDial is only called from server.go, has nothing to do with configuration,
and moving it removes config.go's reliance on btcec and brontide.
2018-08-09 15:13:05 -04:00
Conner Fromknecht
8cc4681201
test_utils: init switch with default fwd/log tickers 2018-08-09 02:48:07 -07:00
Conner Fromknecht
d5d01dd575
server: configure switch w/ default log/fwd tickers 2018-08-09 02:48:07 -07:00
Conner Fromknecht
2762546eeb
peer: replace NewBatchTicker with ticker.New 2018-08-09 02:48:07 -07:00
Conner Fromknecht
c90ec19595
htlcswitch/test_utils: repalce mockTicker with new MockTicker 2018-08-09 02:48:07 -07:00
Conner Fromknecht
6a709526d8
htlcswitch/mock: remove mockTicker, use ticker.MockNew 2018-08-09 02:48:07 -07:00
Conner Fromknecht
2651136806
htlcswitch/link_test: replace mockTicker with ticker.Mock 2018-08-09 02:48:07 -07:00
Conner Fromknecht
e3253a4f3b
htlcswitch/switch: add log/fwd event tickers to Config 2018-08-09 02:48:07 -07:00
Conner Fromknecht
1c456a5144
htlcswitch/link: replace batch ticker with...
resumable ticker.Ticker interface
2018-08-09 02:48:06 -07:00
Conner Fromknecht
83353b44bd
ticker/ticker_test: adds Ticker interface tests 2018-08-09 02:48:06 -07:00
Conner Fromknecht
eeab500de7
ticker/mock: adds debug Mock Ticker
This commit adds a Mock Ticker, implementing the
Ticker interface. The ticker abides by the
behavioral requirements of the production
implementation, but also includes the ability to
force feed ticks while the Ticker is paused.

This commit also places the mock.go file behind
the debug build flag. This allows us to import
the MockTicker into our unit tests.
2018-08-09 02:48:06 -07:00
Conner Fromknecht
f8fe26fb06
ticker/ticker: adds resumable Ticker interface 2018-08-09 02:48:00 -07:00
Olaoluwa Osuntokun
bb310a3d0d
Merge pull request #1681 from cfromknecht/lock-chain-arb-shutdown
contractcourt/chain_arbitrator: fix potential shutdown race
2018-08-08 22:03:53 -07:00
Wilmer Paulino
e58486b599
docs: note that different ZMQ sockets must be used with bitcoind 2018-08-08 20:26:31 -07:00
Wilmer Paulino
936fcc1f16
multi: update to latest BitcoindClient interface
In this commit, we introduce a nice optimization with regards to lnd's
interaction with a bitcoind backend. Within lnd, we currently have three
different subsystems responsible for watching the chain: chainntnfs,
lnwallet, and routing/chainview. Each of these subsystems has an active
RPC and ZMQ connection to the underlying bitcoind node. This would incur
a toll on the underlying bitcoind node and would cause us to miss ZMQ
events, which are crucial to lnd. We remedy this issue by sharing the
same connection to a bitcoind node between the different clients within
lnd.
2018-08-08 20:26:30 -07:00
Wilmer Paulino
75192a15e3
config: parse different ZMQ hosts for block and tx notifications
Due to recent changes to the BitcoindClient interface, we now require
the backing bitcoind to use different hosts for its ZMQ raw block and
raw transaction notifications. This was needed as the notification queue
maintained by the bitcoind node would sometimes overflow with
transactions and cause block notifications to be dropped/missed.
In this commit, we expand extractBitcoindRPCParams to account for this.
2018-08-08 20:26:29 -07:00
Wilmer Paulino
533a45574c
build: update to btcwallet with bitcoind conn changes 2018-08-08 20:26:28 -07:00
Olaoluwa Osuntokun
61681a59eb
Merge pull request #1705 from Roasbeef/neutrino-update
build: update neutrino to latest version
2018-08-08 20:22:08 -07:00
Olaoluwa Osuntokun
97f9759ee1
Merge pull request #1675 from cfromknecht/peer-backoff-backoff
server: peer backoff backoff
2018-08-08 20:03:28 -07:00
Olaoluwa Osuntokun
8a56b33aa6
Merge pull request #1702 from wpaulino/peer-bootstrapper-backoff
server: prevent increasing epochErrors if conn was established
2018-08-08 19:54:54 -07:00
Olaoluwa Osuntokun
31117e6b30
lnwallet: lower timeout for waitForWalletSync back to 10s 2018-08-08 19:48:21 -07:00
Olaoluwa Osuntokun
a368205fc6 build: update to latest version neutrino
In this commit, we update to the latest version of neutrino. This
version contains a number of bug fixes, and optimizations. Additionally
this version will allow the lnwallet re-org tests to once again pass
reliably on Travis.
2018-08-08 19:48:01 -07:00
Wilmer Paulino
0de0a39291
server: prevent increasing epochErrors if conn was established
In this commit, we fix a small bug where we would increase epochErrors
by one even if connections were successfully established. Due to this,
we would stay stuck inside of the peer bootstrapper loop without
requerying for new peers.
2018-08-08 17:24:14 -07:00
f
0ae268397b lncli: add confirmPayreq used when paying 2018-08-07 18:37:35 -07:00
Conner Fromknecht
fab87e5880
Makefile: switch to gometalinter.v2 2018-08-07 16:57:40 -07:00