-
Notifications
You must be signed in to change notification settings - Fork 43
feat: make store fetch messages by hash #2351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@adklempner to add description also we need to add E2E interop tests for this usage of Store |
related to #2330 |
Issue Summary: Store v3 Message Hash Query FixProblemThe Waku Store v3 message hash query test was failing in js-waku CI. Initial investigation suggested it was an nwaku issue, but further analysis revealed the problem was in the js-waku implementation. Root Cause
SolutionThe following changes were made to fix the issue:
Test ResultAfter applying these fixes, the test now passes successfully:
The nwaku logs confirm that queries now include the proper pubsubTopic and messages are successfully retrieved. Key TakeawayThe issue was not in nwaku but in js-waku's implementation and test. The Waku protocol requires pubsubTopic to be specified for all store queries, including hash queries. The js-waku implementation incorrectly assumed hash queries should exclude pubsubTopic. Related PRThis investigation was done while analyzing failing CI tests in js-waku PR #2250. |
Uh oh!
There was an error while loading. Please reload this page.
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:queryGenerator
requires passing decoders, which automatically sets pubsubTopic and contentTopicsThis 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:
The text was updated successfully, but these errors were encountered: