Commit Graph

264 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
90a13aedcf
Merge pull request #954 from halseth/remove-breacharbiter-signal
[mini] rpcserver: remove uneccessary signal to breacharbiter at force close
2018-03-28 15:21:42 -07:00
Johan T. Halseth
0f90c950da
rpcserver: remove uneccessary signal to breacharbiter at force close
This signal is no longer needed, as the breacharbiter is given
the UnilateralClosure chain event.
2018-03-28 08:10:19 +02:00
Nalin Bhardwaj
bca87535b3
rpcserver: fix GetInfo testnet detection
Fixes bug with Litecoin testnet detection.
2018-03-24 15:01:12 +05:30
Olaoluwa Osuntokun
7d14ed7a06
Merge pull request #904 from Roasbeef/invoice-macaroon
rpc+lnd: add new invoice-only macaroon
2018-03-21 15:27:31 -07:00
Olaoluwa Osuntokun
0155bcfd5c
Merge pull request #881 from Roasbeef/autopilot-target-chan-size
funding+pilot: increase min channel size, allow specifying chan size range for autopilot
2018-03-21 15:11:25 -07:00
Olaoluwa Osuntokun
a07579c541
rpc: modify the entity of invoice related RPC's to target the invoice entity
In this commit, we modify the existing invoice RPC macaroon permissions
to target a more specific entity: “invoices”. As a result of this
commit, once node operators update, they’ll need to regenerate their
readonly.macaroon as it now needs this additional entity encoded within
it.
2018-03-21 15:08:54 -07:00
Olaoluwa Osuntokun
6a294e7489
rpc: extend writePermissions and readPermissions with the invoice entity
In the prior commit, we added a new set of permissions and also a new
entity: “invoices”. We’ll add this set of entities to the read and
write permissions accordingly as well to ensure that the existing
macaroons have access to all the items that the invoice.macaroon does.
2018-03-21 15:08:53 -07:00
Olaoluwa Osuntokun
6c6285344b
rpc: add new invoicePermissions bakery.Op slice for an invoice only macaroon
In this commit, we add a new invoicePermissions slice. This contains
all the permission that a holder of an invoice.macaroon is able to
access, and no others. We also include read and write access to
addresses as this may be useful from the PoV of a merchant or exchange.
2018-03-21 15:08:50 -07:00
Wilmer Paulino
85b03780f3
rpcserver: determine which channels to return based on passed params 2018-03-19 11:19:04 -04:00
Olaoluwa Osuntokun
8127685462
funding+rpc: raise min channel size to 20k satoshis
In this commit, we raise the min channel size to 20k satoshis. This
will be evaluated before we check for dusty commitments. The goal of
this is to ensure ample room for fees at current, and future fee
levels.
2018-03-18 17:10:25 -07:00
Conner Fromknecht
bb16f9d29a
rpcserver: use primary chain default CLTV for add invoice 2018-03-14 16:57:43 -07:00
Olaoluwa Osuntokun
800eea931f
build+multi: switch from bolt to bbolt
In this commit, we switch from boltbd/bolt to coreos/bbolt as the
former is no longer being actively maintained.
2018-03-10 19:01:13 -08:00
Conner Fromknecht
935c757102
rpcserver: allow unsafe-disconects 2018-03-09 21:18:15 -08:00
Olaoluwa Osuntokun
b41222b316
rpc: update RPC server to disallow p2pkh adds, assume segwit for ConfirmedBalance 2018-03-06 16:04:04 -05:00
Olaoluwa Osuntokun
02852cdc3b
rpc: implement new ForwardingHistory command 2018-03-06 13:56:12 -05:00
Olaoluwa Osuntokun
06c1030999
rpc: populate new day, week, and month fee sums in FeeReport 2018-03-06 13:56:12 -05:00
vegardengen
a1fb22eb8d rpc: properly populate fee field in listpayments 2018-03-06 13:21:03 -05:00
Olaoluwa Osuntokun
f7ec490f44
Merge pull request #762 from halseth/fee-estimator
Add types for representing fee rates
2018-02-26 17:22:50 -08:00
Olaoluwa Osuntokun
7f04d927a0
rpc: fix queryroutes bug that assumed precise number of returned routes
In this commit, we fix a bug in the query routes RPC that could at
times lead to a panic. This would happen if the number of returned
routes was less than the number of expected routes. To remedy this,
we’ll return the minimum of the number of requested routes, and the
number of routes actually returned.
2018-02-26 16:31:50 -08:00
Johan T. Halseth
ba3f3e1942
rpcserver: express fee rates using types 2018-02-26 22:42:27 +01:00
Johan T. Halseth
31ec79e7ae
Merge branch 'master' into master 2018-02-21 13:54:26 +01:00
Jason Dufair
84551c616f lnwallet/lnrpc: Expose sync status to gRPC interface
This commit adds wallet_best_block_timestamp to the gRPC interface.
This is done in order to allow clients to calculate progress while
lnd syncs to the blockchain. wallet_best_block_timestamp is exposed
via the GetInfo() rpc call. Additionally, IsSynced() returns the
WalletBestBlockTimestamp as the second value in the tuple
that is returned, providing additional detail when querying about the
status of the sync. The BtcWallet interface has also been updated
accordingly.

