2024-01-30 19:06:57 +00:00
|
|
|
---
|
2024-02-05 19:15:24 +00:00
|
|
|
title: WAKU2-METADATA
|
2024-01-30 19:06:57 +00:00
|
|
|
name: Waku Metadata Protocol
|
|
|
|
editor: Alvaro Revuelta <alrevuelta@status.im>
|
|
|
|
contributors:
|
|
|
|
---
|
|
|
|
|
2024-02-05 19:15:24 +00:00
|
|
|
## Metadata Protocol
|
2024-01-30 19:06:57 +00:00
|
|
|
|
|
|
|
Waku specifies a req/resp protocol that provides information about the node's medatadata. Such metadata is meant to be used
|
|
|
|
by the node to decide if a peer is worth connecting or not. The node that makes the request, includes its metadata
|
|
|
|
so that the receiver is aware of it, without requiring an extra interaction. The parameters are the following:
|
|
|
|
* `clusterId`: Unique identifier of the cluster that the node is running in.
|
|
|
|
* `shards`: Shard indexes that the node is subscribed to.
|
|
|
|
|
|
|
|
|
2024-02-05 19:15:24 +00:00
|
|
|
### Protocol id
|
2024-01-30 19:06:57 +00:00
|
|
|
|
|
|
|
`/vac/waku/metadata/1.0.0`
|
|
|
|
|
2024-02-05 19:15:24 +00:00
|
|
|
### Request
|
2024-01-30 19:06:57 +00:00
|
|
|
|
|
|
|
```proto
|
|
|
|
message WakuMetadataRequest {
|
|
|
|
optional uint32 cluster_id = 1;
|
|
|
|
repeated uint32 shards = 2;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-02-05 19:15:24 +00:00
|
|
|
### Response
|
2024-01-30 19:06:57 +00:00
|
|
|
|
|
|
|
```proto
|
|
|
|
message WakuMetadataResponse {
|
|
|
|
optional uint32 cluster_id = 1;
|
|
|
|
repeated uint32 shards = 2;
|
|
|
|
}
|
|
|
|
```
|