Commit Graph

90 Commits

Author SHA1 Message Date
Carsten Otto
2b4fb44aaa fail edge computation without connected middleware
fixes #36
2022-06-06 16:39:53 +02:00
Carsten Otto
adf3795d47 ignore inactive local channels for route computation 2022-06-06 15:46:35 +02:00
Carsten Otto
b6e36b8691 query for open channels only 2022-06-06 15:32:28 +02:00
Carsten Otto
bad6a4472d make sure limit is at least 0 2022-05-29 11:16:29 +02:00
Carsten Otto
c63b828621 adapt fee rate for non-last hops based on configured fee rate
fixes #46
2022-05-29 11:08:19 +02:00
Carsten Otto
51d0338e5e use payment options for top-up 2022-05-27 23:09:36 +02:00
Carsten Otto
36133159ef pass payment options via POST 2022-05-27 22:41:31 +02:00
Carsten Otto
fc36b89b58 fail after 100 loop iterations 2022-05-26 16:35:57 +02:00
Carsten Otto
a166c07f8d add test 2022-05-26 15:07:00 +02:00
Carsten Otto
d5c3f39569 top-up: cancel invoice after failure
fixes #40
2022-05-26 14:58:54 +02:00
Carsten Otto
ff8e968dfa retry top-up after recoverable failure 2022-05-26 13:05:16 +02:00
Carsten Otto
e9bbec18ed fix test 2022-05-26 12:19:30 +02:00
Carsten Otto
4ea129a42a add test, remove duplicated fee rate limit 2022-05-26 12:14:06 +02:00
Carsten Otto
bbd7434c86 add fee rate including first hop to output 2022-05-26 10:18:33 +02:00
Carsten Otto
da4abdc2f8 top-up: impose stricter fee limit for all hops (but not the ones from the top-up peer) 2022-05-26 10:09:02 +02:00
Carsten Otto
22c5866f6b use native record getter 2022-05-26 09:44:06 +02:00
Carsten Otto
5fe147f683 remove check
The "available" liquidity used in the comparison is not the actual liquidity,
but the reduced amount (with a safety margin for fees). Comparing against it
defeats the purpose of the safety margin.
2022-05-24 22:39:19 +02:00
Carsten Otto
85e390d3ce lower fee rate weight for top-up payments 2022-05-23 00:20:14 +02:00
Carsten Otto
116dd4a508 provide better failure reporting 2022-05-22 23:11:40 +02:00
Carsten Otto
35ba9d9aeb increase expiry to 30 minutes 2022-05-22 20:04:14 +02:00
Carsten Otto
91aa30da88 exclude channels with fee rate at fee rate limit 2022-05-22 19:36:56 +02:00
Carsten Otto
20f6fb6178 fail route computation if amount does not fit 2022-05-22 19:00:10 +02:00
Carsten Otto
9d80b6f132 include channel ID in top-up invoice memo 2022-05-22 17:49:23 +02:00
Carsten Otto
86f62f60ac remove redundant amount from invoice memo 2022-05-22 17:45:13 +02:00
Carsten Otto
c20177877e fix import 2022-05-22 17:27:39 +02:00
Carsten Otto
23bc14648c add expiry for top-up invoices 2022-05-22 17:24:09 +02:00
Carsten Otto
38b81fa27a fix: only consider open channels 2022-05-22 17:05:32 +02:00
Carsten Otto
fc78fe2b66 fix fee limit for top up service: extension hop is included in check 2022-05-22 16:45:27 +02:00
Carsten Otto
302b7b57fd add test 2022-05-22 16:41:31 +02:00
Carsten Otto
59365f34ef add test 2022-05-22 16:18:08 +02:00
Carsten Otto
3c50596437 add top-up functionality 2022-05-22 16:00:50 +02:00
Carsten Otto
7957cb3ba2 introduce payment options 2022-05-22 14:43:50 +02:00
Carsten Otto
d17d61756c add basic top up service 2022-05-22 14:43:50 +02:00
Carsten Otto
5e9d1c8e2d fix race condition 2022-05-22 14:39:55 +02:00
Carsten Otto
697ea16884 also add arcs for small channels 2022-05-21 22:23:56 +02:00
Carsten Otto
9b1315867d replace constant by builder method 2022-05-19 20:51:22 +02:00
Carsten Otto
9593dfd161 allow channels with non-zero base fee
Note that this is an over-approximation. In the routing cost computation
it is assumed that the base fee is paid not just once per payment, but
possibly several times.

As an example, with a base fee of 2sat and a quantization of 10,000sat
(which is the current default), the assumed fee rate is the original
fee rate plus 200ppm (2sat * 1,000,000 / 10,000).

fixes #31
2022-05-17 10:15:04 +02:00
Carsten Otto
3af59b96bf ignore duplicate channels from route hints 2022-05-17 08:39:10 +02:00
Carsten Otto
156eaddaf3 do not restart computation if in-flight changes 2022-05-17 08:22:46 +02:00
Carsten Otto
6adf408a3b parse and use route hints from invoices 2022-05-16 20:40:00 +02:00
Carsten Otto
215e0bc23b add MPP sender with payment loop 2022-05-15 17:58:03 +02:00
Carsten Otto
7bfcbf7333 use PaymentInformation, provide isFailure/isSettled 2022-05-14 11:20:12 +02:00
Carsten Otto
74c6100a19 also provide failure code to SendToRouteObserver 2022-05-14 11:13:31 +02:00
Carsten Otto
5ec6a456e7 add PaymentInformation to track pending payments 2022-05-14 11:07:10 +02:00
Carsten Otto
8670519966 consider max htlc for lower/upper bounds 2022-05-13 21:19:10 +02:00
Carsten Otto
c024fc187b track in-flight coins per payment hash 2022-05-12 23:50:54 +02:00
Carsten Otto
ae996c0e5b also report values from stream observer 2022-05-12 22:48:26 +02:00
Carsten Otto
b24dc880b5 cancel in-flight if payment fails immediately 2022-05-09 23:36:03 +02:00
Carsten Otto
dd79bad4de deduct on-chain fee related reserve from available balance 2022-05-09 19:56:11 +02:00
Carsten Otto
f5888fde30 reduce available local liquidity by 1% to make some room for off-chain fees 2022-05-08 23:13:49 +02:00