This commit was created to support the issue to
[Add progress bar for chain sync] (lightninglabs/lightning-app#10) in
lightning-app
2018-02-20 19:00:06 -08:00
MeshCollider
2c2ed3c6a9 multi: Unify use of NodeKey in log messages 2018-02-19 17:48:39 -08:00
MeshCollider
4c42079436 multi: ensure NodeKey is set in rpc/cli 2018-02-19 17:48:39 -08:00
MeshCollider
915c4201b9 multi: remove internal peer_id usage 2018-02-19 17:48:39 -08:00
Daniel McNally
56c01ebcfe rpcserver: passing active net to zpay32.Decode 2018-02-19 10:20:54 -05:00
Olaoluwa Osuntokun
1879130f64
rpc: modify QueryRoutes response to return exact number of requested routes 2018-02-12 16:29:12 -08:00
Olaoluwa Osuntokun
65d6d77ef4
rpc: fix macaroon path entity for OpenChannelSync
In this commit, we fix a typo that caused issues when trying to use the
OpneChannelSync call.

Fixes #748.
2018-02-11 17:15:46 -08:00
Olaoluwa Osuntokun
22951cb364
lnd: account for new lnwire.Sig API and channeldb API changes 2018-02-06 20:14:33 -08:00
Daniel McNally
8543497dcc multi: fixing it's/its typos in comments 2018-02-06 19:13:07 -08:00
practicalswift
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
MeshCollider
4affab7bd7 multi: Addressing Tor support review comments 2018-02-05 17:37:46 -08:00
nsa
8c482f2be7 multi: Added a NetInterface to clean up config.go
This commit adds a new interface named NetInterface and two
implementations of it: RegularNet & TorProxyNet. These two structs
are used in config.go in an attempt to clean up the code and
abstract away the dialer and DNS functions.
2018-02-05 17:37:46 -08:00
nsa
e2142c778f multi: Added Tor support
This commit adds Tor support. Users can set the --TorSocks flag
to specify which port Tor's SOCKS5 proxy is listening on so that
lnd can connect to it. When this flag is set, ALL traffic gets
routed over Tor including DNS traffic. Special functions for
DNS lookups were added, and since Tor doesn't natively support
SRV requests, the proxySRV function routes connects us to
a DNS server via Tor and SRV requests can be issued directly
to the DNS server.

Co-authored-by: MeshCollider <dobsonsa68@gmail.com>
2018-02-05 17:37:46 -08:00
Olaoluwa Osuntokun
0d09f7a32a
Merge pull request #627 from cfromknecht/invert-inboud-display
rpcserver: flip inbound bool for display, fix internally later
2018-02-05 16:22:13 -08:00
Olaoluwa Osuntokun
7144707734
rpc: store display of alias in getinfo 2018-02-01 11:55:02 -08:00
Alex
21c29c33d7 multi: upgrade macaroons to v2, replace per-method auth with interceptors
This commit reworks the macaroon authentication framework to use the
v2 macaroon format and bakery API. It also replaces the code in each
RPC method which calls the macaroon verifier with interceptors which
call the macaroon verifier instead. In addition, the operation
permissions are reworked to fit the new format of "allow" commands
(specifically, entity/operation permissions instead of method
permissions).
2018-01-31 17:14:49 -08:00
Wilmer Paulino
f674e10a2b
lnd+cmd/lncli: handle ChannelPoint funding txid proto update
Since a ChannelPoint's funding txid can now be get/set as raw bytes or
a string, we first need to check what type it's currently set to before
accessing it.
2018-01-27 22:00:01 -05:00
Andrew Naoum
0f161c5033 channeldb+lnrpc: store the payment pre-image not rhash
Fixes #481.

Prior to this commit, payments stored in the channel DB only kept a
record of the payment hash. This is a problem as the preimage is what
serves as proof of payment and a user should be able to look up this
value in the future (not just immediately after payment).

Instead of storing both the payment hash and the preimage, we store the
preimage only since the hash can be derrived from this using a SHA256.

In the RPC listpayments command, we now give the preimage in addition to
the payment hash.
2018-01-27 18:36:33 -08:00
Wilmer Paulino
af16654c0c
rpcserver: allow payment of invoices with zero amount 2018-01-27 19:05:24 -05:00
Wilmer Paulino
1570c0ece8
rpcserver: allow creation of invoices with zero amount 2018-01-27 19:05:22 -05:00
Olaoluwa Osuntokun
4f91b66c51
Merge pull request #467 from bcongdon/feature/customize-alias-and-color
cmd/lncli+lnd: Add alias and color customization
2018-01-24 16:48:36 -08:00
Olaoluwa Osuntokun
d4e650c85d
peer: the chancloser no longer needs to notify the breach arb of settled transactions 2018-01-22 19:19:59 -08:00
Olaoluwa Osuntokun
69e6ec9954
peer+funding: remove unneeded channel handoff code with the breach arbiter
We no longer need to hand off new channels that come online as the
chainWatcher will be persistent, and always have an active signal for
the entire lifetime of the channel.
2018-01-22 19:19:50 -08:00
Olaoluwa Osuntokun
bfbec1c5d3
rpc: properly pass through the FinalCltvDelta param from the proto 2018-01-22 19:19:42 -08:00
Olaoluwa Osuntokun
3c66d94f87
rpc: route all channel force close requests through the ChainArbitrator 2018-01-22 19:19:38 -08:00
Conner Fromknecht
5126e43135
rpcserver: flip inbound bool for display, fix internally later 2018-01-18 14:10:35 -08:00
Benjamin Congdon
f1f1c8a257
rpc: Remove SetAlias and add Alias to GetInfo Response
This commit removes the SetAlias RPC function because it was deemed
unnecessary. This commit also populates the Alias field in the GetInfo
response
2018-01-18 07:39:37 -06:00
Johan T. Halseth
1f6268cdde
rpcserver: use cfg.Bitcoin.TimeLockDelta as default CLTVExpiry for invoices 2018-01-12 22:56:41 +01:00
Johan T. Halseth
f3dff2ae97
rpcserver: add min_htlc_msat parameter to OpenChannel and OpenChannelSync 2018-01-12 22:56:38 +01:00