chore: Fill witness vector with random values#19278
Merged
federicobarbacovi merged 4 commits intomerge-train/barretenbergfrom Jan 5, 2026
Merged
chore: Fill witness vector with random values#19278federicobarbacovi merged 4 commits intomerge-train/barretenbergfrom
federicobarbacovi merged 4 commits intomerge-train/barretenbergfrom
Conversation
…b/fill_witness_vector_with_random_values
ledwards2225
approved these changes
Jan 2, 2026
Contributor
ledwards2225
left a comment
There was a problem hiding this comment.
LGTM - just one comment that looks like it needs updating
| @@ -444,7 +444,7 @@ WitnessVector witness_map_to_witness_vector(Witnesses::WitnessMap const& witness | |||
| // To ensure that witnesses sit at the correct indices in the `WitnessVector`, we fill any indices | |||
| // which do not exist within the `WitnessMap` with the dummy value of zero. | |||
Contributor
There was a problem hiding this comment.
This comment needs to be updated right? might want to explain why were using a random value as well
Contributor
Author
There was a problem hiding this comment.
Done, thanks!
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jan 5, 2026
BEGIN_COMMIT_OVERRIDE chore: (PCS audit) remove the linear combination of claims in shplonk (#19191) chore: Audit of the Mega circuit builder 1 (#19192) chore: edit to the circuit builder docs (#19214) chore: Honk recursion constraint audit (#18940) chore: Fill witness vector with random values (#19278) refactor(bb): remove unused MSGPACK_FIELDS from ACIR constraint types (#19085) chore: Add `DISABLE_ASSERTS` in some Honk recursion constraint tampering tests (#19314) fix: Replace missed CI_ENABLE_DISK_LOGS with CI_USE_BUILD_INSTANCE_KEY END_COMMIT_OVERRIDE
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.
Noir optimises away some witnesses. When bb finds such a situation, it fills the witness vector with zeros. As a precaution, we change the behaviour to fill the witness vector with random values. This ensures that if the optimised witnesses are used somewhere (which should not be the case) the circuit will fail with high probability.