Merge pull request #3096 from alecchendev/2024-06-drop-one-signer-call
[rust-lightning] / ARCH.md
diff --git a/ARCH.md b/ARCH.md
index 3e2c3091be57adddc7ee9deec9e881510b46025c..bd5fc1bd3164a5ce749ade66c19bb55f6fd74700 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,26 +37,26 @@ At a high level, some of the common interfaces fit together as follows:
                      -----------------
                      | KeysInterface |  --------------
                      -----------------  | UserConfig |
                      -----------------
                      | KeysInterface |  --------------
                      -----------------  | UserConfig |
-         --------------------       |   --------------
-   ------| MessageSendEvent |       |   |     ----------------
+         --------------------       ^   --------------
+   ------| MessageSendEvent |       |   ^     ----------------
   /      --------------------       |   |     | FeeEstimator | <-----------------------
  |   (as MessageSendEventsProvider) |   |     ----------------                         \
   /      --------------------       |   |     | FeeEstimator | <-----------------------
  |   (as MessageSendEventsProvider) |   |     ----------------                         \
- |                         ^        |   |    /                ------------------------  |
+ |                         ^        |   |    ^                ------------------------  |
  |                          \       |   |   /      ---------> | BroadcasterInterface |  |
  |                           \      |   |  /      /           ------------------------  |
  |                          \       |   |   /      ---------> | BroadcasterInterface |  |
  |                           \      |   |  /      /           ------------------------  |
- |                            \     v   v v      /                          ^           |
+ |                            \     |   | /      /                          ^           |
  |    (as                      ------------------       ----------------    |           |
  |    ChannelMessageHandler)-> | ChannelManager | ----> | chain::Watch |    |           |
  v               /             ------------------       ----------------    |           |
 --------------- /                  (as EventsProvider)         ^            |           |
 | PeerManager |-                             \                 |            |           |
 ---------------                               \                | (is-a)     |           |
  |    (as                      ------------------       ----------------    |           |
  |    ChannelMessageHandler)-> | ChannelManager | ----> | chain::Watch |    |           |
  v               /             ------------------       ----------------    |           |
 --------------- /                  (as EventsProvider)         ^            |           |
 | PeerManager |-                             \                 |            |           |
 ---------------                               \                | (is-a)     |           |
- |                    -----------------        \       _----------------   /           /
- |                    | chain::Access |         \     / | ChainMonitor |---------------
- |                    -----------------          \   /  ----------------
- |                            |                   \ /          |
-(as RoutingMessageHandler)    v                    v           v
-  \                   ----------------------   ---------   -----------------
-   -----------------> | NetGraphMsgHandler |   | Event |   | chain::Filter |
-                      ----------------------   ---------   -----------------
+ |                    --------------           \       _----------------   /           /
+ |                    | UtxoLookup |            \     / | ChainMonitor |---------------
+ |                    --------------             \   /  ----------------
+ |                            ^                   \ /          |
+(as RoutingMessageHandler)    |                    v           v
+  \                   -----------------        ---------   -----------------
+   -----------------> | P2PGossipSync |        | Event |   | chain::Filter |
+                      -----------------        ---------   -----------------
 ```
 ```