Commit Graph

9343 Commits

Author SHA1 Message Date
Joost Jager
aefbee78d6
routing: use pairResult constructors
To make it explicit whether a failure or a success result is
instantiated.
2019-10-22 15:52:28 +02:00
Joost Jager
37ef46bc48
routing/test: extract mission control test parameters 2019-10-22 15:52:26 +02:00
Vignesh Karthikeyan
2520d0a996
Fix Formatting of *Wrong*
There is a spacing issues, and thus a formatting 
issue, in the file, code_contribution_guidelines.md
2019-10-19 16:48:32 +05:30
Conner Fromknecht
21a40daf58
Merge pull request #3609 from bitromortac/fwdinghistory-msat-amounts
lnd+lnrpc: add msat forwarding amount fields to ForwardingHistory
2019-10-18 09:16:44 +02:00
bitromortac
3af91fc9b9 lnd+lnrpc: add msat forwarding amount fields to ForwardingHistory 2019-10-16 19:50:58 +02:00
Conner Fromknecht
93247d0304
Merge pull request #3557 from guggero/loop-sweeper-integration
input+sweep: rework witness type into interface to be used externally
2019-10-16 13:09:03 +02:00
Conner Fromknecht
7408fe51ee
Merge pull request #2352 from sangaman/jstype-string
lnrpc: set JS_STRING option for chan_id
2019-10-16 13:02:08 +02:00
Conner Fromknecht
dbc0e88584
Merge pull request #3564 from joostjager/htlcswitch-logging
build+htlcswitch+lnwallet: add prefix logger
2019-10-16 13:00:36 +02:00
Conner Fromknecht
c10eacaa24
Merge pull request #3532 from guggero/refactor-log-writer
build+lnd: refactor reusable log file rotator code into build package
2019-10-16 12:59:39 +02:00
Wilmer Paulino
73ceb9a06e
Merge pull request #3603 from cryptagoras/patch-2
discovery/gossiper: fix minor typo
2019-10-15 14:21:21 +02:00
cryptagoras
0ad6c4748f
discovery/gossiper: fix minor typo
It was missing a space
"addingto waiting batch" -> "adding to waiting batch"
2019-10-15 14:16:03 +03:00
Olaoluwa Osuntokun
a623f9d3e8
Merge pull request #3593 from halseth/neutrino-cfilter-return-error
[neutrino] Handle GetCFilter fetch errors
2019-10-15 12:30:29 +02:00
Johan T. Halseth
753f30a6ff
chainntnfs/neutrino: don't ignore failed filter fetches
Earlier GetCFilter could return a nil-error along with a nil-filter in
cases where we failed to fetch the filter. We would just ignore the
block causing us to miss potential crucial information.

Now that GetCFilter will return an error in cases where the fetch
failed, the filter will never be nil (even for blocks with only coinbase
transactions), and we'll instead return an error.

We also increase the number of retries for the filter from the default 2
to 5.
2019-10-15 11:25:31 +02:00
Johan T. Halseth
610a93e2ff
routing/chainview: check GetCFilter error
Since the filter will never be nil in non-error cases now, remove the
nil-check.
2019-10-15 10:31:25 +02:00
Johan T. Halseth
5cbef663e4
go mod: update btcd+neutrino+btcwallet 2019-10-15 10:31:23 +02:00
Daniel McNally
f437b35fc6
lnrpc: set JS_STRING option for chan_id
This sets the `jstype` option to `JS_STRING` for all `chan_id` fields
in the proto rpc definition. `chan_id` is a 64 bit integer, which is
not natively supported by javascript's floating-point `number` with
only 52 bit precision. Nevertheless, by default protobuf will use the
`number` type for 64 bit integer fields in javascript, which can cause
loss of precision problems with `chan_id`. Explicitly setting the type
for javascript as a string will prevent these issues, and should not
interfere with its use as an identifier.
2019-10-14 14:53:54 -04:00
Olaoluwa Osuntokun
faacd8d5c4
Merge pull request #3595 from wpaulino/max-cltv-expiry-pathfinding
routing+routerrpc: take max cltv limit into account within path finding
2019-10-14 17:29:45 +02:00
Olaoluwa Osuntokun
f5113bc85f
Merge pull request #3597 from Roasbeef/revert-migrations
channeldb: revert to prior migration policy
2019-10-14 16:44:50 +02:00
Oliver Gugger
fb0051a318
input+sweep: rework witness type into an interface 2019-10-14 15:32:54 +02:00
Oliver Gugger
8e4a897a60
sweep: use chain notifier instead of chain IO for best block
Because the BestBlock method of ChainIO is not exposed through any
RPC we want to get rid of it so we can use the sweeper outside of
lnd too. Since the chain notifier now also delivers the current best
block we don't need the BestBlock method any more.
2019-10-14 15:32:54 +02:00
Oliver Gugger
b6dda143d0
sweep: use bbolt DB directly instead of channeldb 2019-10-14 15:32:53 +02:00
Oliver Gugger
4190146066
sweep: add test to make sure fee estimation is correct 2019-10-14 15:32:53 +02:00
Oliver Gugger
3ca2c363fe
lnd+rpcserver: initialize new log writer correctly 2019-10-14 14:56:32 +02:00
Oliver Gugger
94f49192cf
lnd: refactor sub logger setup to use new rotating log writer 2019-10-14 14:56:31 +02:00
Oliver Gugger
d3995a73ae
build: move log rotator code 2019-10-14 14:56:31 +02:00
Oliver Gugger
3ea74c4362
build: move log level parse code and add new leveled sub logger interface 2019-10-14 14:56:30 +02:00
Olaoluwa Osuntokun
e9d2ad5d73 Revert "channeldb: require minimum db upgrade version"
This reverts commit f1942a4c33dbea7144f756d9cd0139ab1fe8197f.
2019-10-12 14:30:26 -07:00
Olaoluwa Osuntokun
0386e0c297 Revert "channeldb: remove unsupported migrations"
This reverts commit 3ab4c749c6da4c2693b3978c0a0863787c9c3495.
2019-10-12 00:47:45 -07:00
Wilmer Paulino
4e1658a02f
htlcswitch: raise max cltv limit to 2016 blocks
The previous limit of 1008 proved to be low, given that almost 50% of
the network still advertises CLTV deltas of 144 blocks, possibly
resulting in routes with many hops failing.
2019-10-11 18:07:40 -04:00
Wilmer Paulino
cbf7e4886a
multi: extend QueryRoutes RPC with CLTV limit field 2019-10-11 18:07:39 -04:00
Wilmer Paulino
0fc401de19
routing+routerrpc: take max cltv limit into account within path finding
With the introduction of the max CLTV limit parameter, nodes are able to
reject HTLCs that exceed it. This should also be applied to path
finding, otherwise HTLCs crafted by the same node that exceed it never
left the switch. This wasn't a big deal since the previous max CLTV
limit was ~5000 blocks. Once it was lowered to 1008, the issue became
more apparent. Therefore, all of our path finding attempts now have a
restriction of said limit in in order to properly carry out HTLCs to the
network.
2019-10-11 18:04:49 -04:00
Lars Lehtonen
3587325438
macaroons: drop unused variables in tests
macaroons: defer service.Close() after error check in tests

