You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INFO src.node.api_clients.base_client:base_client.py:11 POST call: http://127.0.0.1:47362/relay/v1/subscriptions with payload: ["/waku/2/rs/0/1"]
INFO src.node.api_clients.base_client:base_client.py:22 Response status code: 200. Response content: b'true'
INFO src.node.api_clients.base_client:base_client.py:11 POST call: http://127.0.0.1:38749/filter/v2/subscriptions with payload: {"requestId": "b69f8790-fdd2-4409-b418-0fedfa0eb35f", "contentFilters": ["/test/1/waku-filter/proto"], "pubsubTopic": "/waku/2/rs/0/1"}
INFO src.node.api_clients.base_client:base_client.py:22 Response status code: 200. Response content: b'{"requestId":"b69f8790-fdd2-4409-b418-0fedfa0eb35f","statusCode":0,"statusDesc":""}'
INFO src.node.api_clients.base_client:base_client.py:11 PUT call: http://127.0.0.1:38749/filter/v2/subscriptions with payload: {"requestId": "1", "contentFilters": ["/test/2/waku-filter/proto"]}
INFO src.node.api_clients.base_client:base_client.py:22 Response status code: 200. Response content: b'{"requestId":"1","statusCode":0,"statusDesc":""}'
Actual behavior
Notice that the PUT request doesn't even have a pubsubTopic and the response is 200 without any statusDesc
Expected behavior
I would expect some kind of error should notify the user that such subscription doesn't existt
nwaku version/commit hash
harbor.status.im/wakuorg/nwaku:latest
The text was updated successfully, but these errors were encountered:
Same issue if we try to create a subscription with no pubsubtopic:
INFO src.node.api_clients.base_client:base_client.py:11 POST call: http://127.0.0.1:23639/filter/v2/subscriptions with payload: {"requestId": "1", "contentFilters": ["/test/1/waku-filter/proto"]}
INFO src.node.api_clients.base_client:base_client.py:22 Response status code: 200. Response content: b'{"requestId":"1","statusCode":0,"statusDesc":""}'
@fbarbu15 :
This is actually a feature that expected to work like this.
Some explanation:
POST / PUT filter v2 subscribe is just mimic normal REST API behavior, but actually does the same. Both can create and add to subscriptions regardless if peer is already subcribed or not. Actually it is bacuase of the Filter V2 protocol design that does not allows it else.
Note that there was a discussion already to remove PUT operation from filter v2 subscribe to eliminate this missunderstanding.
About the subscribe with empty pubsub-topic is a valid subscription for filter v2. Actually it behaves the same as for relay.
When you do not provide pubsub-topic it handle it as auto-sharded subscription and will calculate the shards upon the content-topic provided and subscribes to all shards of it.
I hope it answers. Please let me know if we need to still change anything.
To reproduce
Follow the requests shown in those tests logs.
Actual behavior
Notice that the PUT request doesn't even have a pubsubTopic and the response is 200 without any statusDesc
Expected behavior
I would expect some kind of error should notify the user that such subscription doesn't existt
nwaku version/commit hash
harbor.status.im/wakuorg/nwaku:latest
The text was updated successfully, but these errors were encountered: