-
Notifications
You must be signed in to change notification settings - Fork 674
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
Implement SDK handler to drop messages from non-validators #1917
Implement SDK handler to drop messages from non-validators #1917
Conversation
// ValidatorHandler drops messages from non-validators | ||
type ValidatorHandler struct { | ||
Handler | ||
ValidatorSet ValidatorSet |
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.
I know we don't do this very well in the rest of the repo... but should we make this a minimal interface? Doesn't seem like we need any of the sampling functionality here.
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.
last nit then lgtm
Co-authored-by: Stephen Buttolph <[email protected]> Signed-off-by: Joshua Kim <[email protected]>
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
Why this should be merged
Implements a handler that drops messages from non-validators
How this works
Adds a
ValidatorSet
interface we lookup incoming nodeIDs from to see if we should handle the request or not.How this was tested
Added a unit test