Description
As of today, the routing
package has the following tasks:
- Handling onchain notifications inside
routing/chainview
- Processing gossip messages via
ChannelRouter.handleNetworkUpdate
- Understanding network topology (
CachedGraph
) - Maintaining a probability graph (
MissionControl
) - Performing pathfinding (
findPath
) - Sending payments (
paymentLifecycle
)
We need to refine and move some tasks out of the routing
package to make ChannelRouter
fulfill its promise:
Lines 431 to 438 in 26892a2
Proposals
A high level summary of proposed changes, each item should have its own issue page to provide the details.
-
Similar onchain notifications have been implemented in
routing/chainview
,chainntnfs
andbtcwallet/chain
. We should instead have a single place deadling with blockchain data, i.e.,btcwallet/chain
should be the only entrypoint to access chain backends (TODO: add an issue page). -
Fix duplicated gossip handling found in
gossip
androuting
, detailed in [epic]: ChannelDB, Graph, Gossiper and Router separation #8833 -
A subservice to handle payments, detailed in [epic]: Payment and Router separation #8834
-
TBD: the relationship among the network graph, probability graph and pathfinding -
ChannelRouter
can be the single entity to interact with, while the probability graph can be a subservice that provides pathfinding.