* windowed mul
* Working
* Window of 4 bits
* Fix
* Comments
* Unroll loop
* Unroll loop
* remove global
* Minor
* Minor
* Implement `CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY` in interpreter
* Minor
* Doesn't work
* Minor
* Minor
* wnaf msm
* Working hardcoded values: 28657 opcodes
* Working wnaf
* Small wnaf optim
* Precompute works
* Working together
* Bump to 129 bits
* Working glv decomposition
* Working MSM with GLV
* Almost working
* Working
* ECC test folder
* Working with real sig data
* Fix tests + Clippy
* Minor
* Cleaning
* Comments
* Cleaning
* Smaller glv test file
* Print opcode count at the end of interpreter run
* More constants
* Add z3 proof that the GLV scalars are 129-bit or less
* Minor change to z3 proof
* Move files and renaming fns
* Testing
* Fix BN GLV
* BN precompute table
* Working precompute
* Working bn tests
* Working
* Minor
* Minor
* Use MULFP254
* Minor
* Merge conflicts
* Remove unused asm file
* ECC fns renaming (#874)
* PR feedback
* Unify handling of ADD, SUB, LT, GT under the formula x+y=z+cy*2^256.
* Rename general column ranges to "registers" instead of "inputs".
* Rename 'compare' module to 'addcc'.
* Update comments.
* Enforce length equality in iteration.
* Address William's PR comments.
* windowed mul
* Working
* Window of 4 bits
* Fix
* Comments
* Unroll loop
* Unroll loop
* remove global
* Minor
* Minor
* Implement `CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY` in interpreter
* Minor
* Doesn't work
* Minor
* Minor
* wnaf msm
* Working hardcoded values: 28657 opcodes
* Working wnaf
* Small wnaf optim
* Precompute works
* Working together
* Bump to 129 bits
* Working glv decomposition
* Working MSM with GLV
* Almost working
* Working
* ECC test folder
* Working with real sig data
* Fix tests + Clippy
* Minor
* Cleaning
* Comments
* Cleaning
* Smaller glv test file
* Print opcode count at the end of interpreter run
* More constants
* Add z3 proof that the GLV scalars are 129-bit or less
* Minor change to z3 proof
* Minor
* Hamish's suggestion
* Working
* Cleaning
* Clippy
* PR feedback
* Minor PR feedback
* Simplify loop and remove clippy.
* Offset auxiliary coefficients so they're always positive.
* Split mul aux input into lo/hi parts.
* Rename register.
* Combine `QUO_INPUT_{LO,HI}`; rearrange some columns.
* Split `MODULAR_AUX_INPUT` into high and low pieces.
* Remove range_check_error debug output.
* First draft of generating the range checks.
* Remove opcodes for operations that were defined elsewhere.
* Clean up interface to build arithmetic trace.
* Fix "degree too high" bug in DIV by zero.
* Fix constraint_transition usage in recursive compare.
* Fix variable name; use named constant.
* Fix comment values.
* Fix bug in recursive MUL circuit.
* Superficial improvements; remove unnecessary genericity.
* Fix bug in recursive MULMOD circuit.
* Remove debugging noise; expand test.
* Minor comment.
* Enforce assumption in assert.
* Make DIV its own operation.
* Make MOD it's own operation; rename structs; refactor.
* Expand basic test.
* Remove comment.
* Put Stark operations in their own file.
* Test long traces.
* Minor comment.
* Address William's comments.
* Use `const_assert!` instead of `debug_assert!` because Clippy.
Which can be used to compress two proofs into one. Each inner proof can be either
- an "EVM root" proof (which typically proves one transaction, though it could be 0 or more)
- another aggregation proof
The goal here is to end up with a single "root" circuit representing any EVM proof. I.e. it must verify each STARK, but be general enough to work with any combination of STARK sizes (within some range of sizes that we chose to support). This root circuit can then be plugged into our aggregation circuit.
In particular, for each STARK, and for each initial `degree_bits` (within a range that we choose to support), this adds a "shrinking chain" of circuits. Such a chain shrinks a STARK proof from that initial `degree_bits` down to a constant, `THRESHOLD_DEGREE_BITS`.
The root circuit then combines these shrunk-to-constant proofs for each table. It's similar to `RecursiveAllProof::verify_circuit`; I adapted the code from there and I think we can remove it after. The main difference is that now instead of having one verification key per STARK, we have several possible VKs, one per initial `degree_bits`. We bake the list of possible VKs into the root circuit, and have the prover indicate the index of the VK they're actually using.
This also partially removes the default feature of CTLs. So far we've used filters instead of defaults. Until now it was easy to keep supporting defaults just in case, but here maintaining support would require some more work. E.g. we couldn't use `exp_u64` any more, since the size delta is now dynamic, it can't be hardcoded. If there are no concerns, I'll fully remove the feature after.
Lots of little bugs!
- The Keccak sponge table's padding logic was wrong, it was mixing up the number of rows with the number of hashes.
- The Keccak sponge table's Keccak-looking data was wrong - input to Keccak-f should be after xor'ing in the block.
- The Keccak sponge table's logic-looking filter was wrong. We do 5 logic CTLs for any final-block row, even if some of the xors are with 0s from Keccak padding.
- The CPU was using the wrong/outdated output memory channel for its Keccak sponge and logic CTLs.
- The Keccak table just didn't have a way to filter out padding rows. I added a filter column for this.
- The Keccak table wasn't remembering the original preimage of a permutation; lookers were seeing the preimage of the final step. I added columns for the original preimage.
- `ctl_data_logic` was using the wrong memory channel
- Kernel bootloading generation was using the wrong length for its Keccak sponge CTL, and its `keccak_sponge_log` was seeing the wrong clock since it was called after adding the final bootloading row.