fix(galoisd): correct signature/validator count check in Poll#5471
Open
bit2swaz wants to merge 1 commit into
Open
fix(galoisd): correct signature/validator count check in Poll#5471bit2swaz wants to merge 1 commit into
bit2swaz wants to merge 1 commit into
Conversation
|
@bit2swaz is attempting to deploy a commit to the unionbuild Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
@benluelo any chances i can get a review on this PR? |
Contributor
|
you need to remove the merge commit and rebase your pr off of main instead |
hussein-aitlahcen
approved these changes
Jun 23, 2026
05af10c to
897da74
Compare
Author
|
rebased. i hope this works :) |
benluelo
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #5428
Summary
both
Pollimplementations had two input-validation guards comparing each commit'sSignaturesslice length against itself, so the condition was always false and the "More signatures than validators" error never fired.a malformed request with more signatures than validators would skip the check entirely and reach the prover. this fixes both comparisons to use
Validatorson the right-hand side. the same copy paste bug was in both server files; both are patched in this commitChanges
galoisd/grpc/server.go: compareSignaturesagainstValidatorsfor both the trusted and untrusted commitsgaloisd/grpc/bls12381_server.go: same fix (the guard was copy pasted fromserver.gowith the same typo)galoisd/grpc/server_test.go: regression test thatPollrejects a commit with more signatures than validators, covering both server types and both commit fields (4 sub-cases total)Testing
go test ./grpc/...ingaloisd\. the new test fails before the fix (the dead guard is skipped so a zero-value server hits the job-slot check and returnsbusy_building), and passes after. also rango build ./grpc/...andgo vet ./grpc/...