Skip to content

Commit

Permalink
arch: update diagram to reflect changes to KeysInterface
Browse files Browse the repository at this point in the history
KeysInterface was split into EntropySource, SignerProvider and
NodeSigner in lightningdevkit#1930.
  • Loading branch information
carlaKC committed Oct 8, 2024
1 parent bc1931b commit 7c1db56
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions ARCH.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ monitoring for liveness of peers, routing messages to `ChannelManager` and `P2PG
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
a proxy in between for special handling. Further, APIs for key generation, transaction
broadcasting, block fetching, and fee estimation must be implemented and the data
provided by you, the user.
a proxy in between for special handling. Further, APIs for key generation, entropy source,
transaction broadcasting, block fetching, and fee estimation must be implemented and the
data provided by you, the user.

The library does not rely on the presence of a runtime environment outside of access to
heap, atomic integers, and basic Mutex primitives. This means the library will never
Expand All @@ -31,28 +31,30 @@ block time for current time knowledge.

At a high level, some of the common interfaces fit together as follows:


```
-----------------
| KeysInterface | --------------
----------------- | UserConfig |
-------------------- ^ --------------
------| MessageSendEvent | | ^ ----------------
/ -------------------- | | | FeeEstimator | <-----------------------
| (as MessageSendEventsProvider) | | ---------------- \
| ^ | | ^ ------------------------ |
| \ | | / ---------> | BroadcasterInterface | |
| \ | | / / ------------------------ |
| \ | | / / ^ |
| (as ------------------ ---------------- | |
| ChannelMessageHandler)-> | ChannelManager | ----> | chain::Watch | | |
v / ------------------ ---------------- | |
--------------- / (as EventsProvider) ^ | |
| PeerManager |- \ | | |
--------------- \ | (is-a) | |
| -------------- \ _---------------- / /
| | UtxoLookup | \ / | ChainMonitor |---------------
------------------ --------------
| SignerProvider | | NodeSigner |
------------------ --------------
----------------- ^ ^ --------------
| EntropySource | <---- \ / ----> | UserConfig |
----------------- \ | | / --------------
| | | |
-------------------- | | | | ----------------
------| MessageSendEvent | | | | | | FeeEstimator | <----------------
/ -------------------- | | | | ---------------- \
| (as MessageSendEventsProvider) | | | | ^ |
| ^ | | | | / ----------------------- |
| \ | | | | / ----> | BroadcasterInterface | |
| \ | | | | / / ----------------------- |
| \ | | | | / / ^ |
| (as ------------------ ---------------- | |
| ChannelMessageHandler)-> | ChannelManager | ----> | chain::Watch | | |
v / ------------------ ---------------- | |
--------------- / (as EventsProvider) ^ | |
| PeerManager |- \ | | |
--------------- \ | (is-a) / |
| -------------- \ _---------------- /
| | UtxoLookup | \ / | ChainMonitor |------------
| -------------- \ / ----------------
| ^ \ / |
(as RoutingMessageHandler) | v v
Expand Down

0 comments on commit 7c1db56

Please sign in to comment.