Skip to content

chore: reject non-canonical x coordinate (native affine_element)#24029

Merged
ludamad merged 5 commits into
v5-nextfrom
cb/grumpkin-reject-non-canonical-x-v5-next
Jun 13, 2026
Merged

chore: reject non-canonical x coordinate (native affine_element)#24029
ludamad merged 5 commits into
v5-nextfrom
cb/grumpkin-reject-non-canonical-x-v5-next

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Rebase of #22908 onto v5-next (the original targeted merge-train/barretenberg).

The 3 commits from sb/ecc-finding-2 replayed cleanly onto v5-next with an identical diff (11 files, +65/-24):

  • finding 2: reject non-canonical x coordinate. (suyash67)
  • chore: point grumpkin CRS at regenerated grumpkin_g1_v2.dat
  • chore: update hardcoded ECCVM VK for grumpkin SRS v2

Fix for finding 2 from the ecc-groups audit: affine_element::from_compressed now rejects non-canonical x-coordinate encodings (x >= modulus). Because grumpkin SRS generation used this function, the grumpkin SRS is regenerated and published as grumpkin_g1_v2.dat, and the hardcoded ECCVM VK is updated to match.

There were no conflicts during the rebase — every touched file was identical on v5-next and the original PR base, so the regenerated SRS-v2 / ECCVM-VK values apply verbatim. Still worth confirming the ECCVM prove+verify CI is green on v5-next so those hardcoded commitments are validated against this line.

Supersedes #22908 for the v5-next release line.


Created by claudebox · group: slackbot

suyash67 and others added 3 commits June 11, 2026 18:29
The from_compressed fix changes ~62% of derived grumpkin SRS points, so the
regenerated SRS is published as grumpkin_g1_v2.dat (sha256 87fe782860dd58f0
9a81f797b56346398aabe6e0ed98e0a5ccf14604dd8baee2). Local cache filenames and
the browser IndexedDB key are bumped as well so stale caches are not reused.

Also fix format.sh staging tracked files as deletions when the pre-commit
hook runs in a linked git worktree (GIT_DIR must be unset).
The fixed ECCVM VK commitments (lagrange_first/lagrange_last) and vk_hash
are MSMs over the grumpkin SRS, so the v2 SRS changes them. Stale values
made the verifier transcript diverge from the prover, failing fresh
prove+verify at the IPA G_0 check. Values regenerated via
ECCVMTests.FixedVK.
@AztecBot AztecBot added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. labels Jun 11, 2026
ludamad and others added 2 commits June 12, 2026 19:04
…update

The committed pinned-build.tar.gz artifacts freeze the rollup circuit VKs.
Updating the hardcoded ECCVM VK (baked into the rollup circuits as fixed
witnesses via the chonk recursive verifier) changed those circuits' VKs, but
the stale pins kept the old values, so proving verified the new circuit against
the old VK and failed at the pairing check (rollup_ivc_integration and
avm_integration: 'Failed to verify proof from key!'). Regenerated both pins with
the updated bb.
@ludamad ludamad marked this pull request as ready for review June 13, 2026 14:33
@ludamad ludamad enabled auto-merge June 13, 2026 15:10
@ludamad ludamad disabled auto-merge June 13, 2026 15:10
@ludamad ludamad added this pull request to the merge queue Jun 13, 2026
Merged via the queue into v5-next with commit 5fd6187 Jun 13, 2026
18 checks passed
@ludamad ludamad deleted the cb/grumpkin-reject-non-canonical-x-v5-next branch June 13, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. private-port-next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants