Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Consensus] Configuration entry point state sync #528

Merged
merged 183 commits into from
Apr 3, 2023

Conversation

gokutheengineer
Copy link
Contributor

@gokutheengineer gokutheengineer commented Feb 20, 2023

Description

Defines entry points and transitions of the state machine for the following modes:

  • Unsynched mode
  • Sync Mode
  • Synced Mode
  • Pacemaker Mode

This PR aims to define state transitions between different modes. Currently, server mode is not represented by the node's FSM, but rather it is set through a config variable, and it can be turned on and off via exported EnableServerMode and DisableServerMode functions

Issue

Fixes #351

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • Other

List of changes

  • Added fsm_handler.go to the consensus module to trigger business logic in consensus module accordingly to the FSM events
  • Added FSMConsensusEvents interface to the shared module
  • Updated and added FSM states, events, state transitions

Testing

  • make develop_test
  • LocalNet w/ all of the steps outlined in the README

Required Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have tested my changes using the available tooling
  • I have updated the corresponding CHANGELOG

If Applicable Checklist

  • I have updated the corresponding README(s); local and/or global
  • I have added tests that prove my fix is effective or that my feature works
  • I have added, or updated, mermaid.js diagrams in the corresponding README(s)
  • I have added, or updated, documentation and mermaid.js diagrams in shared/docs/* if I updated shared/*README(s)

@gokutheengineer gokutheengineer marked this pull request as draft February 20, 2023 19:33
@gokutheengineer gokutheengineer changed the title Issue/351 configuration entry point state sync [Consensus] Configuration entry point state sync Feb 22, 2023
@gokutheengineer gokutheengineer self-assigned this Feb 22, 2023
@gokutheengineer gokutheengineer added the consensus Consensus specific changes label Feb 22, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog validation failed with the following output:
Latest date in state_machine/docs/CHANGELOG.md is incorrect.
Latest: 2023-03-29, Current: 2023-04-03

Changelog verification failed. See error messages for more detail.

Please update the relevant CHANGELOG.md files and ensure they follow the correct format.

@github-actions github-actions bot dismissed stale reviews from themself April 3, 2023 06:01

The check succeeded, dismissing the review comment.

@gokutheengineer gokutheengineer merged commit ef86ee7 into main Apr 3, 2023
bryanchriswhite added a commit that referenced this pull request Apr 10, 2023
* pokt/main:
  [Utility][RPC][CLI] Querying governance parameters (Issue #619) (#622)
  [Persistence][Utility] Separate all CreateAndApply functions into more functional components - Issue #508 (#652)
  [Persistence][Utility] Pools Address hack removal + state accessor fix for params and flags (#654)
  [PERSISTENCE] SavePoints and Rollbacks design document (Issue #493) (#533)
  Update reviewpad.yml
  Added ChatGPT-CodeReview workflow (#649)
  Update reviewpad.yml
  Added default reviewpad.yml file (#648)
  [DevNet] tweaks for remote environments (#601)
  [Documentation] Swap validator and non-validator triggers when finished synching (#646)
  [Consensus] Configuration entry point state sync (#528)
bryanchriswhite added a commit to bryanchriswhite/pocket that referenced this pull request Apr 10, 2023
…p-modules

* pokt/main:
  [Utility][RPC][CLI] Querying governance parameters (Issue pokt-network#619) (pokt-network#622)
  [Persistence][Utility] Separate all CreateAndApply functions into more functional components - Issue pokt-network#508 (pokt-network#652)
  [Persistence][Utility] Pools Address hack removal + state accessor fix for params and flags (pokt-network#654)
  [PERSISTENCE] SavePoints and Rollbacks design document (Issue pokt-network#493) (pokt-network#533)
  Update reviewpad.yml
  Added ChatGPT-CodeReview workflow (pokt-network#649)
  Update reviewpad.yml
  Added default reviewpad.yml file (pokt-network#648)
  [DevNet] tweaks for remote environments (pokt-network#601)
  [Documentation] Swap validator and non-validator triggers when finished synching (pokt-network#646)
  [Consensus] Configuration entry point state sync (pokt-network#528)
bryanchriswhite added a commit that referenced this pull request Apr 12, 2023
…p-modules

* pokt/main:
  update pocket repo read.me (#667)
  Update reviewpad.yml
  [KEYBASE] Add improve comment on keybase config (#665)
  [E2E] Chore: Doc updates (#663)
  [E2E] Adds staking, unstaking, and sending tests (#653)
  [Utility][RPC][CLI] Querying governance parameters (Issue #619) (#622)
  [Persistence][Utility] Separate all CreateAndApply functions into more functional components - Issue #508 (#652)
  [Persistence][Utility] Pools Address hack removal + state accessor fix for params and flags (#654)
  [PERSISTENCE] SavePoints and Rollbacks design document (Issue #493) (#533)
  Update reviewpad.yml
  Added ChatGPT-CodeReview workflow (#649)
  Update reviewpad.yml
  Added default reviewpad.yml file (#648)
  [DevNet] tweaks for remote environments (#601)
  [Documentation] Swap validator and non-validator triggers when finished synching (#646)
  [Consensus] Configuration entry point state sync (#528)
bryanchriswhite added a commit that referenced this pull request Apr 12, 2023
…p-modules

* pokt/main:
  update pocket repo read.me (#667)
  Update reviewpad.yml
  [KEYBASE] Add improve comment on keybase config (#665)
  [E2E] Chore: Doc updates (#663)
  [E2E] Adds staking, unstaking, and sending tests (#653)
  [Utility][RPC][CLI] Querying governance parameters (Issue #619) (#622)
  [Persistence][Utility] Separate all CreateAndApply functions into more functional components - Issue #508 (#652)
  [Persistence][Utility] Pools Address hack removal + state accessor fix for params and flags (#654)
  [PERSISTENCE] SavePoints and Rollbacks design document (Issue #493) (#533)
  Update reviewpad.yml
  Added ChatGPT-CodeReview workflow (#649)
  Update reviewpad.yml
  Added default reviewpad.yml file (#648)
  [DevNet] tweaks for remote environments (#601)
  [Documentation] Swap validator and non-validator triggers when finished synching (#646)
  [Consensus] Configuration entry point state sync (#528)
@Olshansk Olshansk deleted the issue/351-configuration-entry-point-state-sync branch June 2, 2023 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus Consensus specific changes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Consensus] State Sync - Configuration & Entrypoints for Node State
4 participants