From 5d69ab58b34d32af99e60b109ad784ad1dd9e345 Mon Sep 17 00:00:00 2001 From: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com> Date: Tue, 7 May 2024 11:21:47 +0100 Subject: [PATCH] fix: add pubsub_topic to WakuMessageKeyValue --- content/docs/rfcs/13/README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/content/docs/rfcs/13/README.md b/content/docs/rfcs/13/README.md index 3e830c63..caf6ce03 100644 --- a/content/docs/rfcs/13/README.md +++ b/content/docs/rfcs/13/README.md @@ -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