Skip to content

Commit

Permalink
mermaid-js live editor gist layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ksedgwic committed May 12, 2024
1 parent 7e3fd9f commit acd64b2
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## CLBOSS Diagrams

- [Channel Creation](https://mermaid.live/view?gist=https://github.com/ksedgwic/clboss/tree/2024-05-diagrams/docs/channel-creation)
- [Channel Balancing](https://github.com/ksedgwic/clboss/tree/2024-05-diagrams/docs/channel-balancing)
45 changes: 45 additions & 0 deletions docs/channel-balancing/code.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
%%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%

flowchart TB

style InitialRebalancer fill:#9fb,stroke:#333,stroke-width:4px
ListpeersAnnouncer-->|ListpeersResult|InitialRebalancer
InitialRebalancer-->|RequestEarningsInfo|EarningsTracker
EarningsTracker-->|ResponseEarningsInfo|InitialRebalancer

style EarningsRebalancer fill:#9fb,stroke:#333,stroke-width:4px
Timers-->|TimerRandomHourly|EarningsRebalancer
%% elk doesn't like: EarningsRebalancer-->|SelfTrigger|EarningsRebalancer
ListpeersAnnouncer-->|ListpeersResult|EarningsRebalancer
Manifester-->|Manifestation|EarningsRebalancer
CommandReceiver-->|CommandRequest|EarningsRebalancer
EarningsRebalancer-->|ManifestCommand|Manifester
EarningsRebalancer-->|CommandResponse|CommandReceiver

style JitRebalancer fill:#9fb,stroke:#333,stroke-width:4px
EarningsTracker-->|ResponseEarningsInfo|JitRebalancer
PeerFromScidMapper-->|ResponsePeerFromScid|JitRebalancer
JitRebalancer-->|ProvideHtlcAcceptedDeferrer|HtlcAcceptor
JitRebalancer-->|ReleaseHtlcAccepted|HtlcAcceptor
JitRebalancer-->|RequestPeerFromScid|PeerFromScidMapper
JitRebalancer-->|RequestEarningsInfo|EarningsTracker
HtlcAcceptor-->|SolicitHtlcAcceptedDeferrer|JitRebalancer

style FundsMover fill:#9bf,stroke:#333,stroke-width:4px
Initiator-->|Init|FundsMover
InitialRebalancer-->|RequestMoveFunds|FundsMover
EarningsRebalancer-->|RequestMoveFunds|FundsMover
JitRebalancer-->|RequestMoveFunds|FundsMover
ActiveProber-->|SolicitDeletablePaymentLabelFilter|FundsMover
FundsMover-->|ProvideDeletablePaymentLabelFilter|PaymentDeleter
FundsMover-->|"spawn()"|Runner

style Runner fill:#9bf,stroke:#333,stroke-width:4px
Runner-->|ResponseMoveFunds|EarningsTracker

style Claimer fill:#9bf,stroke:#333,stroke-width:4px
HtlcAcceptor-->|SolicitHtlcAcceptedDeferrer|Claimer
Claimer-->|ReleaseHtlcAccepted|HtlcAcceptor
Claimer-->|ProvideHtlcAcceptedDeferrer|HtlcAcceptor
Timers-->|TimerRandomHourly|Claimer

3 changes: 3 additions & 0 deletions docs/channel-balancing/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"theme": "default"
}
99 changes: 99 additions & 0 deletions docs/channel-creation/code.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
%%{init: {"flowchart": {"defaultRenderer": "elk"}} }%%

graph TB

style ChannelFinderByDistance fill:#9fb,stroke:#333,stroke-width:4px
Initiator-->|Init|ChannelFinderByDistance
ChannelCandidateInvestigator_Manager-->|SolicitChannelCandidates|ChannelFinderByDistance
ChannelCreator_Manager-->|SolicitChannelCandidates|ChannelFinderByDistance
ChannelFinderByDistance-->|ProposeChannelCandidates|ChannelCandidateInvestigator_Manager
ChannelFinderByDistance-->|PreinvestigateChannelCandidates|ChannelCandidatePreinvestigator

style ChannelFinderByEarnedFee fill:#9fb,stroke:#333,stroke-width:4px
Initiator-->|Init|ChannelFinderByEarnedFee
ChannelCandidateInvestigator_Manager-->|SolicitChannelCandidates|ChannelFinderByEarnedFee
ChannelCreator_Manager-->|SolicitChannelCandidates|ChannelFinderByEarnedFee
ChannelFinderByEarnedFee-->|listchannels|CLN
CLN-->|channels|ChannelFinderByEarnedFee
ChannelFinderByEarnedFee-->|RequestPeerMetrics|PeerMetrician
PeerMetrician-->|ResponsePeerMetrics|ChannelFinderByEarnedFee
ChannelFinderByEarnedFee-->|ProposeChannelCandidates|ChannelCandidateInvestigator_Manager
ChannelFinderByEarnedFee-->|PreinvestigateChannelCandidates|ChannelCandidatePreinvestigator

style ChannelFinderByListpays fill:#9fb,stroke:#333,stroke-width:4px
Initiator-->|Init|ChannelFinderByListpays
ListpeersAnalyzer-->|ListpeersAnalyzedResult|ChannelFinderByListpays
ChannelCandidateInvestigator_Manager-->|SolicitChannelCandidates|ChannelFinderByListpays
ChannelCreator_Manager-->|SolicitChannelCandidates|ChannelFinderByListpays
ChannelFinderByListpays-->|listpays|CLN
CLN-->|pays|ChannelFinderByListpays
ChannelFinderByListpays-->|ProposePatronlessChannelCandidate|ChannelCandidateInvestigator_Manager

style ChannelFinderByPopularity fill:#9fb,stroke:#333,stroke-width:4px
Initiator-->|Init|ChannelFinderByPopularity
ChannelCandidateInvestigator_Manager-->|SolicitChannelCandidates|ChannelFinderByPopularity
ChannelCreator_Manager-->|SolicitChannelCandidates|ChannelFinderByPopularity
BlockTracker-->|Block|ChannelFinderByPopularity
Timers-->|Timer10Minutes|ChannelFinderByPopularity
Manifester-->|Manifestation|ChannelFinderByPopularity
CommandReceiver-->|Notification|ChannelFinderByPopularity
CommandReceiver-->|CommandRequest|ChannelFinderByPopularity
ListfundsAnalyzer-->|ListfundsAnalyzedResult|ChannelFinderByPopularity
ChannelFinderByPopularity-->|ManifestNotification|Manifester
ChannelFinderByPopularity-->|ManifestCommand|Manifester
ChannelFinderByPopularity-->|CommandResponse|CommandReceiver
ChannelFinderByPopularity-->|ProposeChannelCandidates|ChannelCandidateInvestigator_Manager
ChannelFinderByPopularity-->|PreinvestigateChannelCandidates|ChannelCandidatePreinvestigator
ChannelFinderByPopularity-->|TaskCompletion|InternetConnectionMonitor

style ChannelCandidatePreinvestigator fill:#f9f,stroke:#333,stroke-width:4px
Connector-->|ResponseConnect|ChannelCandidatePreinvestigator
AmountSettingsHandler-->|AmountSettings|ChannelCandidatePreinvestigator
ChannelCandidatePreinvestigator-->|RequestConnect|Connector
ChannelCandidatePreinvestigator-->|ProposeChannelCandidates|ChannelCandidateInvestigator_Manager
ChannelCandidatePreinvestigator-->|RequestDowser|Dowser
Dowser-->|ResponseDowser|ChannelCandidatePreinvestigator

style ChannelCandidateInvestigator_Manager fill:#9bf,stroke:#333,stroke-width:4px
Initiator-->|Init|ChannelCandidateInvestigator_Manager
AmountSettingsHandler-->|AmountSettings|ChannelCandidateInvestigator_Manager
UnmanagedManager-->|SolicitUnmanagement|ChannelCandidateInvestigator_Manager
Timers-->|TimerTwiceDaily|ChannelCandidateInvestigator_Manager
Timers-->|TimerRandomHourly|ChannelCandidateInvestigator_Manager
ListpeersAnalyzer-->|ListpeersAnalyzedResult|ChannelCandidateInvestigator_Manager
StatusCommand-->|SolicitStatus|ChannelCandidateInvestigator_Manager
ChannelCandidateInvestigator_Manager-->|ProvideUnmanagement|UnmanagedManager
ChannelCandidateInvestigator_Manager-->|PatronizeChannelCandidate|ChannelCandidateMatchmaker
ChannelCandidateInvestigator_Manager-->|ProvideStatus|StatusCommand

style ChannelCandidateInvestigator_Janitor fill:#9bf,stroke:#333,stroke-width:4px
ChannelCandidateInvestigator_Manager-->|clean_up|ChannelCandidateInvestigator_Janitor
ChannelCandidateInvestigator_Manager-->|check_acceptable|ChannelCandidateInvestigator_Janitor
ChannelCandidateInvestigator_Janitor-->|RequestDowser|Dowser
Dowser-->|ResponseDowser|ChannelCandidateInvestigator_Janitor

style ChannelCandidateInvestigator_Gumshoe fill:#9bf,stroke:#333,stroke-width:4px
ChannelCandidateInvestigator_Manager-->|"investigate()"|ChannelCandidateInvestigator_Gumshoe
Connector-->|ResponseConnect|ChannelCandidateInvestigator_Gumshoe
ChannelCandidateInvestigator_Gumshoe-->|RequestConnect|Connector

style ChannelCandidateMatchmaker fill:#f9f,stroke:#333,stroke-width:4px
AmountSettingsHandler-->|AmountSettings|ChannelCandidateMatchmaker
Initiator-->|Init|ChannelCandidateMatchmaker
ChannelCandidateMatchmaker-->|PreinvestigateChannelCandidates|ChannelCandidatePreinvestigator
ChannelCandidateMatchmaker-->|getroute|CLN
CLN-->|route|ChannelCandidateMatchmaker

style ChannelCreator_Manager fill:#fb9,stroke:#333,stroke-width:4px
AmountSettingsHandler-->|AmountSettings|ChannelCreator_Manager
Initiator-->|Init|ChannelCreator_Manager
ChannelCreationDecider-->|RequestChannelCreation|ChannelCreator_Manager
ChannelCreator_Manager-->|RequestDowser|Dowser
Dowser-->|ResponseDowser|ChannelCreator_Manager

style ChannelCreator_Carpenter fill:#fb9,stroke:#333,stroke-width:4px
Initiator-->|Init|ChannelCreator_Carpenter
ChannelCreator_Manager-->|"construct()"|ChannelCreator_Carpenter
ChannelCreator_Carpenter-->|ChannelCreateResult|ChannelCandidateInvestigator_Manager
ChannelCreator_Carpenter-->|ChannelCreateResult|ChannelCreateDestroyMonitor

3 changes: 3 additions & 0 deletions docs/channel-creation/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"theme": "default"
}

0 comments on commit acd64b2

Please sign in to comment.