macaroons: linter requires that nil contexts are changed to context.TODO()
2019-10-11 09:39:11 -07:00
Olaoluwa Osuntokun
e64493fe5b
Merge pull request #3588 from wpaulino/verify-release-guide
build: expand reproducible build system with build and verification steps
2019-10-10 15:55:52 -07:00
Olaoluwa Osuntokun
5dea7e042a
Merge pull request #3592 from joostjager/routerrpc-missing-failure
routerrpc: fix failure message marshalling
2019-10-10 15:24:56 -07:00
Joost Jager
2d405d56a4
routerrpc: fix failure message marshalling 2019-10-10 20:27:12 +02:00
Wilmer Paulino
3e499f7cc9
build: expand reproducible build system with build and verification steps 2019-10-09 22:48:03 -04:00
Johan T. Halseth
d15209abf2
make: default backend variable to btcd
This fixes the logging of used backend in the default (btcd) case.
2019-10-08 15:14:11 +02:00
Olaoluwa Osuntokun
2a3538fec8
Merge pull request #3360 from tyzbit/3357_start-time
rpcserver: startTime defaults to the unix epoch
2019-10-07 16:48:23 -07:00
Johan T. Halseth
1a5e39db88
Merge pull request #3541 from halseth/itest-connection-refused-ignore
lnd_test: give peers more time to successfully attempt connection
2019-10-07 10:23:52 +02:00
Johan T. Halseth
a3a04992b4
lnd_test: give peers more time to successfully attempt connection
We might hit a connection refused error in cases where the peer connects
to us exactly as we try to connect to it. We retry the connection within
a wait predicat, as it should be the case that the other peer
establishes the connection, and the two peers actually connects.
2019-10-07 09:46:23 +02:00
Olaoluwa Osuntokun
867e972808
build/release: remove ARM based darwin from release scripts
These result in an error with the current release script as is. Those
that want to run `lnd` on their iPhone/iPad can instead use the
`gomobile` bindings.
2019-10-04 15:39:20 -07:00
Olaoluwa Osuntokun
21e32c2719
Merge pull request #3577 from cfromknecht/update-release-targets
build/release: update release targets
2019-10-04 15:22:07 -07:00
Olaoluwa Osuntokun
5ef1f85998
Merge pull request #3578 from wpaulino/no-freelist-sync-option
config: add sync freelist cli flag
2019-10-04 15:16:30 -07:00
Olaoluwa Osuntokun
52c933ed28
Merge pull request #3576 from Roasbeef/chain-action-cnct-supplement-fix
contractcourt: use legacy chain actions of commitSet not found
2019-10-04 15:04:32 -07:00
Conner Fromknecht
122b43b447
build/release: add new release targets
Notably, solaris/amd64 and illumos/amd64 were added in go1.13. The
others were have been supported previously but were not build targets.

After go1.13, nacl/* will no longer be supported and plan9/* is still
considered experiemental. As a result they are omitted.
2019-10-04 14:50:26 -07:00
Olaoluwa Osuntokun
5c154febcc
Merge pull request #3575 from cfromknecht/disable-str-custom-tlvs
lnrpc+routerrpc: disable custom tlv records via rpc
2019-10-04 12:34:12 -07:00
Olaoluwa Osuntokun
c03fb8aca0
Merge pull request #3561 from Roasbeef/chan-validation-cleanup
chanvalidate: create new channel validation package
2019-10-04 12:32:07 -07:00
Olaoluwa Osuntokun
7a491776a1
contractcourt: use legacy chain actions of commitSet not found
In this commit, we fix a bug that would prevent users that had
unresolved contracts at the time of update from starting their nodes.
Before we added the conf commit set, the information needed to
supplement the resolvers was found in the chain action map. As a result,
if the conf commit set is nil, then we also need to check this legacy
data to ensure that we can supplement the resolvers to the best of our
ability based on the available data.

Fixes #3549.
2019-10-04 12:30:55 -07:00
Wilmer Paulino
b63ed5ad56
config: add sync freelist cli flag 2019-10-04 12:19:42 -04:00
Wilmer Paulino
fa96450db8
channeldb: add freelist sync option modifier 2019-10-04 12:19:41 -04:00