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

REP-33: refine the definitions of some Node states #42

Merged
merged 3 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This repository tracks all REPs proposed by the RSS3 Community.
| [REP-16](./REPs/REP-16.md) | Staking Rewards Taxation Adjustment | [Albert](mailto:iavl@proton.me), [HenryQW](mailto:hi@henry.wang) | Core | Final |
| [REP-20](./REPs/REP-20.md) | Data Availability Layer Integration | [Albert](mailto:iavl@proton.me), [HenryQW](mailto:hi@henry.wang) | Core | Final |
| [REP-26](./REPs/REP-26.md) | Chip Mechanism Upgrade | [BruceXC](mailto:xichang1510@gmail.com) | Core | Candidate |
| [REP-33](./REPs/REP-33.md) | Node State Transition | [KallyDev](mailto:kallydev@rss3.io) | Core | Draft |
| [REP-33](./REPs/REP-33.md) | Node State Transition | [KallyDev](mailto:kallydev@rss3.io), [BruceXC](mailto:xichang1510@gmail.com) | Core | Draft |
| [REP-38](./REPs/REP-38.md) | Demotion and Slashing Mechanism | [Polebug](mailto:polebug@rss3.io) | Core | Draft |
| [REP-40](./REPs/REP-40.md) | Whitepaper Updates | [pseudoyu](mailto:pseudoyu@connect.hku.hk) | Core | Draft |

Expand Down
27 changes: 13 additions & 14 deletions REPs/REP-33.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,27 @@ A Node can be in 1 of the following 7 states:

1. **Registered**: The Node is registered on the VSL with a sufficient deposit.
2. **Initializing**: The Node is operating on the DSL. Automated tasks will be executed at this stage to ensure the Node is in a healthy condition. This state applies to the initial startup or the first startup following any change in the Node’s coverage.
3. **Online**: The Node is operational and actively participating in network activities.
4. **Offline**: The Node is not operational and not participating in network activities.
5. **Exiting**: The Node is in the process of exiting the Network.
6. **Exited**: The Node has successfully exited the Network.
7. **Slashed**: The Node has been slashed due to a violation of network rules or malicious behavior.
3. **Online**: The Node is operational and actively participating in network activities on the DSL.
4. **Offline**: The Node is not operational and not participating in network activities on the DSL.
5. **Exiting**: The Node is in the process of exiting the Network on the VSL.
6. **Exited**: The Node has successfully exited the Network on the VSL.
7. **Slashed**: The Node has been slashed due to a violation of network rules or malicious behavior on the VSL.

### Node State Transition Path

![Node State Transition Path](REP-33/node-state-transition-path.png)

1. **Registered** → **Initializing** → **Online**: Upon registration, a Node transitions to `Registered`. `Initializing` is the state when the Node is started. After the automatic initialization is completed, it enters `Online` state.
1. **Registered** → **Initializing** → **Online**: Node's lifecycle begins in the `None` state. Upon registration, a Node transitions to `Registered`. `Initializing` is the state when the Node is started. After the automatic initialization is completed, it enters `Online` state.
2. **Registered** → (after 30 Epochs) → **Exited**: A `Registered` Node transitions to `Exited` state after 30 Epochs of inactivity.
3. **Online** → (current Epoch) → **Exiting**: An `Online` Node transitions to `Exiting` state upon announcing its intention to exit.
4. **Exiting** → (waiting period) → **Exited**: An `Exiting` Node transitions to `Exited` state after completing the waiting period.
5. **Exiting** → **Slashed**: An `Exiting` Node transitions to `Slashed` state if it prematurely exits during the waiting period.
6. **Online** → (current Epoch) → **Offline**: An `Online` Node transitions to `Offline` state immediately within the same epoch if its Operation Pool drops below the required threshold.
4. **Exiting** → (next Epoch) → **Exited**: An `Exiting` Node transitions to `Exited` state in the next epoch.
5. **Exiting** → **Slashed**: An `Exiting` Node transitions to `Slashed` state if it prematurely exits during the current epoch.
6. **Online** → (current Epoch) → **Offline**: An `Online` Node transitions to `Offline` state immediately within the same epoch if its heartbeat fails.
7. **Online** → (current Epoch) → **Slashed**: An `Online` Node transitions to `Slashed` state immediately within the same epoch if it is slashed.
8. **Slashed** → (next Epoch) → **Offline**: A `Slashed` Node transitions to `Offline` state in the next epoch if the Operator fails to manually re-online it by the end of the current epoch.
9. **Slashed** → (next Epoch) → **Online**: A `Slashed` Node transitions to `Online` state in the next epoch if the Operator manually re-online it by the end of the current epoch.
10. **Offline** → (next Epoch) → **Online**: An `Offline` Node transitions to `Online` state in the next epoch if the Operator manually re-online it by the end of the current epoch.
11. **Offline** →(after 30 Epochs) → **Exited**: An `Offline` Node transitions to `Exited` state after 30 Epochs of inactivity.
12. **Exited** → (anytime) → **Registered**: An `Exited` Node can re-register at any time.
8. **Slashed** → (next Epoch) → **Online**: A `Slashed` Node transitions to `Online` state in the next epoch if the Operator manually re-online it by the end of the current epoch.
9. **Offline** → (next Epoch) → **Online**: An `Offline` Node transitions to `Online` state in the next epoch if the Operator manually re-online it by the end of the current epoch.
10. **Offline** →(after 30 Epochs) → **Exited**: An `Offline` Node transitions to `Exited` state after 30 Epochs of inactivity.
11. **Exited** → (anytime) → **Registered**: An `Exited` Node can re-register at any time.

## Rationale

Expand Down
Binary file modified REPs/REP-33/node-state-transition-path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.