Skip to content

Add TripleXor AIR component with full prove+verify#396

Open
alon-f wants to merge 1 commit intoalon/decomposed-gates-preprocessedfrom
alon/triple-xor-air-integration
Open

Add TripleXor AIR component with full prove+verify#396
alon-f wants to merge 1 commit intoalon/decomposed-gates-preprocessedfrom
alon/triple-xor-air-integration

Conversation

@alon-f
Copy link
Copy Markdown
Contributor

@alon-f alon-f commented Mar 22, 2026

Summary

  • Integrates the auto-generated TripleXor gate AIR into the circuit prover as a new independent component
  • Renames preprocessed column IDs to match the new AIR (triple_xor_input_addr_0/1/2, triple_xor_output_addr, triple_xor_multiplicity)
  • Adds padding, full prove+verify test, and updated circuit hashes for N_COMPONENTS=17

Details

The new triple_xor component coexists with the old triple_xor_32:

  • Old triple_xor_32: Fed by blake_gate via the TripleXor32 relation (990559919), uses Enabler pattern
  • New triple_xor: Independent, uses Gate relation (378353459) with preprocessed address columns and multiplicities

This follows the same integration pattern as the M31ToU32 component.

Test plan

  • All 12 circuit-air tests pass (including new triple_xor::tests::test_evaluation_result)
  • All 7 circuit-prover tests pass (including new test_prove_and_stark_verify_triple_xor_context)
  • Circuit verify test passes with updated FIBONACCI_CIRCUIT_PREPROCESSED_ROOT
  • Component ordering verified consistent across all 10 ordering-sensitive locations

🤖 Generated with Claude Code


Note

Medium Risk
Adds a new AIR component into the end-to-end proving/verification pipeline and changes preprocessed trace column IDs/roots, which is sensitive to component ordering and lookup wiring but remains scoped to a single new gate type.

Overview
Adds a new independent triple_xor AIR/component (trace+interaction) alongside existing triple_xor_32, including constraint evaluation, witness generation, and registration in the component list used by both prover and circuit verifier.

Updates TripleXor preprocessed column IDs to the new triple_xor_input_addr_0/1/2, triple_xor_output_addr, and triple_xor_multiplicity naming, adds circuit finalization padding for triple_xor gates, and extends trace/interaction trace generation and component-prover enumeration accordingly.

Extends tests with a full prove+STARK-verify path for a synthetic TripleXor circuit, adds a TRIPLE_XOR_SAMPLE_EVAL_RESULT evaluation fixture, and updates the expected Fibonacci preprocessed root to reflect the new component/column layout.

Written by Cursor Bugbot for commit 5961d9f. This will update automatically on new commits. Configure here.

Integrates the auto-generated TripleXor gate AIR into the circuit prover:
- New triple_xor component (framework eval, circuit eval, witness trace)
- Preprocessed column IDs renamed to match new AIR (triple_xor_input_addr_0/1/2,
  triple_xor_output_addr, triple_xor_multiplicity)
- Padding in finalize_context for triple_xor gates
- Full prove+verify test
- Updated FIBONACCI_CIRCUIT_PREPROCESSED_ROOT for N_COMPONENTS=17

The old triple_xor_32 component stays alongside (blake_gate depends on it
via the TripleXor32 relation). The new triple_xor operates independently
through the Gate relation with preprocessed address columns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@reviewable-StarkWare
Copy link
Copy Markdown
Collaborator

This change is Reviewable

@alon-f alon-f force-pushed the alon/decomposed-gates-preprocessed branch from d06f0fc to 8ff8377 Compare March 22, 2026 13:43
@alon-f alon-f force-pushed the alon/triple-xor-air-integration branch from 5961d9f to fd97a69 Compare March 24, 2026 13:24
@alon-f alon-f changed the base branch from alon/decomposed-gates-preprocessed to stav/blake_in_circuit March 24, 2026 13:25
@alon-f alon-f changed the base branch from stav/blake_in_circuit to alon/decomposed-gates-preprocessed March 24, 2026 14:02
@alon-f alon-f force-pushed the alon/triple-xor-air-integration branch from fd97a69 to 5961d9f Compare March 24, 2026 14:02
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.

2 participants