-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[HackerOne-2310746] Add fee check to transmissions fetched in batch proposal. #3104
Conversation
…/simple-proposal-transmission-check
af95fff
to
f8c2827
Compare
let mut transmissions = self.sync_with_batch_header_from_peer(peer_ip, &batch_header).await?; | ||
|
||
// Check that the transmission ids match and are not fee transactions. | ||
for (transmission_id, transmission) in transmissions.iter_mut() { |
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.
@ljedrz can you profile this and determine if an optimization is possible with rayon or tokio?
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.
Feel free to open a new PR if so
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.
Note that the number of transmissions here can be up to 50, and each one will be deserializing the Transmission Data object.
Motivation
This PR performs basic checks on transmissions fetched from batch proposals. We now check that the transmission id's match and that the transmission is not a
Fee
transaction.This fix does not address all the issues, but is an added mitigation for the malicious Fee transmission case. This is an incremental fix for #3098.
Related PRs
This PR is related to #3098, and is a simpler approach that addresses one case of the problem.
This PR fixes #2990, but is insufficient for #2991.