1
0
Commit Graph

20 Commits

Author SHA1 Message Date
bitromortac
a3ec3f3228 trampoline: forwarding, use correct secret for legacy case 2021-12-20 16:45:15 +01:00
bitromortac
58dd8996fb trampoline: use trampoline policy for intermediate forwarders 2021-12-20 16:45:15 +01:00
ghost43
ce44a03c24 Merge pull request #7202 from bitromortac/2104-mpp-channel-splitting
MPP splitting algorithm: redesign and split within channels
2021-12-17 13:58:54 +00:00
wakiyamap
de596a6bfa Change lightning node(signet) 2021-08-12 17:13:28 +09:00
bitromortac
68bc9c2474 lnworker: improve route creation
- Separates the trampoline and local routing multi-part payment cases.
- Ask only for splits that don't send over a single channel (those have
  been tried already in the single-part case).
- Makes sure that create_routes_for_payment only yields partial routes
  that belong to a single split configuration.
- Tracks trampoline fee levels on a per node basis, previously, in the
  case of having two channels with a trampoline forwarder, the global
  fee level would have increased by two levels upon first try.
2021-07-16 11:27:36 +02:00
SomberNight
04bc7fd28f trampoline: fix "pay-to-legacy" workaround when using ACINQ node
It is the last Trampoline Forwarder that should be checked, not the
first one.

Consider route (of Trampolines only):
Alice-electrum -> T_ACINQ -> T_Hodlister -> Bob-electrum
Even if Bob has a transport open with ACINQ or even if Bob has a channel open with ACINQ,
Alice can safely use end-to-end trampoline for this route: ACINQ will not know who
the recipient is, so they will not try to do pay-to-open (and hold up the payment for minutes...).

related: https://github.com/ACINQ/lightning-kmp/pull/237
2021-07-02 19:42:58 +02:00
SomberNight
3a7f5373ac trampoline: improve payment success
- better error handling: previously we stopped all attempts on any of
  TRAMPOLINE_EXPIRY_TOO_SOON, UNKNOWN_NEXT_PEER, TEMPORARY_NODE_FAILURE.
  Instead we should retry (but see code comments).
- previously payments failed if ALL of the following criteria applied:
  - sender is paying via trampoline, but not via the ACINQ node (which is
    special cased)
  - receiver only has private channels and has put r_tags into invoice, along
    with setting the trampoline feature bit in the invoice, however the receiver
    is not connected to any trampoline forwarders directly
  The sender would then assume that the private routing hints in the invoice
  correspond to trampoline forwarders.
- also, previously if both the sender and the recipient used trampoline and
  they shared a trampoline forwarder (that they were both connected to), the
  private channels the recipient had (with nodes other than the shared TF)
  would never be attempted.
2021-07-02 18:44:39 +02:00
wakiyamap
639cd94dcb add signet support 2021-05-06 19:47:22 +09:00
ThomasV
03a95f36fc add trampoline.hodlister.co 2021-03-28 06:05:04 +02:00
ThomasV
bdd9c4823f hardcoded trampoline nodes: replace IPs with domain names 2021-03-26 15:49:10 +01:00
ThomasV
c3221f7bfe (temporary) disable e2e and dual trampoline if first trampoline is ACINQ 2021-03-22 16:23:01 +01:00
Benoit Verret
f731c38293 Minor style changes 2021-03-21 00:36:23 -04:00
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.
2021-03-08 19:16:48 +01:00
ThomasV
83993768e5 trampoline: do not add node in trampoline hints if it already is
the last trampoline of the route
2021-03-06 10:46:58 +01:00
ThomasV
16554afa1b follow-up previous commit (this was for testing) 2021-03-05 10:14:26 +01:00
ThomasV
2e4f45ec74 use two trampolines: fix blacklisting, use local variables for trampoline_fee_level and use_two_trampolines 2021-03-05 10:07:02 +01:00
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
2021-03-04 11:46:31 +01:00
ThomasV
ba4d6bc8b3 trampoline MPP: fix total_msat in trampoline onion, and bucketing 2021-03-04 10:05:09 +01:00
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.
2021-03-02 18:00:31 +01:00
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
2021-03-02 14:28:15 +01:00