-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(op): skip tx root validation for filtered out dup txns #8316
Conversation
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.
one nit w.r.t. module docs and a question regarding the new check
body.transactions.retain(|tx| { | ||
if is_duplicate(tx.hash, *block_number) { |
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.
hmm, are the dup transactions the only transactions in their blocks? Or do the headers with duplicate transactions always contain an empty transactions root? it would seem like the previous check is more correct
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.
yeah they are the only transactions in their blocks, I verified. agreed that checking tx hash feels more intuitive, but then again, this is a specific solution to a specific problem, so loss of generality is fine for less LOC.
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!
FileClient::bodies_iter_mut
that could cause undefined behaviour