Skip to content

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

@kblinichkin

Description

@kblinichkin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions