SomberNight
dca182992f
ln gossip: run sig checks in a thread
...
to avoid blocking the asyncio event loop
5 years ago
SomberNight
cedc71a8e3
ln gossip: make sure all signatures are verified
...
we have not been verifying signatures of ChannelUpdate messages...
(regression from 2d0ef78a11 )
5 years ago
SomberNight
ea56a259e4
lnworker: (trivial) split handle_error_code_from_failed_htlc method
5 years ago
ThomasV
018f09f2af
use mktx_for_open_channel in commands module. fix indentation
5 years ago
ThomasV
1a4e55a911
follow-up 90b228de83
5 years ago
ThomasV
8984db3384
follow-up 90b228de83
5 years ago
ThomasV
bed4ddbcb4
fix dict value assignment bug in import_channel_backup. In request_force_close, use Taskgroup with wait=any
5 years ago
ThomasV
90b228de83
fix wallet get_full_history: add onchain tx for channels not opened by us
5 years ago
SomberNight
2487a3fa90
tests: add test for prev
5 years ago
SomberNight
cb78f73ed0
lnworker: try to fail pending HTLCs when shutting down
...
This is most useful when receiving MPP where there is a non-trivial chance
that we have received some HTLCs for a payment but not all, and the user
closes the program. We try to fail them and wait for the fails to get
ACKed, with a timeout of course.
5 years ago
ThomasV
533d796a41
add TODO, rename check_received_mpp_htlc
5 years ago
ThomasV
549b9a95df
test_lnpeer: add test for mpp_timeout
5 years ago
ThomasV
7ae82c8230
Revert "lnworker: simplify request_force_close_from_backup"
...
This reverts commit ce88b36e81 .
5 years ago
SomberNight
3c019c2f9c
daemon/wallet/network: make stop() methods async
5 years ago
ThomasV
ce88b36e81
lnworker: simplify request_force_close_from_backup
5 years ago
ThomasV
652d10aa5f
Remove LNBackups object: no longer needed since LNWorker is instantiated by default.
5 years ago
ThomasV
ef661050c8
lnworker: set request status after LN payment
5 years ago
SomberNight
a125cd5392
tests: test payreq status after getting paid via LN
...
The test failures corresponding to single-part (non-MPP) payments expose a bug.
see 196b4c00a3/electrum/lnpeer.py (L1538-L1539)
`lnworker.add_received_htlc` is not called for single-part payments...
5 years ago
SomberNight
4069b455d0
lnaddr: add get_features method
5 years ago
ThomasV
196b4c00a3
Use new value of option_trampoline_routing flag, add it to our invoices.
...
Keep supporting old value for Eclair/Phoenix.
Do not add trampoline_routing_hints in invoices.
5 years ago
ThomasV
fd48b96335
follow-up prev commit
5 years ago
ThomasV
308b02ca7d
lnworker: fix amount in htlc_log after mpp bucket failure
5 years ago
ThomasV
5df4466812
rm fixme; it was for intermediate stage, between commits.
5 years ago
SomberNight
edb214aeca
lnworker.pay_to_node: re overpayment, raise before actually it happens
5 years ago
ThomasV
5663e59863
lnworker: fix amount_inflight.
...
(amount with routing fees were used on htlc failures)
5 years ago
ThomasV
31919d0425
lnworker: add assert amount_inflight <= amount_to_pay
5 years ago
ThomasV
5207c40cc3
fix trampoline forwarding: add_received_htlc must be indexed by payment_secret
5 years ago
ThomasV
2e4f45ec74
use two trampolines: fix blacklisting, use local variables for trampoline_fee_level and use_two_trampolines
5 years ago
ThomasV
5a2a724cb9
Receive MPP: Use persisted payment status to decide whether to
...
fulfill HTLCs. Without this commit, we might timeout a part of
a payment if the client is shut down before all parts are
fulfilled.
5 years ago
ThomasV
738411e32b
Trampoline forwarding:
...
- fix regression in create_routes:
fwd_trampoline_onion was not added to the tuple
- fix onion structure for e2e
- maybe_fulfill_htlc:
check the mpp_status of the outer onion,
return trampoline_onion to be forwarded
5 years ago
ThomasV
ba4d6bc8b3
trampoline MPP: fix total_msat in trampoline onion, and bucketing
5 years ago
ThomasV
253907fb60
lnworker: move buckets logic inside first branch of if statement (refactoring commit)
5 years ago
SomberNight
adbfb2dcc8
lnworker.pay_to_node: (fix) pass correct total_msat to pay_to_route
5 years ago
ThomasV
ca6ecd56f2
fix route for non-trampoline MPP
5 years ago
ThomasV
51f3c613a5
(minor) fix typos and indentation
5 years ago
SomberNight
9310e9023e
test_lnpeer: add test: multihop payment that routes around failure
...
This would have caught the overpayment bug fixed in
693583edc5
5 years ago
SomberNight
750d8cfab5
lnworker: run create_route_for_payment end-to-end, incl private edges
...
We pass the private edges to lnrouter, and let it find routes end-to-end.
Previously the edge_cost heuristics didn't apply to the private edges
and we were just randomly picking one of the route hints and use that.
So e.g. cheaper private edges were not preferred, but they are now.
PathEdge now stores both start_node and end_node; not just end_node.
5 years ago
ThomasV
259dacd56f
Trampoline MPP aggregation:
...
- trampoline node is the final recipient of MPP
- each trampoline receives a bucket of HTLCs
- if a HTLC from a bucket fails, wait for the entire bucket to fail
- move trampoline route and onion code into trampoline module
5 years ago
ThomasV
693583edc5
lnworker: amount passed in HtlcLog must be without fees
5 years ago
SomberNight
06ea06f7d3
_calc_routing_hints_for_invoice: incl max 15 chans to avoid qr overflow
...
Prioritise channels that are likely to be able to receive the payment.
5 years ago
SomberNight
6f894b9f88
_calc_routing_hints_for_invoice: also incl chans < invoice amount
...
now that we can receive MPP
5 years ago
SomberNight
1139720b58
lnworker: fix handle_error_code_from_failed_htlc for private channels
...
if the last (private) edge of the route errors, we need to try other route hints (if any)
5 years ago
SomberNight
7d7dcf0795
qt/kivy ChannelsList: if node alias is unknown, display node id
...
instead of "unknown"
5 years ago
ThomasV
f32d49b8ca
revert 'keep invoice INFLIGHT', check HTLCs before payment attempt
5 years ago
ThomasV
b6b13217b4
lnworker: keep invoice status INFLIGHT as long as HTLCs are inflight
5 years ago
ThomasV
7f61f22857
MPP receive: allow payer to retry after mpp timeout
5 years ago
SomberNight
16f0b30ced
lnpeer: MPP recv: only fulfill htlc if amt sum exact-matches total_msat
5 years ago
SomberNight
691ebaf4f8
lnworker/lnpeer: add some type hints, force some kwargs
5 years ago
ThomasV
c9d6d11604
create_trampoline_route: check that we can pay the amount and the fees, and that the route is sane
5 years ago
ThomasV
bf1d516959
lnworker: add fees from private path to the amount passed to find_route.
...
(see #7050 )
5 years ago