-
Notifications
You must be signed in to change notification settings - Fork 331
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
add validation of allowed CrdsValues in gossip #4764
base: master
Are you sure you want to change the base?
Conversation
4691581
to
d7dd5f3
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.
i know its just a draft pr rn. big question is if we can actually get rid of LegacyVersion
This can amplify traffic if someone pushes LegacyVersion to the cluster. So your node keeps receiving same LegacyVersion in pull responses repeatedly and drops them every time. We need to wait for #3653 to hit mainnet, so that nodes do not return deprecated values in pull responses. |
Protocol enum variants can now be pruned better in Sanitize impl
Style change for PullRequest sanitize. Co-authored-by: Greg Cusack <[email protected]>
518f1b4
to
814abfa
Compare
We need to allow it for push messages as well. |
Done in e4fc336, also added comment so others do not forget about this caveat. |
gossip/src/protocol.rs
Outdated
val.sanitize() | ||
} | ||
Protocol::PushMessage(_, val) => { | ||
// PullMessage is allowed to carry anything in its CrdsData, including deprecated Crds |
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.
PushMessage instead of "PullMessage"
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.
oops... corrected.
e4fc336
to
da0b1e5
Compare
Protocol enum variants can now be pruned better in Sanitize impl
Problem
Sanitize implementation allowed certain invalid PullRequest variants to travel through the code
Summary of Changes