Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass MPolynomial Representation of AIR Constraints #125

Merged
merged 27 commits into from
Nov 21, 2022

Conversation

jan-ferdinand
Copy link
Member

@jan-ferdinand jan-ferdinand commented Nov 15, 2022

Summary:

  • express all constraints of all tables as arithmetic circuits
  • generate code to evaluate those constraints
  • generate code for getting quotient degree bounds
  • remove memoization of AIR constraints & degree bounds
  • $\Rightarrow$ completely remove multivariate polynomials from tables

Running cargo criterion --bench prove_fib_100 on this PR's branch comparing to current master:

Fix #96, #121, #123

@jan-ferdinand jan-ferdinand linked an issue Nov 15, 2022 that may be closed by this pull request
4 tasks
@jan-ferdinand jan-ferdinand force-pushed the circuits_everywhere branch 4 times, most recently from a37f598 to ddf060d Compare November 16, 2022 07:55
@jan-ferdinand jan-ferdinand force-pushed the circuits_everywhere branch 2 times, most recently from 74207ae to 825f36e Compare November 16, 2022 22:45
@jan-ferdinand jan-ferdinand force-pushed the circuits_everywhere branch 2 times, most recently from 97d9ffd to f8f6569 Compare November 17, 2022 18:56
Base automatically changed from arithmetic_domain to master November 18, 2022 11:50
@jan-ferdinand jan-ferdinand force-pushed the circuits_everywhere branch 4 times, most recently from f3086dd to cf29f12 Compare November 20, 2022 19:16
@jan-ferdinand jan-ferdinand force-pushed the circuits_everywhere branch 2 times, most recently from f379c5a to ddcea96 Compare November 20, 2022 23:10
@jan-ferdinand jan-ferdinand marked this pull request as ready for review November 20, 2022 23:11
@jan-ferdinand jan-ferdinand force-pushed the circuits_everywhere branch 2 times, most recently from fa553b4 to d3f96b0 Compare November 21, 2022 06:14
@sshine sshine force-pushed the circuits_everywhere branch from aba373f to f79e1bd Compare November 21, 2022 15:20
Copy link
Collaborator

@aszepieniec aszepieniec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Requested changes:

  • build script that automatically generates constraints code when not already present
  • don't spam terminal when generating code
  • test suite should work out of the box

triton-vm/src/table/extension_table.rs Outdated Show resolved Hide resolved
triton-vm/src/table/extension_table.rs Outdated Show resolved Hide resolved
triton-vm/src/table/extension_table.rs Outdated Show resolved Hide resolved
triton-vm/src/table/extension_table.rs Outdated Show resolved Hide resolved
jan-ferdinand and others added 4 commits November 21, 2022 17:33
Co-authored-by: sshine <simon@neptune.cash>
The main purpose of creating a Makefile is to be able to generate
constraints before running `cargo`. Doing this in a build.rs script
proves to be a little circular.

Since a Makefile is introduced, we make the CI script depend on it to
ensure consistency.
@jan-ferdinand jan-ferdinand merged commit 5434e2f into master Nov 21, 2022
@jan-ferdinand jan-ferdinand deleted the circuits_everywhere branch November 21, 2022 20:09
sshine added a commit that referenced this pull request Nov 22, 2022
The main advancement of this release is the use of performance-optimized
arithmetic circuits instead of multivariate polynomials for expressing
constraints. (cd62c59)

- Depend on twenty-first-0.7.0
- Don't multiply randomizer codeword by random weight (#139)
- Replace `Replace `Result<T, Box<dyn Error>>` with `anyhow::Result<T>`) (#134)
- Use quotient domain instead of FRI domain wherever applicable (#114)
- Fix bug in the decoding procedure for `Vec<PartialAuthenticationPath>` (e7fd6cc)
- Run 'cargo fmt' after constraint-evaluation-generator (2d183e4)
- Add prove_fib_100 benchmark for STARK proving (1326b12)
- Replace TimingReporter with TritonProfiler (c40c1bc)
- Add "TIP 0004: Drop U32 Table"
- Drop `VecStream` in favor of `Vec<BFieldElement>`

PR #125:
- Generate all constraints as circuits
- Remove memoization of AIR constraints
- Bypass MPolynomial Representation of AIR Constraints
- Create Makefile, use Makefile in CI
- Auto-generate Quotientable trait instances
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants