Commit Graph

5420 Commits

Author SHA1 Message Date
Wilmer Paulino
85cdb18b73
fundingmanager: send NodeAnnouncement to unadvertised channel counterparty
In this commit, we modify the funding manager to send our
NodeAnnouncement to our channel counterparty in the event of an
unadvertised channel. We do this to ensure that our counterparty learns
about some information about us that may aid them in one way or another
(e.g., addresses to reconnect, features supported, etc.).
2018-10-24 19:20:01 -07:00
Wilmer Paulino
748da2f50a
discovery/gossiper_test: modify TestProcessAnnouncement to process node
ann last

In this commit, we modify TestProcessAnnouncement to process the node
announcement last. We do this due to the recent change in the gossiper
where we'll only forward node announcements of nodes who intend to
advertised themselves within the network.

This change was needed in order to allow the node announcement to be
broadcast to the greater network, as otherwise the gossiper would assume
the node intends to stay private due to not having any advertised edges.
2018-10-24 17:28:56 -07:00
Wilmer Paulino
80196eb20f
discovery: ensure we only broadcast NodeAnnouncements of public nodes
In this commit, we modify the gossiper to no longer broadcast
NodeAnnouncements of nodes who intend to remain private. We do this to
prevent leaking their information to the greater network.
2018-10-24 17:28:55 -07:00
Wilmer Paulino
18ecb31983
routing/router: extend ChannelGraphSource interface with IsPublicNode
method
2018-10-24 17:28:54 -07:00
Wilmer Paulino
e795f7fce4
channeldb/graph: add method to determine if a node is public
In this commit, we add a method to the ChannelGraph struct that
determines whether a node is seen as public based on graph's source
node's point of view.
2018-10-24 17:28:53 -07:00
Johan T. Halseth
9cba3e813a
Merge pull request #1992 from halseth/listinvoices-offset
Make reversed listinvoices consistent in edge cases
2018-10-24 17:25:54 -07:00
Olaoluwa Osuntokun
d67c1fdcaa
Merge pull request #1954 from Roasbeef/tor-node-ann-fixes
server: ensure each time we update a node ann we also update the on-disk version
2018-10-24 17:10:42 -07:00
Olaoluwa Osuntokun
15508df96d
Merge pull request #1936 from cfromknecht/cnct-sane-txn-reliable-pub
conctractcourt: check sweep sanity + reliable publication
2018-10-24 17:08:38 -07:00
Conner Fromknecht
f9cec4a67b
cnct/contract_resolvers: propagate checkpoint failures 2018-10-24 13:57:10 -07:00
Conner Fromknecht
f957b78c0b
cnct/contract_resolvers: ignore duplicate publication error 2018-10-24 13:57:10 -07:00
Conner Fromknecht
682c4c96c7
cnct/contract_resolvers: reliably publish htlc success sweep 2018-10-24 13:57:10 -07:00
Conner Fromknecht
b7aebd92cf
cnct/contract_resolvers: reliably publish commit sweep 2018-10-24 13:57:10 -07:00
Olaoluwa Osuntokun
1b0d8e8f13
Merge pull request #2059 from wpaulino/openchannel-unconfirmed-funds
rpc: prevent spending unconfirmed funds within OpenChannel by default
2018-10-23 19:58:43 -07:00
Wilmer Paulino
7166130037
lnd_test: add onion addresses to testNodeAnnouncement
In this commit, we include onion addresses in testNodeAnnouncement to
ensure they properly propagate throughout the network.
2018-10-23 18:42:33 -07:00
Olaoluwa Osuntokun
0879a7354f
server: re-work initial node ann creation to use LightnignNode.NodeAnnouncement 2018-10-23 18:42:31 -07:00
Olaoluwa Osuntokun
e360005452
server: ensure we update our node ann with new tor addrs in initTorController
Fixes #1939.
2018-10-23 18:42:30 -07:00
Olaoluwa Osuntokun
338946eda4
server: update genNodeAnnouncement to also write new node ann to disk
In this commit, we update the genNodeAnnouncement method to also write
an updated version of the node announcment to disk. Before this commit,
we would update the in memory version, but then never write the new
version to disk. As a result, when connecting to new peers, we would
never propagate the new version of this announcement to the network.
2018-10-23 18:42:29 -07:00
Olaoluwa Osuntokun
eaa613f4f5
discovery+chan_series: replace usage of makeNodeAnn w/ new NodeAnnouncement method 2018-10-23 18:42:28 -07:00
Olaoluwa Osuntokun
2dcbdf2622
lnwallet: fix logging error when fee is too low in BtcdFeeEstimator 2018-10-23 18:42:26 -07:00
Wilmer Paulino
28cf413055
channeldb: add method to retrieve a node's node announcement 2018-10-23 18:42:25 -07:00
Olaoluwa Osuntokun
d0a29364fd
Merge pull request #2079 from sevastos/patch-1
discovery/gossiper: fix logging on failed channel update
2018-10-23 18:16:36 -07:00
Olaoluwa Osuntokun
ccc1dffac4
routing: minor style clean ups 2018-10-23 17:16:39 -07:00
Olaoluwa Osuntokun
fbd91feace
Merge pull request #1888 from joostjager/routestruct
lnrpc+routing: fix unmarshallRoute and simplify route structure
2018-10-23 17:07:23 -07:00
Johan T. Halseth
0e683d895b
Merge pull request #2074 from Roasbeef/chan-close-summary-fix-short-chan-remote-node
lnwallet: properly set the short chan ID for remote unilateral close …
2018-10-22 18:16:41 -07:00
Johan T. Halseth
b9f3c85288
Merge pull request #2024 from bob-333/patch-1
Improve 'updating' instructions
2018-10-22 18:15:42 -07:00
sevastos
98275178c7 discovery/gossiper: fix logging on failed channel update 2018-10-22 15:37:38 +03:00
Olaoluwa Osuntokun
6aa7c09308
lnwallet: properly set the short chan ID for remote unilateral close summaries
In this commit, we fix an existing bug wherein we wouldn't set the short
channel ID for the close summary in the database in the case that the
remote party force closed. The fix is simple, ensure that within
NewUnilateralCloseSummary we properly set the short channel ID. A test
has also been added in this commit, which fails without the
modifications to lnwallet/channel.go.

Fixes #2072.
2018-10-19 13:49:15 -07:00
Olaoluwa Osuntokun
6b19df162a
Merge pull request #2063 from Roasbeef/sweeper-update
multi: modify sweeper.CreateSweepTx to accept conf target, style changes
2018-10-18 19:42:24 -07:00
Olaoluwa Osuntokun
b48ff64b55
Merge pull request #2068 from Roasbeef/neutrino-sync-regression-fix
build: update neutrino to latest version
2018-10-18 19:40:19 -07:00
Olaoluwa Osuntokun
c973ef18bc
Merge pull request #2067 from halseth/concurrent-queue
chainntnfs+queue: move ConcurrentQueue to own package 'queue'
2018-10-18 18:44:05 -07:00
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