Commit Graph

4720 Commits

Author SHA1 Message Date
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
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
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
Olaoluwa Osuntokun
8379bbaa9b
Merge pull request #1673 from cfromknecht/prevent-db-reversions
channeldb: fail Open on db reversion
2018-08-07 15:47:02 -07:00
Conner Fromknecht
a704c67791
server: compute backoff with connection duration relaxation 2018-08-07 14:50:11 -07:00
Conner Fromknecht
60edca164c
peer: adds StartTime() used to compute backoff relaxation 2018-08-07 14:50:07 -07:00
Olaoluwa Osuntokun
33a5567a0f
Merge pull request #1691 from wpaulino/sync-gopkg
build: sync Gopkg.lock with Gopkg.toml
2018-08-06 16:15:33 -07:00
Wilmer Paulino
17556f4799
build: sync Gopkg.lock with Gopkg.toml 2018-08-06 13:11:46 -07:00
Conner Fromknecht
8758671552
contractcourt/chain_arbitrator: fix potential shutdown race
This commit fixes a potential race condition during
shutdown, that could allow the chain arb's
activeWatchers or activeChannels map to be modified
while ranging over their contents. We fix this by
copying the contents into new maps with the mutex
held, before releasing the mutex and shutting down
each watcher or channel arbitrator.
2018-08-03 16:46:41 -07:00
Conner Fromknecht
f0f5e11b82
Merge pull request #1661 from cfromknecht/restore-linter
Makefile: Restore linter
2018-08-03 03:13:58 -07:00
Conner Fromknecht
e3138004ca
Makefile: restore broken linter 2018-08-02 18:20:50 -07:00
Conner Fromknecht
cf2c371042
multi: fix linting errors 2018-08-02 18:20:50 -07:00
Conner Fromknecht
8beeeb1944
macaroons/constraints_test: remove extraneous semicolon 2018-08-02 18:20:50 -07:00
Conner Fromknecht
9eff876f52
routing/pathfind_test: fmt whitespace 2018-08-02 18:20:49 -07:00
Conner Fromknecht
614b3b3862
routing/pathfind: fmt whitespace 2018-08-02 18:20:49 -07:00
Conner Fromknecht
1ded697e8d
multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
Conner Fromknecht
dff7706d04
channeldb/meta_test: adds TestMigrationReversion
Adds a test asserting that we will fail to open
a channeldb with a version higher than the
highest known version to the current build of
lnd.
2018-08-02 18:18:49 -07:00
Conner Fromknecht
e23fc40d63
channeldb/db: check for db reversions on startup 2018-08-02 16:46:17 -07:00
Conner Fromknecht
ee34b9c7b0
channeldb/error: adds ErrDBReversion error
Adds an error for signaling that we detected
the case where a user is trying to revert
to prior version before a db migration.
2018-08-02 16:45:03 -07:00
Conner Fromknecht
d0179eb6b5
Merge pull request #1669 from Roasbeef/funding-mgr-server-init
funding+server: move initialization of funding manager into the server
2018-08-02 14:30:00 -07:00
Olaoluwa Osuntokun
33979b2636
funding+server: move initialization of funding manager into the server
In this commit, we move the initialization of the server into the
funding manager itself. We do this as it's no longer the case that _any_
RPC needs to access the funding manager. In the past, this was the
only reason that the funding manager was instantiated outside of the
server: to be able to respond to queries _before_ the server was
started.

