Skip to content
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

bug: Store-query node auto-pick doesn't work as expected #1237

Open
kblinichkin opened this issue Oct 2, 2024 · 1 comment
Open

bug: Store-query node auto-pick doesn't work as expected #1237

kblinichkin opened this issue Oct 2, 2024 · 1 comment

Comments

@kblinichkin
Copy link

Describe the bug
When calling the waku_store_query() function from C-bindings without a specific PeerId, it's expected that it would automatically pick a node from the connected list of nodes which supports the Store protocol.
However, the actual behaviour is that the node always chooses one that doesn't support the Store protocol while there are nodes which supports it.

To Reproduce
Steps to reproduce the behavior:

  1. Connect a node to a set of peers which contain supporting and non-supporting Store protocols nodes.
  2. Call waku_store_query() C-bindings function with NULL as peerID parameter.
  3. Observe logs:

Original reproduction:
during the waku_store_query() call the 16Uiu2...G6W3dH node was chosen which doesn't support the Store Protocol
Screenshot 2024-10-02 at 18 25 08
Screenshot 2024-10-02 at 18 24 40

Once the correct PeerId is chosen manually, all is good
Screenshot 2024-10-02 at 18 25 56
Screenshot 2024-10-02 at 18 26 30

The logs and source code of the sample:
go-waku-store-issue.zip

Expected behavior
The store-query node is chosen only from nodes supported Store protocol.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser N/a
  • Version N/a

go-waku version/commit hash

commit-hash: ae42393

Additional context
The bug was reproduced in a private Waku network.

@chair28980 chair28980 added this to Waku Oct 2, 2024
@chaitanyaprem
Copy link
Collaborator

i think i know what the issue is, when we leave it for automatic peer-selection the C bindings API uses legacy-store protocol to find a peer and it might be failing because lefacy-store is not enabled.

But when we specify a peerID, it doesn't need to do protocol based selection specifically but rather if it is connected and hence probably it is working. But i am surprised the query is working fine in that case because C bindings API still is using legacy-store.

As a workaround , In your nwaku node, can you enable legacy-store and confirm if it works with automatic peer-selection?
But do note that lefacy-store will be deprecated soon.

Not sure the amount of changes required to upgrade bindings to use new store, especially since we are planning to sunset go-waku.
maybe @richard-ramos can comment on this.
Can you try using the nwaku's c-bindings and confirm if both with and without automatic selection things work fine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants