Skip to content

fix(galoisd): correct signature/validator count check in Poll#5471

Open
bit2swaz wants to merge 1 commit into
unionlabs:mainfrom
bit2swaz:fix/galoisd-sig-validator-check
Open

fix(galoisd): correct signature/validator count check in Poll#5471
bit2swaz wants to merge 1 commit into
unionlabs:mainfrom
bit2swaz:fix/galoisd-sig-validator-check

Conversation

@bit2swaz

@bit2swaz bit2swaz commented Jun 14, 2026

Copy link
Copy Markdown

fixes #5428

Summary

both Poll implementations had two input-validation guards comparing each commit's Signatures slice 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 Validators on the right-hand side. the same copy paste bug was in both server files; both are patched in this commit

Changes

  • galoisd/grpc/server.go: compare Signatures against Validators for both the trusted and untrusted commits
  • galoisd/grpc/bls12381_server.go: same fix (the guard was copy pasted from server.go with the same typo)
  • galoisd/grpc/server_test.go: regression test that Poll rejects a commit with more signatures than validators, covering both server types and both commit fields (4 sub-cases total)

Testing

go test ./grpc/... in galoisd\. the new test fails before the fix (the dead guard is skipped so a zero-value server hits the job-slot check and returns busy_building), and passes after. also ran go build ./grpc/... and go vet ./grpc/...

@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

@bit2swaz is attempting to deploy a commit to the unionbuild Team on Vercel.

A member of the Team first needs to authorize it.

@bit2swaz

Copy link
Copy Markdown
Author

@benluelo any chances i can get a review on this PR?

@benluelo

Copy link
Copy Markdown
Contributor

you need to remove the merge commit and rebase your pr off of main instead

@bit2swaz bit2swaz force-pushed the fix/galoisd-sig-validator-check branch from 05af10c to 897da74 Compare June 23, 2026 17:38
@bit2swaz

Copy link
Copy Markdown
Author

rebased. i hope this works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong if check condition, error handling logic never trigger forever

3 participants