-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Check transaction signatures in entry verify #8596
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8596 +/- ##
========================================
Coverage ? 80%
========================================
Files ? 256
Lines ? 55768
Branches ? 0
========================================
Hits ? 44651
Misses ? 11117
Partials ? 0 |
That's a PoH Verify function. I would have expected it added in the TVU somewhere OR see SigVerifyStage moved to some shared location. Also, surprised to see CPU-based signature verification here. But given the central location, does this indicate that I think it'd be best to address the architectural diagrams first on this one: https://github.com/solana-labs/solana/blob/master/docs/art/validator.bob |
Yes, |
It was, now it's poh verify & transaction signature verify. There's nothing that says poh_verify that I noticed.
We can do it in a follow-up change, but this is the easiest/most straightforward way to add it. I did some perf sanity checks, we are still above 50k tps cpu-only on colo.
Yes. This also solves this problem. |
This is an architecture bug more than it is an implementation bug. I don't think we should merge this until a change to architecture documents is approved. Zooming way, way in, all the way to function level (which is already too far), this patch makes the architectural decision to do signature verification before PoH verification. That alone looks like an attack vector (malicious leader randomly resembles transactions and floods the validators). At the very least, the code in this patch should be in a separate function, so that it's clear one form of verification is happening before the other. |
Why couldn't/wouldn't the malicious leader assemble those transaction to just pass poh verify? It just needs to do some hashing. |
The intent of my comment wasn't to debate an attack vector. It was to give a concrete example of how this innocent looking PR may have significant implications, and how a PR to an architectural document would be a better venue for that discussion. |
Pull request has been modified.
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.
Thanks. While I would have rather discussed the change at the architectural level, this patch and tests are now so clear that anyone should easily be able to move it elsewhere, if needed.
(cherry picked from commit b68b74a)
Problem
Transaction signatures not verified.
Summary of Changes
Verify them in entry verification.
Fixes #8593