Merge pull request #1916 from valentinewallace/2022-11-chanman-payment-retries
[rust-lightning] / ARCH.md
diff --git a/ARCH.md b/ARCH.md
index c55e2ef74d368b7b944a93c513add5dfc3b5189d..9efccd9c9ddcec9d9812e0d0eb420975b3a0e98c 100644 (file)
--- a/ARCH.md
+++ b/ARCH.md
@@ -11,10 +11,10 @@ receive `ChannelMonitorUpdate`s from `ChannelManager` and persist them to disk b
 channel steps forward.
 
 There are two additional important structures that you may use either on the same device
 channel steps forward.
 
 There are two additional important structures that you may use either on the same device
-as the `ChannelManager` or on a separate one. `NetGraphMsgHandler` handles receiving channel
-and node announcements, which are then used to calculate routes by `get_route` for sending payments.
-`PeerManager` handles the authenticated and encrypted communication protocol,
-monitoring for liveness of peers, routing messages to `ChannelManager` and `NetGraphMsgHandler`
+as the `ChannelManager` or on a separate one. `P2PGossipSync` handles receiving channel
+and node announcements, which are then used to calculate routes by `find_route` for sending
+payments. `PeerManager` handles the authenticated and encrypted communication protocol,
+monitoring for liveness of peers, routing messages to `ChannelManager` and `P2PGossipSync`
 instances directly, and receiving messages from them via the `EventsProvider` interface.
 
 These structs communicate with each other using a public API, so that you can easily add
 instances directly, and receiving messages from them via the `EventsProvider` interface.
 
 These structs communicate with each other using a public API, so that you can easily add
@@ -37,14 +37,14 @@ At a high level, some of the common interfaces fit together as follows:
                      -----------------
                      | KeysInterface |  --------------
                      -----------------  | UserConfig |
                      -----------------
                      | KeysInterface |  --------------
                      -----------------  | UserConfig |
-         --------------------       |   --------------
-  /------| MessageSendEvent |       |   |     ----------------
      --------------------       |   |     | FeeEstimator | <-----------------------
+         --------------------       ^   --------------
+   ------| MessageSendEvent |       |   ^     ----------------
 /      --------------------       |   |     | FeeEstimator | <-----------------------
  |   (as MessageSendEventsProvider) |   |     ----------------                         \
  |   (as MessageSendEventsProvider) |   |     ----------------                         \
- |                         ^        |   |    /                 ------------------------ |
+ |                         ^        |   |    ^                ------------------------  |
  |                          \       |   |   /      ---------> | BroadcasterInterface |  |
  |                           \      |   |  /      /           ------------------------  |
  |                          \       |   |   /      ---------> | BroadcasterInterface |  |
  |                           \      |   |  /      /           ------------------------  |
- |                            \     v   v v      /                          ^           |
+ |                            \     |   | /      /                          ^           |
  |    (as                      ------------------       ----------------    |           |
  |    ChannelMessageHandler)-> | ChannelManager | ----> | chain::Watch |    |           |
  v               /             ------------------       ----------------    |           |
  |    (as                      ------------------       ----------------    |           |
  |    ChannelMessageHandler)-> | ChannelManager | ----> | chain::Watch |    |           |
  v               /             ------------------       ----------------    |           |
@@ -54,9 +54,9 @@ At a high level, some of the common interfaces fit together as follows:
  |                    -----------------        \       _----------------   /           /
  |                    | chain::Access |         \     / | ChainMonitor |---------------
  |                    -----------------          \   /  ----------------
  |                    -----------------        \       _----------------   /           /
  |                    | chain::Access |         \     / | ChainMonitor |---------------
  |                    -----------------          \   /  ----------------
- |                            |                   \ /          |
-(as RoutingMessageHandler)    v                    v           v
-  \                   --------------------     ---------   -----------------
-   -----------------> | NetGraphMsgHandler |   | Event |   | chain::Filter |
-                      --------------------     ---------   -----------------
+ |                            ^                   \ /          |
+(as RoutingMessageHandler)    |                    v           v
+  \                   -----------------        ---------   -----------------
+   -----------------> | P2PGossipSync |        | Event |   | chain::Filter |
+                      -----------------        ---------   -----------------
 ```
 ```