|
5 | 5 | // The [ReactorEngine] implements triggers to control the lifecycle of DKG instances. |
6 | 6 | // A new DKG instance is started when an EpochSetup service event is sealed. |
7 | 7 | // The subsequent phase transitions are triggered when specified views are encountered. |
8 | | -// Specifically, phase transitions for a view V are triggered when the first block with view >=V is finalized. |
| 8 | +// Specifically, phase transitions for a view V are triggered when the first block with view ≥V is finalized. |
9 | 9 | // Between phase transitions, we periodically query the DKG smart-contract ("whiteboard") to read broadcast messages. |
10 | 10 | // Before transitioning the state machine to the next phase, we query the whiteboard w.r.t. the final view |
11 | 11 | // of the phase - this ensures all participants eventually observe the same set of messages for each phase. |
|
22 | 22 | // The dkg.ControllerFactory ties new module.DKGController's to the [MessagingEngine] via a dkg.BrokerTunnel, |
23 | 23 | // which exposes channels to relay incoming and outgoing messages (see package module/dkg for details). |
24 | 24 | // |
25 | | -// EpochSetup/EpochCommit/OnView events |
26 | | -// | |
27 | | -// v |
28 | | -// +---------------+ |
29 | | -// | ReactorEngine | |
30 | | -// +---------------+ |
31 | | -// | |
32 | | -// v |
33 | | -// *~~~~~~~~~~~~~~~~~~~~~* <- Epoch-scoped components |
34 | | -// | +---------------+ | |
35 | | -// | | Controller | | |
36 | | -// | +---------------+ | |
37 | | -// | | | |
38 | | -// | v | |
39 | | -// | +---------------+ | |
40 | | -// | | Broker | | |
41 | | -// | +---------------+ | |
42 | | -// *~~~~~~~~|~~~~~~~~~\~~* |
43 | | -// | \ |
44 | | -// BrokerTunnel DKGContractClient |
45 | | -// | \ |
46 | | -// +--------------+ +------------------+ |
47 | | -// | Messaging | | FlowDKG smart | |
48 | | -// | Engine | | contract | |
49 | | -// +--------------+ +------------------+ |
| 25 | +// EpochSetup/EpochCommit/OnView events |
| 26 | +// ↓ |
| 27 | +// ┏━━━━━━━━━━━━━━━━━┓ |
| 28 | +// ┃ ReactorEngine ┃ |
| 29 | +// ┗━━━━━━━━━━━━━━━━━┛ |
| 30 | +// ↓ |
| 31 | +// ┏━━━━━━━━━━━━━━━━━┓ ╮ |
| 32 | +// ┃ Controller ┃ │ |
| 33 | +// ┗━━━━━━━━━━━━━━━━━┛ │ |
| 34 | +// ↓ ┝ Epoch-scoped components |
| 35 | +// ┏━━━━━━━━━━━━━━━━━┓ │ |
| 36 | +// ┃ Broker ┃ │ |
| 37 | +// ┗━━━━━━━━━━━━━━━━━┛ ╯ |
| 38 | +// │ │ |
| 39 | +// BrokerTunnel DKGContractClient |
| 40 | +// ↓ ↓ |
| 41 | +// ┏━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━┓ |
| 42 | +// ┃ Messaging ┃ ┃ FlowDKG smart ┃ |
| 43 | +// ┃ Engine ┃ ┃ contract ┃ |
| 44 | +// ┗━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━┛ |
50 | 45 | package dkg |
0 commit comments