1172 Commits
Author SHA1 Message Date
Steven Roose 445924b7a9 rpcserver: Clarify failure closing offline channel 2018-04-06 10:42:14 +02:00
Vadym Popov 29f1fda60d rpcserver: include a pending_open_balance in channelbalance response
Changes in `ChannelBalance` rpcserver method implementation to
add `pending_open_balance` counted according state of opened channel
2018-04-01 02:40:50 +03:00
Olaoluwa Osuntokun 6be6b48e09 Merge pull request #840 from halseth/openchannel-csv-delay
Add CSV delay flag to openchannel
2018-03-31 16:05:08 -07:00
Olaoluwa Osuntokun c5c23eb833 Merge pull request #974 from Roasbeef/invoice-expiry-fix
zpay32+rpc: ensure we can encode an expiry of math.MaxUint64, limit to 1 year in seconds
2018-03-30 13:12:53 -07:00
Olaoluwa Osuntokun 447a031435 peer: reject remote closes with active HTLCs
In this commit, we follow up to the prior commit by ensuring we won't
accept a co-op close request for a chennel with active HTLCs. When
creating a chanCloser for the first time, we'll check the set of HTLC's
and reject a request (by sending a wire error) if the target channel
still as active HTLC's.
2018-03-30 13:06:57 -07:00
Olaoluwa Osuntokun ecbeca5f29 rpc: disallow attempting a co-op close of a channel with active HTLCs
In this commit, we fix a bug that at times could cause any dangling
HTLC's to be sent to miner's fees if a user attempted to close out a
channel cooperatively that still had pending HTLC's. We'll first prevent
this at the RPC level by rejecting any attempts to trigger a co-op
channel closure while a channel still have dangling HTLC's.
2018-03-30 12:51:01 -07:00
Olaoluwa Osuntokun ef4512d1d8 rpc: limit the larger invoice expiry to 1 year
This is a follow up to the prior commit. In order to add an additional
layer of defense, we'll reject any expiry greater than 1 year.
2018-03-29 16:25:11 -07:00
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
Johan T. Halseth 938aefb573 rpcserver: pass incoming RemoteCsvDelay to server.OpenChannel 2018-03-22 14:54:00 +01:00
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
nsaandMeshCollider 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