Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Hentschel <[email protected]>
  • Loading branch information
jordanschalm and AlexHentschel authored Dec 3, 2024
1 parent fa089b0 commit 3f1de8f
Showing 1 changed file with 21 additions and 26 deletions.
47 changes: 21 additions & 26 deletions engine/consensus/dkg/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// The [ReactorEngine] implements triggers to control the lifecycle of DKG instances.
// A new DKG instance is started when an EpochSetup service event is sealed.
// The subsequent phase transitions are triggered when specified views are encountered.
// Specifically, phase transitions for a view V are triggered when the first block with view >=V is finalized.
// Specifically, phase transitions for a view V are triggered when the first block with view V is finalized.
// Between phase transitions, we periodically query the DKG smart-contract ("whiteboard") to read broadcast messages.
// Before transitioning the state machine to the next phase, we query the whiteboard w.r.t. the final view
// of the phase - this ensures all participants eventually observe the same set of messages for each phase.
Expand All @@ -22,29 +22,24 @@
// The dkg.ControllerFactory ties new module.DKGController's to the [MessagingEngine] via a dkg.BrokerTunnel,
// which exposes channels to relay incoming and outgoing messages (see package module/dkg for details).
//
// EpochSetup/EpochCommit/OnView events
// |
// v
// +---------------+
// | ReactorEngine |
// +---------------+
// |
// v
// *~~~~~~~~~~~~~~~~~~~~~* <- Epoch-scoped components
// | +---------------+ |
// | | Controller | |
// | +---------------+ |
// | | |
// | v |
// | +---------------+ |
// | | Broker | |
// | +---------------+ |
// *~~~~~~~~|~~~~~~~~~\~~*
// | \
// BrokerTunnel DKGContractClient
// | \
// +--------------+ +------------------+
// | Messaging | | FlowDKG smart |
// | Engine | | contract |
// +--------------+ +------------------+
// EpochSetup/EpochCommit/OnView events
// ↓
// ┏━━━━━━━━━━━━━━━━━┓
// ┃ ReactorEngine ┃
// ┗━━━━━━━━━━━━━━━━━┛
// ↓
// ┏━━━━━━━━━━━━━━━━━┓ ╮
// ┃ Controller ┃ │
// ┗━━━━━━━━━━━━━━━━━┛ │
// ↓ ┝ Epoch-scoped components
// ┏━━━━━━━━━━━━━━━━━┓ │
// ┃ Broker ┃ │
// ┗━━━━━━━━━━━━━━━━━┛ ╯
// │ │
// BrokerTunnel DKGContractClient
// ↓ ↓
// ┏━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━┓
// ┃ Messaging ┃ ┃ FlowDKG smart ┃
// ┃ Engine ┃ ┃ contract ┃
// ┗━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━┛
package dkg

0 comments on commit 3f1de8f

Please sign in to comment.