Commit 23aa7ac
committed
Pipe channel node information through to
Sadly, the lightning gossip protocol operates by always flooding
peers with all the latest gossip they receive. For nodes with many
peers, this can result in lots of duplicative gossip as they
receive every message from every peer. As a results, some lightning
implementations disable gossip with new peers after some threshold.
This should mostly work as these peers expect to receive the latest
gossip from their many other peers.
However, in some cases an LDK node may wish to open public
channels but only has a single connection to the bulk of the rest
of the network - with one such peer which requests that it not
receive any gossip. In that case, LDK would dutifully never send
any gossip to its only connection to the outside world. We would
still send gossip for channels with that peer as it would be sent
as unicast gossip, but if we then open another connection to
another peer which doesn't have any connection to the outside world
any information on that channel wouldn't propagate.
We've seen this setup on some LSPs, where they have a public node
and then an LSP which only connects through that public node, but
expects to open public channels to its LSP clients.
In the next commit we'll start forwarding such gossip to all peers
by ignoring peer gossip limitations about all of our own channels.
Here we do the final prep work, passing the two sides of each
channel back from `handle_channel_update` calls and into
`forward_broadcast_msg`.forward_broadcast_msg
1 parent bf19607 commit 23aa7ac
File tree
6 files changed
+75
-49
lines changed- lightning-net-tokio/src
- lightning/src
- ln
- routing
- util
6 files changed
+75
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
664 | | - | |
| 663 | + | |
| 664 | + | |
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2199 | 2199 | | |
2200 | 2200 | | |
2201 | 2201 | | |
2202 | | - | |
2203 | | - | |
| 2202 | + | |
| 2203 | + | |
2204 | 2204 | | |
2205 | 2205 | | |
2206 | 2206 | | |
2207 | 2207 | | |
2208 | | - | |
| 2208 | + | |
2209 | 2209 | | |
2210 | 2210 | | |
2211 | 2211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
| 160 | + | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
614 | 627 | | |
615 | 628 | | |
616 | 629 | | |
| |||
2045 | 2058 | | |
2046 | 2059 | | |
2047 | 2060 | | |
2048 | | - | |
2049 | | - | |
2050 | | - | |
2051 | | - | |
| 2061 | + | |
2052 | 2062 | | |
2053 | 2063 | | |
2054 | 2064 | | |
| |||
2390 | 2400 | | |
2391 | 2401 | | |
2392 | 2402 | | |
2393 | | - | |
2394 | | - | |
2395 | | - | |
2396 | | - | |
| 2403 | + | |
2397 | 2404 | | |
2398 | 2405 | | |
2399 | 2406 | | |
| |||
2575 | 2582 | | |
2576 | 2583 | | |
2577 | 2584 | | |
2578 | | - | |
| 2585 | + | |
2579 | 2586 | | |
2580 | 2587 | | |
2581 | 2588 | | |
| |||
2585 | 2592 | | |
2586 | 2593 | | |
2587 | 2594 | | |
2588 | | - | |
| 2595 | + | |
2589 | 2596 | | |
2590 | 2597 | | |
2591 | 2598 | | |
| |||
2594 | 2601 | | |
2595 | 2602 | | |
2596 | 2603 | | |
2597 | | - | |
| 2604 | + | |
2598 | 2605 | | |
2599 | 2606 | | |
2600 | 2607 | | |
2601 | | - | |
| 2608 | + | |
| 2609 | + | |
2602 | 2610 | | |
2603 | 2611 | | |
2604 | 2612 | | |
| |||
2652 | 2660 | | |
2653 | 2661 | | |
2654 | 2662 | | |
2655 | | - | |
2656 | | - | |
| 2663 | + | |
2657 | 2664 | | |
2658 | 2665 | | |
2659 | 2666 | | |
2660 | | - | |
| 2667 | + | |
2661 | 2668 | | |
2662 | 2669 | | |
2663 | 2670 | | |
| |||
2696 | 2703 | | |
2697 | 2704 | | |
2698 | 2705 | | |
2699 | | - | |
| 2706 | + | |
2700 | 2707 | | |
2701 | 2708 | | |
2702 | 2709 | | |
| |||
2738 | 2745 | | |
2739 | 2746 | | |
2740 | 2747 | | |
2741 | | - | |
| 2748 | + | |
2742 | 2749 | | |
2743 | 2750 | | |
2744 | 2751 | | |
| |||
2775 | 2782 | | |
2776 | 2783 | | |
2777 | 2784 | | |
2778 | | - | |
2779 | | - | |
2780 | | - | |
2781 | 2785 | | |
2782 | 2786 | | |
2783 | 2787 | | |
| |||
3129 | 3133 | | |
3130 | 3134 | | |
3131 | 3135 | | |
| 3136 | + | |
| 3137 | + | |
3132 | 3138 | | |
3133 | 3139 | | |
3134 | 3140 | | |
3135 | 3141 | | |
3136 | 3142 | | |
3137 | 3143 | | |
3138 | | - | |
| 3144 | + | |
3139 | 3145 | | |
3140 | 3146 | | |
3141 | 3147 | | |
| |||
3152 | 3158 | | |
3153 | 3159 | | |
3154 | 3160 | | |
3155 | | - | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
3156 | 3166 | | |
3157 | 3167 | | |
3158 | 3168 | | |
| |||
3164 | 3174 | | |
3165 | 3175 | | |
3166 | 3176 | | |
3167 | | - | |
| 3177 | + | |
3168 | 3178 | | |
3169 | 3179 | | |
3170 | 3180 | | |
3171 | 3181 | | |
3172 | 3182 | | |
3173 | 3183 | | |
3174 | 3184 | | |
3175 | | - | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
3176 | 3190 | | |
3177 | 3191 | | |
3178 | 3192 | | |
| |||
3191 | 3205 | | |
3192 | 3206 | | |
3193 | 3207 | | |
3194 | | - | |
| 3208 | + | |
3195 | 3209 | | |
3196 | 3210 | | |
3197 | 3211 | | |
| |||
3668 | 3682 | | |
3669 | 3683 | | |
3670 | 3684 | | |
3671 | | - | |
| 3685 | + | |
3672 | 3686 | | |
3673 | 3687 | | |
3674 | 3688 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
561 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
562 | 565 | | |
563 | 566 | | |
564 | 567 | | |
| |||
2433 | 2436 | | |
2434 | 2437 | | |
2435 | 2438 | | |
2436 | | - | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
2437 | 2444 | | |
2438 | 2445 | | |
2439 | 2446 | | |
| |||
2443 | 2450 | | |
2444 | 2451 | | |
2445 | 2452 | | |
| 2453 | + | |
| 2454 | + | |
2446 | 2455 | | |
2447 | 2456 | | |
2448 | | - | |
| 2457 | + | |
2449 | 2458 | | |
2450 | 2459 | | |
2451 | 2460 | | |
| |||
2456 | 2465 | | |
2457 | 2466 | | |
2458 | 2467 | | |
2459 | | - | |
| 2468 | + | |
| 2469 | + | |
2460 | 2470 | | |
2461 | 2471 | | |
2462 | 2472 | | |
2463 | 2473 | | |
2464 | 2474 | | |
2465 | | - | |
| 2475 | + | |
2466 | 2476 | | |
2467 | 2477 | | |
2468 | 2478 | | |
| |||
2602 | 2612 | | |
2603 | 2613 | | |
2604 | 2614 | | |
2605 | | - | |
| 2615 | + | |
2606 | 2616 | | |
2607 | 2617 | | |
2608 | 2618 | | |
| |||
2633 | 2643 | | |
2634 | 2644 | | |
2635 | 2645 | | |
2636 | | - | |
2637 | 2646 | | |
2638 | | - | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
2639 | 2651 | | |
2640 | 2652 | | |
2641 | 2653 | | |
| |||
3180 | 3192 | | |
3181 | 3193 | | |
3182 | 3194 | | |
3183 | | - | |
| 3195 | + | |
3184 | 3196 | | |
3185 | 3197 | | |
3186 | 3198 | | |
| |||
3202 | 3214 | | |
3203 | 3215 | | |
3204 | 3216 | | |
3205 | | - | |
| 3217 | + | |
3206 | 3218 | | |
3207 | | - | |
| 3219 | + | |
3208 | 3220 | | |
3209 | 3221 | | |
3210 | 3222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1522 | 1522 | | |
1523 | 1523 | | |
1524 | 1524 | | |
1525 | | - | |
| 1525 | + | |
1526 | 1526 | | |
1527 | | - | |
| 1527 | + | |
1528 | 1528 | | |
1529 | 1529 | | |
1530 | 1530 | | |
| |||
0 commit comments