Commit Graph

7252 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
414f501e2b
rpc: set new RawTxHex field in GetTransactions response 2019-06-07 07:38:02 -07:00
Olaoluwa Osuntokun
0db0c5be93
lnrpc: add RawTxHex field to Transaction message 2019-06-07 07:37:35 -07:00
Olaoluwa Osuntokun
eaf86cc4f9
lnwallet: add raw tx hex attribute to ListTransactionDetails 2019-06-07 07:36:32 -07:00
Olaoluwa Osuntokun
52b7603d25
Merge pull request #3118 from valentinewallace/neutrino-assert-filter-header
neutrino: enable user to assert filter header chain.
2019-06-07 14:12:27 +02:00
Valentine Wallace
25b540fec4 chainregistry+config: add neutrino flag to assert filter header chain 2019-06-06 16:05:12 -07:00
Valentine Wallace
818dbb9e9b go.mod: update to latest neutrino to enable asserting filter hash. 2019-06-06 16:05:09 -07:00
Wilmer Paulino
2ccd93a2d0
Merge pull request #3031 from neevai/patch-1
Added NETWORK env var to btcd service
2019-06-06 13:12:27 -07:00
Olaoluwa Osuntokun
aa5156a1a9
Merge pull request #3089 from wpaulino/pendingsweeps-rpc
sweep+rpc+cmd/lncli: expose pending input sweeps over RPC + CLI
2019-06-06 13:15:48 +02:00
Conner Fromknecht
c338fdc2f2
Merge pull request #2535 from federicobond/once-refactor
multi: replace manual CAS with sync.Once in component start/stop
2019-06-06 12:51:51 +02:00
Wilmer Paulino
1d8b70eaa6
cmd/lncli: expose pending input sweeps within UtxoSweeper over lncli 2019-06-06 03:23:19 -07:00
Johan T. Halseth
473afbcac5
Merge pull request #3163 from Roasbeef/spend-ntfn-fix
build: update to latest btcd version
2019-06-06 11:30:55 +02:00
Wilmer Paulino
d01f88ecdc
lnrpc/walletrpc: expose pending input sweeps within UtxoSweeper over RPC 2019-06-05 12:10:33 -07:00
Wilmer Paulino
d75fac26bc
sweep: expose pending input sweeps within the UtxoSweeper 2019-06-05 12:10:32 -07:00
Wilmer Paulino
50a8f188a3
sweep: add lastFeeRate field to PendingInput
This will serve useful when exposing the pending inputs over RPC, since
we currently don't keep track of the last fee rate used for an input.
2019-06-05 12:10:31 -07:00
Olaoluwa Osuntokun
880279b266
Merge pull request #2973 from joostjager/newer-payment-rpc
routerrpc: async payment rpc
2019-06-05 15:03:38 +02:00
Joost Jager
220c2becb1
lncli: unify payinvoice and sendpayment code
This commit prepares lncli for moving over to routerrpc payment calls.
2019-06-05 12:41:57 +02:00
Joost Jager
2644759924
channeldb: add todo for more detailed failure reasons 2019-06-05 12:41:55 +02:00
Joost Jager
f03533c67a
routerrpc: convert sendpayment to async
Modify the routerrpc SendPayment api to asynchronous. This allows
callers to pick up a payment after the rpc connection was lost or lnd
was restarted.
2019-06-05 12:41:53 +02:00
Joost Jager
07d289c14e
routing: add SendPaymentAsync to router 2019-06-05 12:41:51 +02:00
Joost Jager
eb2647e8fc
channeldb: add subscription to control tower
Allows other sub-systems to subscribe to payment success and fail
events.
2019-06-05 12:41:49 +02:00
Joost Jager
87d3207baf
channeldb+routing: move control tower interface to routing
This commit creates an empty shall for control tower in the routing
package. It is a preparation for adding event notification.
2019-06-05 12:41:47 +02:00
Joost Jager
eb700d35e1
routerrpc: extend payment request parameters
Add missing parameters to routerrpc version of SendPayment.
2019-06-05 12:41:45 +02:00
Joost Jager
19d5f8f82c
routing: move default cltv assignment out of router
This commit lifts default setting up to the rpc server level, in line
with other payment defaults.
2019-06-05 12:41:43 +02:00
Joost Jager
afd86763ac
lntypes: add ZeroHash 2019-06-05 12:41:41 +02:00
Olaoluwa Osuntokun
970d760407
Merge pull request #3142 from cfromknecht/htlc-tie-breaker
lnwallet: add commitment transaction sorting with CLTV tie breaker
2019-06-05 12:05:04 +02:00
Olaoluwa Osuntokun
5fd2fe9ffa
build: update to latest btcd version
In this commit, we update to the latest version of btcd which includes a
fix for notifying based on pkScripts for spends/confirmations within the
ChainNotifier.
2019-06-05 02:50:05 -07:00
Olaoluwa Osuntokun
7453dbeacc
Merge pull request #2802 from joostjager/probability
routing: probability based path finding
2019-06-05 11:30:55 +02:00
Olaoluwa Osuntokun
1077e74667
Merge pull request #3161 from wpaulino/travis-logs-regression
travis: fix log upload regression after itest move
2019-06-05 08:48:08 +02:00
Conner Fromknecht
b26b88a1e2
lnwallet/channel: use proper commitment output sorting 2019-06-05 08:35:06 +02:00
Conner Fromknecht
a627c65d65
lnwallet/commit_sort: add commit sorting with htlc tie breaker 2019-06-05 08:34:45 +02:00
Wilmer Paulino
18342410f0
travis: fix log upload regression after itest move 2019-06-04 15:03:54 -07:00
Wilmer Paulino
e6c0ddc825
Merge pull request #3155 from halseth/sendtoroute-zero-value
routing/router: correct SendToRoute's amount record in DB
2019-06-04 14:57:41 -07:00
Olaoluwa Osuntokun
0139300a00
Merge pull request #3154 from halseth/chainntfs-neutrino-async-getutxo
neutrinonotify: async call GetUtxo from RegisterSpendNtfn
2019-06-04 14:13:44 -07:00
Olaoluwa Osuntokun
12607c9eaa
Merge pull request #990 from michael1011/master
added conf_target and sat_per_byte to closeallchannels
2019-06-04 08:06:46 -07:00
Joost Jager
054e42f680
routing+routerrpc: expose mission control parameters in lnd config
This commit exposes the three main parameters that influence mission
control and path finding to the user as command line or config file
flags. It allows for fine-tuning for optimal results.
2019-06-04 13:22:50 +02:00
Johan T. Halseth
6d52128da0
routing/router test: assert SendToRoute init values
This commit adds an assertion to the SendToRoute test that the payment
value stored to the DB during SendToRoute execution is the correct one.

