Open
Description
Description
The Waku Store protocol specification supports querying messages by their hash, but our current implementation makes this impossible due to validation logic conflicts. When attempting to use messageHashes
as a query parameter, users encounter a catch-22:
- Using
queryGenerator
requires passing decoders, which automatically sets pubsubTopic and contentTopics - The validation logic then rejects the query with an error:
if (
params.messageHashes &&
params.messageHashes.length > 0 &&
(params.pubsubTopic ||
(params.contentTopics && params.contentTopics.length > 0) ||
params.timeStart ||
params.timeEnd)
) {
throw new Error(
"Message hash lookup queries cannot include content filter criteria"
);
}
This makes it currently impossible to use the message hash lookup feature that's specified in the protocol, despite it being exposed in our API interfaces.
User Story
As a developer, I want to query specific messages by their hash directly, so that I can efficiently retrieve exactly the messages I need without having to filter through time-based or content-based results.
Proposed Solution / Feature Design
Fix the validation logic to properly handle message hash queries:
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Code Review / QA