diff --git a/state_machine/docs/CHANGELOG.md b/state_machine/docs/CHANGELOG.md index 7e6ebf938..9ac27e72c 100644 --- a/state_machine/docs/CHANGELOG.md +++ b/state_machine/docs/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.0.0.4] - 2023-04-03 + +- Clarify state transitions in README + ## [0.0.0.3] - 2023-04-03 - Update state machine states: `Stopped`, `P2P_Bootstrapping`, `P2P_Bootstrapped`, `Consensus_Unsynced`, `Consensus_SyncMode`, `Consensus_Synced`, `Consensus_Pacemaker`. diff --git a/state_machine/docs/README.md b/state_machine/docs/README.md index a03deb868..d0e3a03ec 100644 --- a/state_machine/docs/README.md +++ b/state_machine/docs/README.md @@ -68,10 +68,10 @@ These are the main building blocks: - **Consensus_Unsynced**: Node is out of sync, the Consensus module sends `Consensus_IsSyncing` event -> transitions to `Consensus_SyncMode` to start syncing with the rest of the network. - **Consensus_SyncMode**: The Consensus module runs `StartSyncing()` and requests blocks one by one from peers in its address book. - **Node finishes syncing**: When node completes syncing: - - if the node is a validator, the Consensus module sends `Consensus_IsSynchedValidator` event -> transitions to `Consensus_Synched`. - - if the node is not a validator, the Consensus module sends `Consensus_IsSynchedNonValidator` event -> transitions to `Consensus_Pacemaker`. + - if the node is a validator, the Consensus module sends `Consensus_IsSyncedValidator` event -> transitions to `Consensus_Pacemaker`. + - if the node is not a validator, the Consensus module sends `Consensus_IsSyncedNonValidator` event -> transitions to `Consensus_Synced`. - **Consensus_Pacemaker**: Node participates in the block generation process. If node receives a block proposal with height higher than its current height, the Consensus Module sends `Consensus_IsUnsynced` event -> transitions to `Consensus_Unsynced`. -- **Consensus_Synched**: Currently, the Consensus module never sends `Consensus_IsSynchedValidator` event, and non-validator node always stays in `Consensus_SyncMode`. +- **Consensus_Synced**: Currently, the Consensus module never sends `Consensus_IsSyncedValidator` event, and non-validator node always stays in `Consensus_SyncMode`. A diagram of the current state machine definition can be found [here](state-machine.diagram.md).