Commit Graph

1152 Commits

Author SHA1 Message Date
Guillaume Ballet
8d6f445b0b rewrite coprocessor substitution routine (#463)
* rewrite coprocessor substitution routine

* fix linter warning

* review feedback

Co-Authored-By: Thibaut Schaeffer <schaeffer.thibaut@gmail.com>

* Update riscv/src/compiler.rs

Co-authored-by: Thibaut Schaeffer <schaeffer.thibaut@gmail.com>

* fix warnings

* fix issue that appeared during last refactor

* write tests for the coprocessor filter

* fix linter error

* test when two 0s appear in a row

* Update riscv/src/compiler.rs

Co-authored-by: Thibaut Schaeffer <schaeffer.thibaut@gmail.com>

* fix typo and rebase format error

* rename filter function

---------

Co-authored-by: Thibaut Schaeffer <schaeffer.thibaut@gmail.com>
2023-08-10 11:25:05 +00:00
Georg Wiese
0425f97a0a Refactor Poseidon example into its own machine (#479)
* Refactor Poseidon example into its own machine

* Remove degree, rename and add comment
2023-08-10 10:58:23 +02:00
Lucas Clemente Vella
c81757143f Backend unification (#417)
* Mostly done.

* With all features enabled, it at least compiles.

* Fixed some bugs.

* Being explicit about degree type.

* More tests passing.

* Even more tests passing.

* Restoring optional Halo2 compilation.

* Fixing bad merge.

* Fixing lint errors.

* More lint fixes.

* Split of the backend implementations into trait categories.

* Some renamings.

* Much better function names.

* Removed option from witness.

* Pleasing the lint.

* Returning the proof.

* Removing filesystem stuff from backend.

* Renaming function.

* Another function rename.

---------

Co-authored-by: Leo <me@leoa.lt>
2023-08-08 12:14:24 +00:00
Emily Herbert
7718a9db62 Adding documentation for why making parsing generic is not possible at the moment. (#448)
We could fix this in the future by closing https://github.com/lalrpop/lalrpop/issues/42, or via some other means.
2023-08-08 11:08:07 +00:00
Georg Wiese
653565448b Add witness generation benchmarks #462 (#462) 2023-08-08 11:52:12 +02:00
Thibaut Schaeffer
e658dbd43c Fallible linker (#467)
* make linker fallible, propagate errors, add book entry about linker

* Apply suggestions from code review

Co-authored-by: Leo <me@leoa.lt>

* add test

---------

Co-authored-by: Leo <me@leoa.lt>
2023-08-07 23:40:39 +02:00
Georg Wiese
1283f61daf Use PolyID instead of PolynomialReference or usize (#460)
* Use PolyID instead of PolynomialReference or usize

* SortedWitnesses: Represent rows as map

* Refactor query stuff

* Bug fix

* Return name of right lifetimes

* Revert "Return name of right lifetimes"

This reverts commit f0f38ebde1.

* Clean up

* Generator: Use Vectors as rows

* Convenience methods

* Bug fix

* List of rows

* Refactor

* Rename

* Clean up witgen

* Undo changing loop detection frequency

* Extract ColumnMap

* Simplify loop detection

* Fix test

* Polish

* Simplify

* Use ColumnMap for global range constraints

* Format

* Remove poly_id_u64()

* Sorted Witness Machine: Use ColumnMap

* Undo changes in sorted witness machine

* Clippy

* Readd comment

* Review feedback
2023-08-07 19:16:43 +02:00
Leo
44916004c5 remove old lang docs and adjust README (#466) 2023-08-07 11:02:47 +02:00
Thibaut Schaeffer
2c9218404b Merge pull request #459 from powdr-labs/run-udeps
Run `cargo udeps` on CI
2023-08-04 22:27:43 +02:00
schaeff
0ac7f4632f run cargo udeps on CI 2023-08-04 22:12:43 +02:00
Georg Wiese
cfc103109f Merge pull request #458 from powdr-labs/global-constraints-u64
Simplify global range constraints
2023-08-02 22:14:24 +02:00
Georg Wiese
dac0278e83 Simplify global range constraints #458 2023-08-02 19:56:02 +00:00
Thibaut Schaeffer
eba1f7372c Merge pull request #383 from powdr-labs/call-to-static-machine
Calls from VM to block machine whose functions share the same interface
2023-08-01 15:33:01 +02:00
schaeff
497ea636ec vm to block machine calls 2023-08-01 11:42:24 +02:00
Thibaut Schaeffer
6a1db2ecb5 Merge pull request #450 from powdr-labs/infer-assignment-register-for-instruction
Infer the assignment register when assigning the output of an instruction
2023-08-01 10:59:27 +02:00
schaeff
f1db330bef address review comments 2023-08-01 00:04:26 +02:00
schaeff
e965d7f0eb infer the assignment register when assigning the output of an instruction 2023-07-31 23:59:21 +02:00
Georg Wiese
79f2077514 Merge pull request #408 from powdr-labs/poseidon3
Add Poseidon machine for BN254
2023-07-31 18:35:35 +02:00
Georg Wiese
5d78ca7b78 Add Poseidon machine for BN254 #408 2023-07-31 16:22:09 +00:00
Thibaut Schaeffer
439ffa8bf4 Merge pull request #421 from powdr-labs/powdr-book
Create the powdr book
2023-07-27 16:07:24 +02:00
schaeff
88dfdea0a5 create powdr book
Co-authored-by: Leo <me@leoa.lt>
2023-07-27 14:51:22 +02:00
Lucas Clemente Vella
dfcf3b4b83 Merge pull request #418 from powdr-labs/division-non-unique-witness
Fix falsely unique witness generation
2023-07-26 19:20:28 +01:00
Georg Wiese
c5669f0328 Fix non-unique overflowing division 2023-07-26 11:02:45 +00:00
Thibaut Schaeffer
88b9143f7b Merge pull request #419 from powdr-labs/badges
add badges to README
2023-07-25 19:25:52 +02:00
Thibaut Schaeffer
75590e1bb5 Merge pull request #393 from powdr-labs/block-machine-multiple-passes3
Block machine witness generation: allow for multiple passes per row
2023-07-25 19:20:25 +02:00
Leo Alt
ea6283e591 add badges to README 2023-07-25 17:44:06 +02:00
Georg Wiese
e1a8c8ca02 Block machine witness generation: allow for multiple passes per row #393 2023-07-25 13:51:57 +02:00
Thibaut Schaeffer
81aed930e2 Merge pull request #404 from powdr-labs/fix-block-witgen
Fix entry not found in block machine
2023-07-25 12:41:33 +02:00
Georg Wiese
64115133fe Block machine: exit early when input has been seen before 2023-07-25 10:20:52 +02:00
schaeff
3995dba166 fix entry not found in block machine 2023-07-25 10:20:52 +02:00
Guillaume Ballet
18fa7bd69d Add the capability of replacing rust functions with coprocessor lookups (#398)
* Replace calls to the poseidon_hash function with a coprocessor lookup

* update the poseidon hash dummy for tests to pass

Co-authored-by: Leo <me@leoa.lt>

* make the substituted coprocessor function FFI

* cargo fmt

* make coprocessor substitutions more generic

* remove the coprocessor stub body in powdr asm output

* remove leftover comment

* fix unnecessary nested loop in coprocessor collection

* use uglier, stable approach to `if let` guard

* fix clippy warnings

---------

Co-authored-by: Leo <me@leoa.lt>
2023-07-24 20:45:10 +02:00
Lucas Clemente Vella
2c5216cfca Running build and tests for all crates in CI. (#413) 2023-07-24 14:59:13 +02:00
Lucas Clemente Vella
9306361dc4 Enabling Halo2 via cargo feature. (#406)
* Enabling Halo2 via cargo feature.

* Enabling Halo2 by default.

* Renaming get_prover.
2023-07-21 17:57:40 +02:00
Lucas Clemente Vella
3c27a15fa1 Merge pull request #390 from powdr-labs/avoid_format
Use less formatting.
2023-07-20 14:49:54 +01:00
chriseth
ddd0349589 Rollback on incomplete lookup instead of on error. 2023-07-20 14:13:36 +02:00
chriseth
caf51184d9 Use less formatting. 2023-07-20 10:59:30 +02:00
Georg Wiese
4fdea44740 Fix CSV export #380 (#380) 2023-07-20 10:58:17 +02:00
Lucas Clemente Vella
6780ccb218 Merge pull request #405 from powdr-labs/fix_recompile_heuristic
Provide correct path for cargo rebuild heuristic
2023-07-19 13:21:50 +01:00
chriseth
7a81b82f5a Provide correct path for cargo rebuild heuristic 2023-07-19 11:14:02 +02:00
Georg Wiese
87637b9597 Merge pull request #402 from powdr-labs/star-operator-arbitrary-size
Star operator: expand to arbitrary size
2023-07-18 23:50:52 +02:00
Thibaut Schaeffer
3561d7e1ce support block machines with block size 1 (#403) 2023-07-18 20:12:11 +02:00
Georg Wiese
a4069db115 Star operator: expand to arbitrary size #402 2023-07-17 20:21:50 +02:00
Georg Wiese
1d00e8baf0 Merge pull request #401 from powdr-labs/fix-constants-in-identities
Fix using constants in identities
2023-07-17 20:15:43 +02:00
Georg Wiese
7b8c4fce21 Fix using constants in identities #401 2023-07-17 17:47:40 +00:00
Emily Herbert
709e2653e8 Merge pull request #375 from powdr-org/generalize-assembly-handling
Generalize assembly handling
2023-07-13 18:35:24 +02:00
Emily Herbert
effdda0feb Generalize assembly handling. 2023-07-13 11:32:29 +02:00
Georg Wiese
5d14f71e53 Add logging to witness generation code (#382)
* Add logging to witness generation code #382

* EvalError::FixedLookupFailed: Format query only on display
2023-07-13 10:39:59 +02:00
Lucas Clemente Vella
821cd557b1 divu instruction 2023-07-12 17:26:43 +02:00
chriseth
7751194971 Merge pull request #386 from powdr-org/fix-block-machines3
Block machine witness generation: Repeat first real block
2023-07-12 14:52:36 +02:00
Georg Wiese
d2a95ac1f4 Block machine witness generation: Repeat first real block #386 2023-07-12 12:41:53 +00:00