Commit Graph

8736 Commits

Author SHA1 Message Date
Conner Fromknecht
9025a30f5d
lnwire/features: add EmptyFeatureVector constructor 2019-12-18 23:52:44 -08:00
Joost Jager
f5b1d40b9a
Merge pull request #3818 from joostjager/check-max-onion
routing: send to route max hops check
2019-12-19 08:08:14 +01:00
Wilmer Paulino
7f3771e74f
Merge pull request #3796 from carlaKC/3786-setupfrontshutdown
Add Upfront Shutdown Address to OpenChannelRequest
2019-12-18 11:28:29 -08:00
Olaoluwa Osuntokun
6fef37cc06
Merge pull request #3850 from alexbosworth/patch-14
lnrpc: Add macaroon entry for peers subscription
2019-12-18 12:33:01 -03:00
Johan T. Halseth
773212bdf8
Merge pull request #3783 from halseth/mobile-macaroons
[mobile] mobile macaroons support
2019-12-18 12:06:26 +01:00
Johan T. Halseth
d196a4431a
mobile: remove no-macaroons from sample config
Now that macaroons are supported, encourage usage.
2019-12-18 10:30:51 +01:00
Johan T. Halseth
5be6e1c92e
mobile: authenticate with rpc server
This makes the mobile bindings work with TLS and macaroons enabled,
which is supported from falafel 0.6.
2019-12-18 10:28:23 +01:00
Johan T. Halseth
200161e04c
mobile: update to falafel 0.6 2019-12-18 10:28:23 +01:00
Johan T. Halseth
7077d19589
lnd: add Authenticate method
Adds a global Authenticate method that can be used to get the
atuhentication options needed to call the grpc server.

Currently meant only for used with the mobile bindings, so we use the
admin macaroon.
2019-12-18 10:28:22 +01:00
Johan T. Halseth
ca22001bab
cert: add bufconn to TLS hostnames 2019-12-18 10:28:22 +01:00
Johan T. Halseth
27337dc973
lnd+rpcserver: use same serverOpts for custom listeners
Earlier we used emtpy grpc server options if custom listeners were set.
This was done to disable TLS. Now, we reuse the same server options as
for the regular listeners, in a move towards enabling TLS also here.
2019-12-18 10:28:22 +01:00
Joost Jager
7ecbe22531
Merge pull request #3814 from joostjager/sweeper-add-utxo
sweep: add wallet inputs to reach dust limit
2019-12-18 09:53:04 +01:00
Alex Bosworth
36e0b027ce
lnrpc: Add macaroon entry
Require peers read access to subscribe to peer events
2019-12-17 17:05:49 -08:00
carla
eb3a2e63f2
lnrpc: display local upfront shutdown 2019-12-17 23:21:30 +02:00
carla
6eab2a06dd
lnrpc+lncli: add feature bits to GetInfo 2019-12-17 23:21:14 +02:00
carla
496434259a
feature: add ListSets function 2019-12-17 23:18:33 +02:00
carla
c27d60b6d1
lncli: add option upfront shutdown to openchannel 2019-12-17 23:18:33 +02:00
carla
a2f029caca
lnrpc: add upfront shutdown address to open channel request 2019-12-17 23:18:25 +02:00
Joost Jager
e01600fdb8
sweep: add wallet inputs to reach dust limit
This commit allows sweeper to sweep inputs that on its own are not able
to form a sweep transaction that meets the dust limit.

This functionality is useful for sweeping small outputs. In the future,
this will be particularly important to sweep anchors. Anchors will
typically be spent with a relatively large fee to pay for the parent tx.
It will then be necessary to attach an additional wallet utxo.
2019-12-17 22:00:39 +01:00
Joost Jager
8353b6fd6e
sweep: extract sweepCluster method
Prepares for adding another level of nesting.
2019-12-17 22:00:37 +01:00
Joost Jager
34c9193bfc
sweep: create wallet interface
We need access to additional wallet functionality. This commit creates
an interface to prevent passing in multiple function pointers.
2019-12-17 22:00:35 +01:00
Joost Jager
b325aae4f2
sweep: extract positive input set struct
A refactoring that introduces no functional changes. This prepares for
the addition of wallet utxos to push the sweep tx above the dust limit.

It also enabled access to input-specific sweep parameters during tx
generation. This will be used in later commits to control the sweep
process.
2019-12-17 22:00:34 +01:00
Johan T. Halseth
fd4153851d
Merge pull request #3397 from carlaKC/peernotifier-addsubscribepeerrpc
lnrpc: Add subscribe peer events rpc
2019-12-17 21:46:24 +01:00
Johan T. Halseth
76dfd6326d
Merge pull request #3799 from carlaKC/chanfitness-bugfix
Bugfix: Chanfitness open time for offline peers
2019-12-17 20:54:34 +01:00
carla
3c28507062
lnrpc: Add subscribe peer events rpc 2019-12-17 21:26:55 +02:00
carla
eebc23a8ad
chanfitness: set open time for channels with offline peers
This commit addresses a bug in the channel event store
where the opened time of a channel event log was not
set for peers that were offline on startup.

