# State Machine

> For the complete documentation index, see [llms.txt](https://bsvblockchain.com/docs/llms.txt).

The mermaid diagram outlined below represents the various states and events that dictate the functionality of the node.

The mermaid diagram outlined below represents the various states and events that dictate the functionality of the node. To create and visualize the state machine diagram, you can use [https://mermaid.live/](https://mermaid.live/). This tool allows you to generate the diagram visualization interactively.

```mermaid
stateDiagram-v2
    [*] --> IDLE
    CATCHINGBLOCKS --> RUNNING: RUN
    CATCHINGBLOCKS --> IDLE: STOP
    IDLE --> CATCHINGBLOCKS: CATCHUPBLOCKS
    IDLE --> RUNNING: RUN
    RUNNING --> CATCHINGBLOCKS: CATCHUPBLOCKS
    RUNNING --> IDLE: STOP
```