-
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
fix: adding rln validator as default #2367
Conversation
You can find the image built from this PR at
Built from 6d28045 |
0deb882
to
cc4c5b2
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
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
@@ -130,6 +130,8 @@ type | |||
# a map that stores whether the ordered validator has been inserted | |||
# for a given PubsubTopic | |||
validatorInserted: Table[PubsubTopic, bool] | |||
# seq of validators that are called for every pubsub topic | |||
wakuDefaultValidators: seq[WakuValidatorHandler] |
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.
not sure i understand this.
imho if rln is enabled, it should be enabled in all topics. same applies for all validators.
so not sure i understand the difference between validators and default validators. Having addValidator
and addDefaultValidator
creates some cognitive load for a use case that IMHO we don't have?
Description
It was noticed that RLN validator wasn't configured for dynamically subscribed pubsub topics.
Therefore, we decided to implement the same approach to validators as in go-waku: we're adding now support for default validators, which will be run for all pubsub topics. We're adding RLN validator to the default validators whenever RLN is enabled.
Changes
How to test
Simulated the scenario in which we send an invalid message on a dynamically added pubsub topics with and without this fix.
With this fix:
Without it:
Thanks @AlejandroCabeza for it!
Not adding the test in this PR as it is added in Alex's PR of the RLN test suite
Also, thanks @chaitanyaprem for helping from go-waku side to maintain consistency between both :)
Issue
closes #2365