chore: add health status

This commit is contained in:
Sasha 2025-10-23 00:41:31 +02:00
parent 68bd15734a
commit 36c3879a73
No known key found for this signature in database

View File

@ -30,6 +30,8 @@ contributors:
* [Predefined values](#predefined-values) * [Predefined values](#predefined-values)
* [Extended definitions](#extended-definitions) * [Extended definitions](#extended-definitions)
* [The Validation API](#the-validation-api) * [The Validation API](#the-validation-api)
* [Health Status](#health-status)
* [Event Source](#event-source)
* [Security/Privacy Considerations](#securityprivacy-considerations) * [Security/Privacy Considerations](#securityprivacy-considerations)
* [Copyright](#copyright) * [Copyright](#copyright)
<!-- TOC --> <!-- TOC -->
@ -313,6 +315,58 @@ that would contain all validation parameters including RLN.
In the time being, parameters specific to RLN are accepted for the message validation. In the time being, parameters specific to RLN are accepted for the message validation.
RLN can also be disabled. RLN can also be disabled.
## Health Status
#### Type definitions
```yml
types:
HealthStatus:
type: enum
values: [Unhealthy, MinimallyHealthy, Healthy]
description: "Used to identify health of the operating node"
```
#### Extended definitions
`Unhealthy` indicates that the node has lost connectivity for message reception,
sending, or both, and as a result, it cannot reliably process or transmit messages.
`MinimallyHealthy` indicates that the node meets the minimum operational requirements,
although performance or reliability may be impacted.
`Healthy` indicates that the node is operating optimally,
with full support for message processing and transmission.
## Event source
#### Type definitions
```yaml
types:
HealthStatus:
type: object
fields:
eventType:
type: string
default: "health"
description: "Event type identifier"
status:
type: HealthStatus
description: "Node health status emitted on state change"
EventSource:
type: object
description: "Event source for Waku API events"
fields:
onEvent:
type: function
description: "Callback for captured events"
parameters:
- name: event
type: HealthStatus
```
## Security/Privacy Considerations ## Security/Privacy Considerations
See [WAKU2-ADVERSARIAL-MODELS](https://github.com/waku-org/specs/blob/master/informational/adversarial-models.md). See [WAKU2-ADVERSARIAL-MODELS](https://github.com/waku-org/specs/blob/master/informational/adversarial-models.md).