Skip to content

Commit

Permalink
refactor: transition constraints (#721)
Browse files Browse the repository at this point in the history
* Start refactor

* Add TransitionZerofiersIter and implement Iterator trait

* Stark prover code compiling

* Save progress

* Refactor is compiling

* Comment code to run only fibonacci AIR tests

* Change compute_transition function

* Code is compiling

* Add some debug prints

* Dummy commit

* Dummy commit

* Dummy commit

* Fix zerofier evaluations bugs and make fibonacci AIR test pass

* Remove commented code

* Implement bit flags AIR and test

* Add bit flag AIR example file

* Fix get_trace_evaluations function for multi-row step AIRs

* Save debugging process

* Refactor step view functionality

* Save work in progress

* Bugs fixed and bit flags AIR integration test pussing

* Remove unused code

* Fix fibonacci 2 cols to new constraints design

* Fix quadratic AIRs to new constraints design

* Fix fibonacci RAP AIR

* Fix shifted 2 columns fibonacci AIR to new constraints design

* Fix dummy AIR to new constraints design

* Remove unused code and fix winterfell adapter version of lambdaworks platinum prover

* Implement some Cairo constraints with the new constraints model

* Add some more constraints

* Finish operand constraints

* Add some more constraints

* Finish porting all constraints

* Make Cairo prover compile

* Make Cairo prover compile

* Cairo tests running but not passing with some constraints enabled

* Make zerofier evaluations independent of constraint index in constraints vector

* Remove unused code

* Remove more unused code

* Rollback change in exercises file

* Uncomment winterfell adapter

* Update winterfell adapter AI

* Update winterfell adapter example

* Fix TOML

* Save changes in winterfell adapter

* Save changes in winterfell adapter

* Fix TOML

* Fix winterfell adapter crate

* Minor fix

* Save work in progress - code compiling, fibonacci test failing

* Fix some bugs

* Make 2 columns fibonacci test pass

* Make 2 columns shifted fibonacci test pass

* Save work in progress

* Fix bug and make bit flags AIR test pass

* Make quadratic AIR test pass

* Fix dummy AIR test

* Save work in progress

* Fix some bugs

* Fix some more bugs

* Fix some more bugs

* Fix some more bugs

* Make Cairo tests pass

* Remove commented code

* Pin winterfell adapter and miden example to version of lambdaworks

* Polish code

* Polish more code

* Fix periodic columns AIR example and tests

* Remove some useless code

* Fix some clippy warnings

* Apply clippy fix

* Rearrange debug code in Cairo AIR

* Fix wasm test

* Import module inside debug scope

* Fix code

* Fix lint

* Remove useless comments

* Add some docs for transition constraints trait

* Polish docs a bit

* Add more comments to code

* Remove unused code

* Apply optimization

* Remove unused code

* Add some comments

* Add type alias for ZerofierGroupKey

* Add instruments, use iterators in last eval loop

* Fmt

* Constraint refactor parallel (#773)

Add parallel to the last step

---------

Co-authored-by: MauroFab <maurotoscano2@gmail.com>
Co-authored-by: Mauro Toscano <12560266+MauroToscano@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 22, 2024
1 parent 788c79f commit c4586a7
Show file tree
Hide file tree
Showing 32 changed files with 6,379 additions and 2,717 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ lambdaworks-math = { path = "./math", version = "0.5.0", default-features = fals
stark-platinum-prover = { path = "./provers/stark" }
cairo-platinum-prover = { path = "./provers/cairo" }
lambdaworks-winterfell-adapter = { path = "./winterfell_adapter"}

[patch.crates-io]
winter-air = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4"}
winter-prover = { git = "https://github.com/lambdaclass/winterfell-for-lambdaworks.git", branch = "derive-clone-v6.4"}
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ clippy:
cargo clippy --workspace --all-targets -- -D warnings
cargo clippy --workspace --all-targets --features wasm -- -D warnings
cargo clippy --workspace --all-targets --features cli -- -D warnings
cargo clippy --workspace --all-targets --features parallel -- -D warnings
cargo clippy --tests

clippy-cuda:
Expand Down
2 changes: 1 addition & 1 deletion examples/prove-miden/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ path = "src/main.rs"
lambdaworks-crypto = { workspace = true }
lambdaworks-math = { workspace = true, features = ["lambdaworks-serde-string"] }
lambdaworks-winterfell-adapter = { workspace = true }
stark-platinum-prover = { workspace = true, features = ["instruments", "parallel"] }
stark-platinum-prover = { git = "https://github.com/lambdaclass/lambdaworks" , rev = "3da725de1e6f76c04ddbb3ccb67e6038a7663134", features = ["winter_compatibility"] }

serde = { version = "1.0" }
serde_json = "1"
Expand Down
Binary file added provers/cairo/proof.proof
Binary file not shown.
Loading

0 comments on commit c4586a7

Please sign in to comment.