This assertion would fail before the previous commit that fixed a
missing value initialization.
2019-06-04 10:34:59 +02:00
Johan T. Halseth
1161d87eec
routing/router: correct SendToRoute's amount record in DB
Previously we would mistakenly use the payment value from the dummy
LightningPayment struct, which would obviously be 0 always. Now we
instead calculate the value from the given route.
2019-06-04 10:13:33 +02:00
Joost Jager
9b71d90a6e
lncli: add querymc command
Adds querymc command to lncli to dump mission control state.
2019-06-04 10:00:29 +02:00
Joost Jager
f7982f0f4c
routing+routerrpc: expose mission control state over rpc
This commit exposes mission control state for rpc for development
purposes.
2019-06-04 10:00:27 +02:00
Joost Jager
7133f37bb8
routing: global probability based mission control
Previously every payment had its own local mission control state which
was in effect only for that payment. In this commit most of the local
state is removed and payments all tap into the global mission control
probability estimator.

Furthermore the decay time of pruned edges and nodes is extended, so
that observations about the network can better benefit future payment
processes.

Last, the probability function is transformed from a binary output to a
gradual curve, allowing for a better trade off between candidate routes.
2019-06-04 10:00:25 +02:00
Joost Jager
3349d517aa
routing: add min probability to path finding
This commit adds a new restriction to pathfinding that allows returning
only routes with a minimum success probability.
2019-06-04 10:00:23 +02:00
Joost Jager
6b70791c2d
routing: use probability source in path finding
This PR replaces the previously used edge and node ignore lists in path
finding by a probability based system. It modifies path finding so that
it not only compares routes on fee and time lock, but also takes route
success probability into account.

Allowing routes to be compared based on success probability is achieved
by introducing a 'virtual' cost of a payment attempt and using that to
translate probability into another cost factor.
2019-06-04 10:00:21 +02:00
Joost Jager
b6102ad191
routing: remove querybandwidth self node check
This function is only ever called for channels connected to self.
2019-06-04 10:00:19 +02:00
Joost Jager
68f2a04f42
routerrpc: expose mission control reset rpc 2019-06-04 10:00:17 +02:00
Joost Jager
3db48dc53f
routing: Route String() method 2019-06-04 10:00:15 +02:00
Joost Jager
35003bd87c
routing/test: sort nodes for channel graph
This commit ensures that channel endpoints in EdgeInfo are ordered
node1 < node2 to not violate assumptions being made by dependent code.
2019-06-04 10:00:13 +02:00
Johan T. Halseth
3a44574625
chainntnfs/neutrinonotify: async call GetUtxo from RegisterSpendNtfn
Since GetUtxo is a potentially long running call, we would see
RegisterSpendNtfn block in some cases, in particular on starting the
chain watcher, causing lnd to hang on startup.

This commit makes the call to GetUtxo in a go routine, letting
RegisterSpendNtfn return immediately when the notification events are
created.
2019-06-04 09:58:04 +02:00
Olaoluwa Osuntokun
4068e78af6
Merge pull request #2717 from cfromknecht/send-payment-payreq
lnrpc+rpcserver: display payreq via listpayments
2019-05-31 17:09:04 -07:00
Joost Jager
1b5655f7fa
Merge pull request #3113 from joostjager/sendtoroute-error-fix
routing: return structured error for send to route
2019-05-30 23:20:14 +02:00
Conner Fromknecht
a826d85dac
lntest/itest/lnd_test: assert payreq in listpayment matches paid invoice 2019-05-30 14:18:04 -07:00