Previously, opened time was set to the time of the first
event in the event log. This worked for online peers,
because the eventlog was created with an initial online
event. However, offline peers had no inital event so had
no open time set.

This commit simplifies the creation of an event log by
removing the initial event and setting open time for all
event logs. This has the effect of potentially introducing
a gap between opened time for a log and the first peer
online event for peers with channels that exist at startup
if a peer takes time to reconnect. However, the cost of this
is less than the benefit of reducing the bug-prone custom
code path that was previously in place.
2019-12-17 17:36:28 +02:00
carla
4f9795e8ae
chanfitness: switch to query by channel outpoint
In this commit, the channelEventStore in the channel
fitness subsystem is changed to identify channels
by their outpoint rather than short channel id. This
change is made made becuase outpoints are the preferred
way to expose references over rpc, and easier to perform
queries within lnd.
2019-12-17 17:36:28 +02:00
carla
47e700ba9e
rpcserver: return uptime errors for known channels
Upgrade logging of channel uptime/lifespan query errors
to returning the error, with the exception of the case
where the channel is known to the store. This error is
logged, due to the potential for race conditions between
the channel event store being notified of a new open
channel and the rpc channel subscription creating a rpc
channel struct (which queries for uptime).
2019-12-17 17:36:27 +02:00
carla
ec12463a95
chanfitness: define and export ErrChannelNotFound 2019-12-17 17:36:21 +02:00
Joost Jager
2ce22d912b
Merge pull request #3763 from joostjager/close-later
cnct: keep open channel data after channel commitment tx confirms
2019-12-17 16:00:20 +01:00
Olaoluwa Osuntokun
c660e16229
README: update dev slack link 2019-12-17 11:39:00 -03:00
Johan T. Halseth
7044219f90
lnd test: fix csv mempool sweep time
Since CSV locked outputs specifies the first block where they are
allowed to be included, they can actually be added one block earlier
into the mempool.

This led to a flake, where the sweep tx was already in the mempool at
the time we mined the last block, causing the next mempool check to
fail.
2019-12-17 15:29:27 +01:00
Johan T. Halseth
b3b355659b
lncfg+lncli: replace WithDialer->WitchContextDialer
WithDialer is deprecated, use WitchContextDialer instead.
2019-12-17 13:37:29 +01:00
Johan T. Halseth
f0bd4e775b
Merge pull request #3775 from halseth/mobile-listener-signal
[mobile] make Ready signal for custom listeners
2019-12-17 12:26:04 +01:00
Conner Fromknecht
46a994350c
Merge pull request #3834 from cfromknecht/transitive-features
feature: add transitive feature bit validation
2019-12-16 14:00:58 -08:00
Conner Fromknecht
34fd27280a
peer: validate remote peer's feature deps 2019-12-16 13:06:59 -08:00
Conner Fromknecht
3208e287c3
feature/manager: ensure all feature sets properly set deps 2019-12-16 13:06:45 -08:00
Conner Fromknecht
868a5425c1
feature/deps: validate feature dependencies 2019-12-16 13:06:30 -08:00
Conner Fromknecht
24e663519a
lnwire/features: add payment-addr and mpp feature bits 2019-12-16 13:06:15 -08:00
Joost Jager
77fde0f201
Merge pull request #3840 from joostjager/queryroutes-padding-comment
lnrpc: clarify block padding requirement for QueryRoutes
2019-12-16 15:48:08 +01:00
Olaoluwa Osuntokun
2c92b75df9
Merge pull request #3837 from cfromknecht/node-features-rpc
lnrpc: display node and peer features via rpc
2019-12-16 06:13:55 -08:00
Joost Jager
d85f378aa2
routing: move zero hops check 2019-12-16 14:53:47 +01:00
Joost Jager
31b2c22cf5
routing: check for invalid routes 2019-12-16 14:53:45 +01:00
Joost Jager
9ae02796fa
lnrpc: clarify block padding requirement for QueryRoutes 2019-12-16 13:38:01 +01:00
Conner Fromknecht
b2d276feb8
lnrpc: update all feature vectors to maps 2019-12-14 07:05:21 -08:00
Conner Fromknecht
990bdd6b64
lnrpc: display remote peer features via rpc 2019-12-14 07:05:07 -08:00
Conner Fromknecht
db0029d03d
lnrpc: add node features to LightningNode and NodeInfo 2019-12-14 07:04:51 -08:00
Joost Jager
b8abae6a7e
routing: rename route variable to prevent clash with package 2019-12-14 08:47:53 +01:00
Olaoluwa Osuntokun
eae45f9ad9
zpay32: use new DefaultInvoiceExpiry constant 2019-12-13 19:54:37 -08:00
Olaoluwa Osuntokun
e34bc3d645
Merge pull request #3694 from bhandras/i3448
invoices+channeldb: reject payments to expired invoices
2019-12-13 19:53:53 -08:00