Skip to content

[Core] Node finite state machine #499

@deblasis

Description

@deblasis

Objective

Have a FSM (Finite State Machine) that we can leverage to have different operating modes for the node depending on its internal state.

Origin Document

While developing #416, I identified the first real use case for different operating modes.

Specifically, when a new node joins the cluster, it doesn't know anything about the world and needs bootstrapping #498

Goals

  • Develop a simple state machine integrated with the bus
  • Have a way to visualize it easily

Deliverable

  • FSM implementation
  • Make target to generate a mermaid diagram of the current state machine
  • Initial working state machine that handles the P2P bootstrapping and the synched state for nodes that are already part of consensus (the first 4 in Localnet)

Non-goals / Non-deliverables

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • Task specific tests or benchmarks: make ...
  • New tests or benchmarks: make ...
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @deblasis
Co-Owners: @Olshansk

Metadata

Metadata

Assignees

Labels

consensusConsensus specific changescoreCore infrastructure - protocol relatedp2pP2P specific changes

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions