Skip to content
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: Added message size check before relay for lightpush #2695

Merged
merged 2 commits into from
May 15, 2024

Conversation

shash256
Copy link
Contributor

@shash256 shash256 commented May 13, 2024

Description

Added setup for message validation for lightpush service nodes to catch validation failures before relay. Fixes issue #2595 . Followup to PR #2671 .

Changes

  • Updates to lighpush protocol
  • Message validation in REST API
  • Unit test to verify the functionality

Copy link

github-actions bot commented May 13, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2695-rln-v2

Built from 241ef99

Copy link

github-actions bot commented May 13, 2024

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2695-rln-v1

Built from 241ef99

Copy link
Contributor

@gabrielmer gabrielmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks so much! 🔥 🔥 🔥

Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Minor comment below which you may address, but no need to re-request review. According to me this can be merged. :)

let validationRes = await node.wakuRelay.validateMessage(pubSubTopic, message)
if validationRes.isErr():
return err(validationRes.error)
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you return in the previous line, I don't think this else is necessary. In other words, if validation failed, this block of code will not be executed, whether in an else block or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants