Commit Graph

72 Commits

Author SHA1 Message Date
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
Carsten Otto
d1567f45d8 pay payment requests via pickhardt payments 2022-05-04 20:59:34 +02:00
Carsten Otto
168ee15e5d reduce quantization for small amounts 2022-05-04 19:51:25 +02:00
Carsten Otto
9279d43b44 avoid crash with conflicting liquidity information 2022-04-30 15:49:53 +02:00
Carsten Otto
0a84e83158 move models 2022-04-30 15:38:32 +02:00
Carsten Otto
9f965902a5 refactor Route 2022-04-30 15:23:24 +02:00
Carsten Otto
c811abfc87 refactor route(s) related code 2022-04-29 19:04:17 +02:00
Carsten Otto
e928c53eda move Edge to model module 2022-04-28 19:01:47 +02:00
Carsten Otto
d633e6e984 add isFailure method 2022-04-26 23:42:45 +02:00
Carsten Otto
fa92772367 make pickhardt payment details configurable 2022-04-25 19:57:29 +02:00
Carsten Otto
acad337dc7 fix cltv delta / expiry computation 2022-04-24 11:08:48 +02:00
Carsten Otto
5b080874c6 compute total expiry and per hop 2022-04-23 23:10:48 +02:00
Carsten Otto
17366cfca8 add time lock delta to policy 2022-04-23 15:17:13 +02:00
Carsten Otto
c1ae292f4a treat local channels as free 2022-04-23 14:51:38 +02:00
Carsten Otto
a050d3a7b4 Revert "treat local channels as free"
The modified policy is used to compute the fee for the
first hop (even though it is not paid). As such, it must
not be modified.

This reverts commit ed69174c10.
2022-04-23 12:55:11 +02:00
Carsten Otto
ed69174c10 treat local channels as free 2022-04-23 12:46:51 +02:00
Carsten Otto
e5949c9d5f fix fee computation
- compute fees per hop
- fees for first hop are not paid
- show fees for first hop
2022-04-23 11:03:28 +02:00
Carsten Otto
d68efdcbab keep information about liquidity bounds
and use it for pickhardt payments
2022-04-12 22:44:20 +02:00
Carsten Otto
b871cdde82 do not use local channels that cannot be found or where peer is offline 2022-04-02 19:00:36 +02:00