X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ARCH.md;h=5b9304cce009f8d9b3eb1a7fcff3721fc3efb094;hb=refs%2Fheads%2F2021-07-broken-beta;hp=c4f94280c4890c8a5064339ab8b553fb735f93b0;hpb=07a7e34f89323540f17abbf9a4b708d27f6bd18f;p=rust-lightning diff --git a/ARCH.md b/ARCH.md index c4f94280..5b9304cc 100644 --- a/ARCH.md +++ b/ARCH.md @@ -6,7 +6,7 @@ need to use are `ChannelManager` and `ChannelMonitor`. `ChannelManager` holds mu channels, routes payments between them, and exposes a simple API to make and receive payments. Individual `ChannelMonitor`s monitor the on-chain state of a channel, punish counterparties if they misbehave, and force-close channels if they contain unresolved -HTLCs which are near expiration. The `ManyChannelMonitor` API provides a way for you to +HTLCs which are near expiration. The `chain::Watch` interface provides a way for you to receive `ChannelMonitorUpdate`s from `ChannelManager` and persist them to disk before the channel steps forward. @@ -37,26 +37,26 @@ At a high level, some of the common interfaces fit together as follows: ----------------- | KeysInterface | -------------- ----------------- | UserConfig | - -------------------- | -------------- - /------| MessageSendEvent | | | ---------------- - | -------------------- | | | FeeEstimator | - | (as MessageSendEventsProvider) | | ---------------- - | ^ | | / | ------------------------ - | \ | | / ---------> | BroadcasterInterface | - | \ | | / / | ------------------------ - | \ v v v / v ^ - | (as ------------------ ---------------------- - | ChannelMessageHandler)-> | ChannelManager | ----> | ManyChannelMonitor | - v / ------------------ ---------------------- ---------------- / ^ (as EventsProvider) ^ -| PeerManager |- | \ / / ---------------- | -------\---/---------- - | ----------------------- / \ / - | | ChainWatchInterface | - v - | ----------------------- --------- - | | | Event | -(as RoutingMessageHandler) v --------- - \ -------------------- - -----------------> | NetGraphMsgHandler | - -------------------- + -------------------- ^ -------------- + ------| MessageSendEvent | | ^ ---------------- + / -------------------- | | | FeeEstimator | <----------------------- + | (as MessageSendEventsProvider) | | ---------------- \ + | ^ | | ^ ------------------------ | + | \ | | / ---------> | BroadcasterInterface | | + | \ | | / / ------------------------ | + | \ | | / / ^ | + | (as ------------------ ---------------- | | + | ChannelMessageHandler)-> | ChannelManager | ----> | chain::Watch | | | + v / ------------------ ---------------- | | +--------------- / (as EventsProvider) ^ | | +| PeerManager |- \ | | | +--------------- \ | (is-a) | | + | ----------------- \ _---------------- / / + | | chain::Access | \ / | ChainMonitor |--------------- + | ----------------- \ / ---------------- + | ^ \ / | +(as RoutingMessageHandler) | v v + \ ---------------------- --------- ----------------- + -----------------> | NetGraphMsgHandler | | Event | | chain::Filter | + ---------------------- --------- ----------------- ```