waku-org / waku-rust-bindings

Rust wrapper over go-waku ffi
14 stars 6 forks source link

[bug] waku_filter_subscribe not effective for receiving signal #77

Closed hopeyen closed 9 months ago

hopeyen commented 9 months ago

Awhile back when version 0.2.0 was published, we encountered a problem that nodes with successful filter subscriptions would not receive messages from the peers. Switching from v0.2.0 to v0.1.1, we found the problem resolved and fixed the version in the meantime (and forgot about it).

As the recent protocol and peer count fixes went in for v0.3.1, we switched to the new version and encountered this problem again (who would've thought 🤡 ).

I think there was an issue between the switch waku_filter_subscribe -> waku_legacy_filter_subscribe for filterv1 to filterv2 introduced in https://github.com/waku-org/waku-rust-bindings/pull/63.

To reproduce, you can run two waku nodes side by side, with matching filter subscriptions to each other's content topics, and send a few messages. We expect the nodes to receive each other's messages, which is the behavior for v0.1.1. As we switch to versions pass that, the nodes would stop receiving messages.

Please let me know if I can provide any extra information

richard-ramos commented 9 months ago

@hopeyen, I fixed this in #78, please try with v0.3.2 . This should have been captured with unit tests, but noticed that there are none for filter protocol. That will be fixed in #79 Sorry for the inconvenience!