waku-org / nwaku

Waku node and protocol.
Other
199 stars 52 forks source link

chore: do not mount lightpush without relay #2808

Open shash256 opened 3 months ago

shash256 commented 3 months ago

Background

This is a follow-on for a point raised by @NagyZoltanPeter at regarding mounting lightpush without relay.

Details

It was like this before in waku_node.nim and now in waku_lightpush/callbacks.nim . But given a mounted relay is needed for a lightpush service node, it is a question of why we would want to still mount it and not fail early.

Acceptance criteria

jm-clius commented 3 months ago

No strong opinions here, but conceptually we've decoupled lightpush from having any other protocol dependencies - in other words, lightpush is now simply the protocol for directly pushing a message to a service node. The services provided by this service node is currently limited to Relay, but it could in future be any other service (such as Store, etc.). Lightpush should then be mounted without reference to other protocols and only individual lightpush requests should succeed or fail based on the secondary protocols and services requested by the client.

NagyZoltanPeter commented 3 months ago

It is right, but see the case if there is a running service node in the network having just able to reply error. It will be the same for such case if dependent services are not present. My intention was with the comment made on Akhil's changes that if I configure a node to have lightpush might want to notice early that I miss-configured my node. In this sense I mean to fail rather early than having bulk error messages for possible clients.