From 19c19837461001a6c14a7ad94d409ad48894b1f1 Mon Sep 17 00:00:00 2001 From: Harry Law Date: Mon, 3 Apr 2023 15:43:46 +0100 Subject: [PATCH 1/3] Swap validator and non-validator triggers when finished synching --- state_machine/docs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/state_machine/docs/README.md b/state_machine/docs/README.md index a03deb868..11b093be2 100644 --- a/state_machine/docs/README.md +++ b/state_machine/docs/README.md @@ -68,8 +68,8 @@ 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_IsSynchedValidator` event -> transitions to `Consensus_Pacemaker`. + - if the node is not a validator, the Consensus module sends `Consensus_IsSynchedNonValidator` event -> transitions to `Consensus_Synched`. - **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`. From bb81a8234b17992def695c78ecd28b91fdc966e0 Mon Sep 17 00:00:00 2001 From: gokutheengineer Date: Mon, 3 Apr 2023 17:55:04 +0300 Subject: [PATCH 2/3] fix typo --- state_machine/docs/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/state_machine/docs/README.md b/state_machine/docs/README.md index 11b093be2..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_Pacemaker`. - - if the node is not a validator, the Consensus module sends `Consensus_IsSynchedNonValidator` event -> transitions to `Consensus_Synched`. + - 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). From 621abc152b992677e32759d37c8c8ca820b92fe0 Mon Sep 17 00:00:00 2001 From: Harry Law Date: Mon, 3 Apr 2023 16:22:19 +0100 Subject: [PATCH 3/3] Update CHANGELOG --- state_machine/docs/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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`.