Commit Graph

6891 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
3f65a8b592
build: update neutrino to latest version
In this commit, we update neutrino to the latest version which includes
a fix for a recent regression. Additionally, this new version adds some
new logging statements to help us track down a lingering issue wherein
filter headers are written out of order.
2018-10-18 18:40:31 -07:00
Olaoluwa Osuntokun
fc21bf091a
multi: modify sweeper.CreateSweepTx to accept conf target, style changes
In this commit, we modify the newly introduced UtxoSweeper.CreateSweepTx
to accept the confirmation target as a param of the method rather than a
struct level variable. We do this as this allows each caller to decide
at sweep time, what the fee rate should be, rather than using a global
value that is meant to work in all scenarios. For example, anytime
we're sweeping an output with a CLTV lock that's has a dependant
transaction we need to sweep/cancel, we may require a higher fee rate
than a regular force close with a CSV output.
2018-10-18 18:08:27 -07:00
Wilmer Paulino
16b5f705d8
lntest/harness: update to reflect new OpenChannel unconfirmed spends 2018-10-18 16:55:53 -07:00
Olaoluwa Osuntokun
90fe860a3c
Merge pull request #2062 from cfromknecht/sweeper-filter-unknown-witness-types
sweep/sweeper: ignore unknown witness types
2018-10-18 16:50:29 -07:00
Wilmer Paulino
3ac2e8486e
rpc: prevent spending unconfirmed funds within OpenChannel by default
In this commit, we address a slight regression in the defaults provided
by the OpenChannel RPC with regards to spending unconfirmed outputs to
fund funding transactions. We now add a new boolean parameter to
OpenChannelRequest: SpendUnconfirmed. If set, we'll use this to
indicate to the server that the funding transaction of the channel to be
created can spend the wallet's unconfirmed outputs to fund it. This
addition is needed because otherwise, if the caller doesn't specify a
MinConfs parameter to the request, then a default of 0 will be used,
which is not ideal.
2018-10-18 16:49:24 -07:00
Johan T. Halseth
dbf9b4ea4c
chainntnfs+queue: move ConcurrentQueue to own package 'queue' 2018-10-18 12:38:10 -07:00
Olaoluwa Osuntokun
d52e691d5f
Merge pull request #2023 from ErikEk/typo-fix-autopilot
Autopilot: Typo fixes
2018-10-17 20:06:49 -07:00
Conner Fromknecht
cae4f43c19
sweep/sweeper: ignore unknown witness types
This commit restores the sweep behavior of
filtering inputs with unknown witness types
from the final sweep transaction. Currently,
such inputs will be included without adding
anything to the weight estimate, possibly
creating a transaction with insufficient fees.
2018-10-17 16:21:06 -07:00
Olaoluwa Osuntokun
c9e42a6ce0
Merge pull request #1978 from joostjager/sweeper-prep
sweep: prepare for sweeper
2018-10-17 16:04:25 -07:00
Joost Jager
95bf858ac3
sweep: refactor functions and unify tx info logging 2018-10-17 12:44:34 +02:00
Joost Jager
6977d59e35
cnct: reuse sweep tx logic for success resolver 2018-10-17 12:44:34 +02:00
Joost Jager
c1d845aa0d
cnct: reuse sweep tx logic for commit resolver
Removes duplicate sweep tx code from commit resolver
and delegates generation to UtxoSweeper in the sweep
package.
2018-10-17 12:44:34 +02:00
Joost Jager
7d69df77ed
sweep: create new Input interface
This commit introduces a common interface for sweep
inputs. It eliminates the type checking from UtxoSweeper.

