-
Notifications
You must be signed in to change notification settings - Fork 57
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
chore: Enabling to use a full node for lightpush via rest api without lightpush client configured #2626
chore: Enabling to use a full node for lightpush via rest api without lightpush client configured #2626
Conversation
…push client configured
You can find the image built from this PR at
Built from 9787e53 |
You can find the image built from this PR at
Built from 9787e53 |
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.
Approved to not block but this flow seams a bit convoluted.
Maybe in waku_node
local vs remote light push should be 2 different procs?
@@ -35,6 +36,9 @@ const NoPeerNoDiscoError = | |||
const NoPeerNoneFoundError = | |||
RestApiResponse.serviceUnavailable("No suitable service peer & none discovered") | |||
|
|||
proc useSelfHostedLightPush(node: WakuNode): bool = |
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.
Maybe rephrase to local
vs remote
lightpush ?
if useSelfHostedLightPush(node): | ||
discard | ||
else: |
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.
if useSelfHostedLightPush(node): | |
discard | |
else: | |
if not useSelfHostedLightPush(node): |
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.
Superr, thanks so much!
Added a couple questions/comments :)
Description
This is helper enhancment for testing (rate limit specifically for me) on lightpush... similar to query self store node via REST API.
With this change one can issue lightpush request via REST API on a service node having lightpush protocol installed.
In contrast it was needed to run a full node with lightpush service and a light client (configured with the service node peerId) to be usable from REST API.
With this change a lightpush service node (with relay of course) can serve such lightpush API request and can relay such messages.
This can help in various way.
Changes
How to test
Open question: