mirror of https://github.com/vacp2p/rfc.git
fix: add pubsub_topic to WakuMessageKeyValue
This commit is contained in:
parent
21f52015e9
commit
5d69ab58b3
|
@ -72,7 +72,10 @@ import "waku/message/v1/message.proto";
|
|||
|
||||
message WakuMessageKeyValue {
|
||||
optional bytes message_hash = 1; // Globally unique key for a Waku Message
|
||||
optional waku.message.v1.WakuMessage message = 2; // Full message content as value
|
||||
|
||||
// Full message content and associated pubsub_topic as value
|
||||
optional waku.message.v1.WakuMessage message = 2;
|
||||
optional string pubsub_topic = 3;
|
||||
}
|
||||
|
||||
message StoreQueryRequest {
|
||||
|
@ -110,13 +113,17 @@ message StoreQueryResponse {
|
|||
### Waku message key-value pairs
|
||||
|
||||
The store query protocol operates as a query protocol for a key-value store of historical Waku messages,
|
||||
with each entry having a [14/WAKU2-MESSAGE](https://rfc.vac.dev/spec/14/) as value
|
||||
with each entry having a [14/WAKU2-MESSAGE](https://rfc.vac.dev/spec/14/) and associated pubsub topic as value,
|
||||
and [deterministic message hash](https://rfc.vac.dev/spec/14/#deterministic-message-hashing) as key.
|
||||
The store can be queried to return either a set of keys or a set of key-value pairs.
|
||||
Within the store query protocol, Waku message keys and values MUST be represented in a `WakuMessageKeyValue` message.
|
||||
This message MUST contain the deterministic `message_hash` as key.
|
||||
It MAY contain the full `WakuMessage` as value in the `message` field,
|
||||
It MAY contain the full `WakuMessage` and associated pubsub topic as value in the `message` and `pubsub_topic` fields,
|
||||
depending on the use case as set out below.
|
||||
If the message contains a value entry in addition to the key,
|
||||
both the `message` and `pubsub_topic` fields MUST be populated.
|
||||
The message MUST NOT have either `message` or `pubsub_topic` populated with the other unset.
|
||||
Both fields MUST either be set or unset.
|
||||
|
||||
### Waku message store eligibility
|
||||
|
||||
|
|
Loading…
Reference in New Issue