Also the formerly present Amount() getter is removed. It was redundant
because this value is present in SignDesc().Output.Value as well.
2018-10-17 12:44:33 +02:00
Joost Jager
4dab405623
sweep: move sweep tx generation into sweep package
Sweep txes are currently generated in multiple locations. Moving
the sweep tx generation into a shared package will allow us to
reuse that logic.
2018-10-17 12:44:33 +02:00
Joost Jager
9fcc7ee390
utxonursery: move spendable output structs to sweep package
This commit moves the output structs to a new package as a
preparation for moving more logic into that package.
2018-10-17 12:44:33 +02:00
Olaoluwa Osuntokun
4c0ca37174
Merge pull request #1389 from Bluetegu/noprivate-describegraph-1037
Add --noprivate flag to describegraph rpc to filter out private channels
2018-10-16 20:01:35 -07:00
Olaoluwa Osuntokun
77553707a0
Merge pull request #1959 from halseth/neutrino-api
Update to new Neutrino API
2018-10-16 19:59:27 -07:00
Johan T. Halseth
29acb9f1f8
routing/chainview: new neutrino API 2018-10-16 19:28:29 -07:00
Johan T. Halseth
6db0bc4b05
chainntnfs/neutrino_debug: new neutrino API 2018-10-16 19:27:07 -07:00
Johan T. Halseth
e0fd163096
chainntnfs/neutrino: new neutrino API 2018-10-16 19:26:41 -07:00
Johan T. Halseth
146875ba65
lnwallet/btcwallet: remove filter check
GetBestBlock will now return only blocks where the filter header is synced.
2018-10-16 19:24:22 -07:00
Johan T. Halseth
7ad1f9f7d7
dep: update neutrino and btcwallet deps 2018-10-16 19:24:20 -07:00
Olaoluwa Osuntokun
db62508038
lnrpc: re-compile protos after updating to latest version of gRPC 2018-10-16 17:12:16 -07:00
Olaoluwa Osuntokun
963c811d02
Merge pull request #2055 from joostjager/grpc1-15-0
build: upgrade grpc to 1.15.0
2018-10-16 17:07:15 -07:00
Joost Jager
18d38d1d11
lnrpc: fix unsafe stream send 2018-10-15 21:13:37 +02:00
Joost Jager
46de56199a
build: upgrade grpc to 1.15.0 2018-10-15 20:10:17 +02:00
Olaoluwa Osuntokun
ab12184544
Merge pull request #2051 from joostjager/cltv-too-far
htlcswitch+routing: implement expiry_too_far failure
2018-10-15 10:24:57 -07:00
Boblechinois
5aad6768b3 update 'configuring_tor' file 2018-10-15 14:25:12 +02:00
Joost Jager
1d97cf1229
htlcswitch+routing: implement expiry_too_far failure
In this commit we add a check to HtlcSatifiesPolicy to verify that the
time lock for the outgoing htlc that is requested in the onion packet
isn't too far in the future.

Without this check, anyone could force an unreasonably long time lock on
the forwarding node.
2018-10-15 08:51:08 +02:00
Joost Jager
a779004a18
lnrpc+routing: fix issues with missing data in unmarshallRoute
In this commit the dependency of unmarshallRoute on edge policies being
available is removed. Edge policies may be unknown and reported as nil.
SendToRoute does not need the policies, but it does need pubkeys of the
route hops. In this commit, unmarshallRoute is modified so that it
takes the pubkeys from edgeInfo instead of channelEdgePolicy.

