-
Notifications
You must be signed in to change notification settings - Fork 45
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
feat: add filter v2 rpc #798
Conversation
@richard-ramos rest endpoints are internally using filterLightNode. how to select the peer for all the endpoints? What is the peerSelection strategy to use? Rest request only have requestId, peer selection is internal to the node. |
Jenkins BuildsClick to see older builds (30)
|
Peer selection is done automatically. Look here how it is done in nwaku: Here's the relevant logic for how peers are selected https://github.com/waku-org/nwaku/blob/d5c3ade5e21eafe17ca1c3b6e43e0563df923beb/waku/node/peer_manager/peer_manager.nim#L700-L707 do note that service slots have priority. If there are no peers in the service slots, then a random peer with filter protocol support is selected |
Two questions:
|
Hm. Indeed, this seems to me to something that the filter REST API might be missing. Unsubscribing should be associated to an specific peer, or maybe, to all peers that you're subscribed to, while the way it's implemented in nwaku seems to not be deterministic https://github.com/waku-org/nwaku/blob/880d018eaf9fbc8c94bb0da394140993f8d94e8c/waku/node/rest/filter/handlers.nim#L251 cc: @NagyZoltanPeter for insights. |
The same applies to Ping. The request seems to be missing the peerId. |
ping, subscribe/unsubscribe and unsubscribeAll.
c6ab16b
to
5a6d585
Compare
457b048
to
eea12f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ping, subscribe/unsubscribe and unsubscribeAll.
Description
Filter rest endpoints for #746 . Getting current messages is not implemented.
Changes
Tests
TODO