feat: enforce accumulator_not_empty = 0 at ECCVM lagrange_first row#22461
Merged
notnotraju merged 1 commit intomerge-train/barretenbergfrom Apr 10, 2026
Merged
Conversation
…ipt relation In preparation for masking at the top of the ECCVM circuit (where lagrange_first moves to row k = NUM_DISABLED_ROWS_IN_SUMCHECK and shiftable column values at row k are no longer PCS-enforced to be zero), add ACCUMULATOR_NOT_EMPTY_INIT subrelation to ECCVMTranscriptRelation. Without this constraint, a malicious prover could set accumulator_not_empty = 1 at the lagrange_first row, disabling INFINITY_ACC_X/Y and injecting arbitrary accumulator coordinates undetected. Update recursive verifier gate counts (+174 gates from the new subrelation): - ECCVM_RECURSIVE_VERIFIER_GATE_COUNT: 224336 → 224510 - CHONK_RECURSION_GATES: 1491593 → 1491767
iakovenkos
approved these changes
Apr 10, 2026
Contributor
iakovenkos
left a comment
There was a problem hiding this comment.
amazing, thanks for identifying this
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.
Summary
Add
lagrange_first * transcript_accumulator_not_empty = 0subrelation toECCVMTranscriptRelation.This is a prerequisite for #22334 (masking at top of ECCVM circuit). The audit in #22442 identified that when
lagrange_firstmoves to row k (away from the PCS-enforced zero row),transcript_accumulator_not_emptyis the only shiftable column where a malicious prover can potentially set a non-zero value at thelagrange_firstrow without any existing relation catching it. Setting it to 1 disablesINFINITY_ACC_X/Y, allowing arbitrary accumulator coordinates to be injected.Changes
ACCUMULATOR_NOT_EMPTY_INITinecc_transcript_relation.hpp(degree 2)ECCVM_RECURSIVE_VERIFIER_GATE_COUNT: 224336 → 224510CHONK_RECURSION_GATES: 1491593 → 1491767Test plan
eccvm_tests— all 44 tests passstdlib_eccvm_verifier_tests—SingleRecursiveVerificationpasses with updated gate countdsl_tests—GateCountChonkRecursionpasses with updated gate count