In addition to this, the route structure is simplified. No more connection
to the database at that point. Fees are determined based on incoming and
outgoing amounts.
2018-10-13 22:59:23 +02:00
Olaoluwa Osuntokun
e5b84cfada
Merge pull request #2029 from halseth/new-utxos-trace-logging
[trivial] routing/chainview: demote logging of new utxos for filter to Trace
2018-10-12 14:12:40 -07:00
Olaoluwa Osuntokun
a5466830e7
Merge pull request #2038 from joostjager/ripemd
lnwallet: export the Ripemd160H function
2018-10-12 13:26:28 -07:00
Joost Jager
cf57c1daa3
lnwallet: export the Ripemd160H function
The reason for exporting this function is that we now have external
applications that generate custom Bitcoin scripts.
2018-10-12 08:50:07 +02:00
Johan T. Halseth
d8863bea8c
routing/chainview: demote logging of new utxos for filter to Trace
It was previously Debug, which would spam the logs at startup, and not
provide very useful (human-readable) information.
2018-10-10 15:00:50 +02:00
Johan T. Halseth
b00e43eec1
Merge pull request #2028 from halseth/travis-race-env
travis: correctly set RACE=TRUE in build matrix
2018-10-10 13:22:50 +02:00
Johan T. Halseth
2c62f3e1f6
travis: correctly set RACE=TRUE in build matrix 2018-10-10 11:03:24 +02:00
bob-333
c7bbc9e4b3
Update INSTALL.md
Every time I try to update lnd by following these instructions it fails. Most recently like this:

    $ make
     Compiling dependencies.
    dep ensure -v
    # Bringing vendor into sync
    grouped write of manifest, lock and vendor: failed to export github.com/lightninglabs/neutrino: fatal: failed to unpack tree object 838f7ba74d217d188efc223604bd280b4e3f0238
    : exit status 128
    Makefile:116: recipe for target 'dep' failed
    make: *** [dep] Error 1

I found that if I `make clean` before running `make` then it doesn't fail.
2018-10-09 09:39:35 -07:00
ErikEk
c5f61b3c06 Typo fix autopilot 2018-10-09 18:28:34 +02:00
Olaoluwa Osuntokun
61e8677419
build: remove --broken in new git commit extraction 2018-10-08 15:00:07 +09:00
Olaoluwa Osuntokun
3fda1029c0
Merge pull request #1786 from Roasbeef/golang-1.1
build+docs: bump to golang 1.11
2018-10-08 13:26:07 +09:00
Olaoluwa Osuntokun
8dfcbc160d
Merge pull request #703 from cfromknecht/build
Build Package
2018-10-08 13:24:00 +09:00
Olaoluwa Osuntokun
f07260afbc
htlcswitch: fix lint under go 1.11 2018-10-07 14:37:41 +09:00
Olaoluwa Osuntokun
8bc61693bf
build: update build file to exclude go 1.10 from linting
In this commit, we modify our build file to only lint under go 1.11. We
do this as there's been a breaking change in gofmt between go 1.10 and
go 1.11 that causes files which pass the linter under go 1.10, to fail
the linter under go 1.11. In the end, we only really need to lint using
one version of go.

In order to achieve this, we "unroll" the build matrix to enumerate each
version and the environment variables that it should be run with. We
then modify the Makefile to only include the lint directive if the
particular env variable is set ($(USE_LINT)). With these two changes,
we'll now only lint under go 1.11.
2018-10-07 14:37:39 +09:00
Olaoluwa Osuntokun
d8e6085c17
multi: update to go 1.11 gofmt 2018-10-07 14:37:38 +09:00
Olaoluwa Osuntokun
233246714d build+docs: bump to golang 1.11 2018-10-07 11:28:49 +09:00
Olaoluwa Osuntokun
e9809c715e
Merge pull request #2001 from Roasbeef/new-neutrino-parallel-sync
build: update neutrino version to new version with parallel block+fil…
2018-10-07 09:49:03 +09:00
Conner Fromknecht
c2d9cb11d3
docs/MAKEFILE: add log params to unit test targets 2018-10-05 13:04:45 +09:00
Conner Fromknecht
1881ccdaf2
Makefile: merge build+install tags with DEV/PROD_TAGS, trim whitespace 2018-10-05 13:04:45 +09:00
Conner Fromknecht
57ec03564e
make/testing_flags: add LOG_TAGS, set using log envvar
The default is nolog, which prevents the unit tests in
the main pkg from being active, since otherwise they
would print as if they were being run like a dev build
of the daemon. Users can pass in custom tags when running
the Makefile by passing arguments using the log variable,
e.g. log="xxxxx xxx"".
2018-10-05 13:04:45 +09:00
Conner Fromknecht
2e489fcf24
rpcserver: replace DebugBuild cmp w/ IsDevBuild in AbandonChannel 2018-10-05 13:04:45 +09:00