This change also fixes a bug as atm, the funding manager will try to
register for notifications _before_ the ChainNotifier itself has fully
started.
2018-08-01 16:02:55 -07:00
Olaoluwa Osuntokun
f6ea91af71
Merge pull request #1579 from Roasbeef/gcs-modifications
multi: update primary interfaces to be compatible with latest version of BIP 158, use latest btcd+neutrino+btcwallet
2018-08-01 12:41:09 -07:00
Olaoluwa Osuntokun
b1a775b29e
chainntnfs/neutrinonotify: update async conf dispatch to use scripts 2018-07-31 21:29:04 -07:00
Olaoluwa Osuntokun
f7d9b8e6b0
lnwallet: increase timeout in waitForWalletSync for new neutrino re-org logic 2018-07-31 21:29:03 -07:00
Olaoluwa Osuntokun
40806532c7
funding: fix import paths for test 2018-07-31 21:29:03 -07:00
Olaoluwa Osuntokun
3c60861005
routing/chainview: give neutrino backend more time to catch up for re-org test
In this commit, we modify the test to explitlcy give the neutrino
backend more time to catch up compared to the RPC backends. We do this
as a recent change has been made in the neutrino backend to wait for the
filter headers to finish syncing before proceeding with the rescan
itself. As a result, we'll need to account for this in the test and
sleep enough to give the backend a chance to catch up.
2018-07-31 21:29:03 -07:00
Olaoluwa Osuntokun
293a377edd
lnwallet: modify IsSynced() for neutrino backend to ensure filter headers are synced 2018-07-31 21:29:02 -07:00
Olaoluwa Osuntokun
2d71b5a0d5
build: update build to point to latest versions of btcd+btcwallet+neutrino 2018-07-31 21:29:02 -07:00
Olaoluwa Osuntokun
d9969f5dc2
contractcourt: update contract resolvers to use pkScripts for spend ntfns 2018-07-31 21:29:01 -07:00
Olaoluwa Osuntokun
c6950fcc2f
contractcourt: update channel arbitrator unit tests due to recent API changes 2018-07-31 21:29:01 -07:00
Olaoluwa Osuntokun
08e11d197d
contractcourt: update chain watcher to make funding pkScript for spend ntfn 2018-07-31 21:29:00 -07:00
Olaoluwa Osuntokun
ac9f9bd061
contractcourt: remove now obsolete code from the chain arbitrator
We no longer need this code fragment as the chain watcher is now able to
handle confirmed cooperative channel closures itself.
2018-07-31 21:29:00 -07:00
Olaoluwa Osuntokun
ab5b8b8fac
breacharbiter: use the pkScript of the breached output for spend ntnfs 2018-07-31 21:28:59 -07:00
Olaoluwa Osuntokun
62ab7424af
breacharbiter: update second level pkScript as well
In this commit, we update the convertToSecondLevelRevoke function to
also upgrade the second level pkScript as well. This is required as
we'll need to use this for a confirmation notification once we sweep the
output in the case that the remote party goes to the second layer.
2018-07-31 21:28:59 -07:00
Olaoluwa Osuntokun
53416260e3
htlcswitch: update test to account for new ChainNotifier API 2018-07-31 21:28:58 -07:00
Olaoluwa Osuntokun
067db8572c
test+lnd: update unit test mocks to adhere to new interface API's 2018-07-31 21:28:58 -07:00
Olaoluwa Osuntokun
88bedec65b
discovery: update unit tests to account for new ChainNotifier API 2018-07-31 21:28:57 -07:00
Olaoluwa Osuntokun
343c1b80d2
lnwallet: update NewBreachRetribution to include pkScripts for htlc outputs
In this commit, we update the NewBreachRetribution method to include
pkScripts for htlc outputs. We do this now, as the breach arbiter will
need the raw pkScript when attempting to request spend notifications for
each HTLC.
2018-07-31 21:28:57 -07:00
Olaoluwa Osuntokun
84c458cc9f
lnwallet/btcwallet: update neutrino GetUtxo impl to use new API 2018-07-31 21:28:57 -07:00
Olaoluwa Osuntokun
f9f9eefab4
lnwallet: update GetUtxo to accept the pkScript to comply with new gcs filter 2018-07-31 21:28:56 -07:00
Olaoluwa Osuntokun
21451bf251
lnwallet: update dual funder verification code to use pkscript in GetUtxo 2018-07-31 21:28:56 -07:00
Olaoluwa Osuntokun
8c0a151cec
routing: update UTXO verification to use new interface, graph pruning too 2018-07-31 21:28:55 -07:00
Olaoluwa Osuntokun
fb98f59407
routing/chainview: ensure bitcoind impl meets new interface requirements 2018-07-31 21:28:55 -07:00
Olaoluwa Osuntokun
9b9029cf4b
routing/chainview: ensure btcd impl meets new interface requirements 2018-07-31 21:28:55 -07:00
Olaoluwa Osuntokun
7e6997d6d3
routing/chainview: update neutrino API due to recent changes
In this commit, we ensure that the neutrino backend meets the target
interface, and also we update the API usage for the internal neutrino
rescan struct to use the new InputWithScript struct.
2018-07-31 21:28:54 -07:00