49 Commits

Author SHA1 Message Date
Balazs Komuves
b233c55be6
add prover options to export the witness (+ gates + selectors) for third party visualization 2024-12-05 12:36:53 +01:00
Robin Salen
9fdf1b8ef4
Add connect_array convenience method in CircuitBuilder (#1620)
* Add connect_array method

* Pacify clippy

* Wording
2024-08-27 20:56:19 +00:00
Robin Salen
c94dc6f858
Version bump pre-release (#1536)
* Bump versions

* Bump hashbrown and ahash accordingly

* Update changelog
2024-02-20 14:50:43 -05:00
Robin Salen
6c9588aaea
Update licenses and dependencies (#1534) 2024-02-19 07:35:51 -05:00
Robin Salen
3e579b6d43
Remove plonky2_evm post-migration to zk_evm monorepo (#1530) 2024-02-17 11:04:07 -05:00
BGluth
5936c67f59 Now refers to sub-crates using paths (and removed patch section)
- Previously refered to specific `crates.io` versions.
- Motivation for this is to allow external projects to be able use
  specific revisions of this repo. Without this, a `[patch]` section
  is almost always required in the external project in order to force
  the internal plonky2 sub-crates to the same version, an approach which
  comes with its own issues.
2023-09-07 16:36:38 -06:00
BGluth
18ca89f093 Patched plonky2 to use a patch for eth_trie_utils 2023-08-21 16:44:22 -06:00
Matthias Goergens
6c2f76d529 Fix resolver warning
When running eg `cargo check` or `cargo build` you got greeted with the
following warning:

```
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
```

This PR fixes this.
2023-07-13 12:21:40 +08:00
Daniel Lubarov
eb7468e7e8 Incremental release builds
Since it's a library, in practice release builds are used for slower tests, not for a binary that needs to be reproducible.
2023-04-15 10:45:40 -07:00
Robin Salen
f1a99e69b2
Add patch section to workspace config file 2023-03-31 18:55:06 -04:00
Nicholas Ward
77fb333abf Move ecdsa to its own repo 2023-03-03 16:12:40 -08:00
Nicholas Ward
18733f1185 Move u32 to its own repo 2023-03-03 16:11:05 -08:00
Nicholas Ward
bf8780b27b Move insertion to its own repo 2023-03-03 15:39:56 -08:00
Nicholas Ward
b95bc90bb7 moved waksman to outside repo 2023-03-03 13:56:06 -08:00
Daniel Lubarov
bfaa80a38c Move system-zero to its own repo
See https://github.com/mir-protocol/system-zero
2023-02-25 16:19:00 -08:00
Brandon H. Gomes
38e467f1c0
chore: fix serde-cbor and run cargo-sort
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-03 11:41:12 -07:00
Sebastien La Duca
a281e28d54 add rayon shim 2022-07-21 16:59:20 -04:00
Daniel Lubarov
c54896dcb8
Rename starky2 -> evm (#547) 2022-05-18 10:32:14 -07:00
wborgeaud
9096b758f4 Start of multi-table STARKs 2022-05-04 20:57:07 +02:00
wborgeaud
d484b6237a plonky2_u32 -> u32 2022-04-07 08:44:54 +02:00
wborgeaud
b58d5d6747 Move u32 stuff to plonky2_u32 crate 2022-04-06 08:50:45 +02:00
wborgeaud
2e5c2e8984 Add ecdsa module 2022-03-15 16:55:08 +01:00
Daniel Lubarov
c0ac79e2e1
Beginning of STARK implementation (#413)
* Beginning of STARK implementation

* PR feedback

* minor

* Suppress warnings for now
2022-01-26 00:09:29 -08:00
Hamish Ivey-Law
fcdcc86569
Move profile defns to root workspace toml. (#437) 2022-01-18 11:41:08 +11:00
Daniel Lubarov
c126641c5d
Split into crates (#406)
* Split into crates

I kept other changes to a minimum, so 95% of this is just moving things. One complication that came up is that since `PrimeField` is now outside the plonky2 crate, these two impls now conflict:
```
impl<F: PrimeField> From<HashOut<F>> for Vec<u8> { ... }
impl<F: PrimeField> From<HashOut<F>> for Vec<F> { ... }
```
with this note:
```
note: upstream crates may add a new impl of trait `plonky2_field::field_types::PrimeField` for type `u8` in future versions
```
I worked around this by adding a `GenericHashOut` trait with methods like `to_bytes()` instead of overloading `From`/`Into`. Personally I prefer the explicitness anyway.

* Move out permutation network stuff also

* Fix imports

* Fix import

* Also move out insertion

* Comment

* fmt

* PR feedback
2021-12-28 11:51:13 -08:00
wborgeaud
bdbc8b6931 Merge branch 'main' into generic_configuration
# Conflicts:
#	src/field/extension_field/mod.rs
#	src/fri/recursive_verifier.rs
#	src/gadgets/arithmetic.rs
#	src/gadgets/arithmetic_extension.rs
#	src/gadgets/hash.rs
#	src/gadgets/interpolation.rs
#	src/gadgets/random_access.rs
#	src/gadgets/sorting.rs
#	src/gates/arithmetic_u32.rs
#	src/gates/gate_tree.rs
#	src/gates/interpolation.rs
#	src/gates/poseidon.rs
#	src/gates/poseidon_mds.rs
#	src/gates/random_access.rs
#	src/hash/hashing.rs
#	src/hash/merkle_proofs.rs
#	src/hash/poseidon.rs
#	src/iop/challenger.rs
#	src/iop/generator.rs
#	src/iop/witness.rs
#	src/plonk/circuit_data.rs
#	src/plonk/proof.rs
#	src/plonk/prover.rs
#	src/plonk/recursive_verifier.rs
#	src/util/partial_products.rs
#	src/util/reducing.rs
2021-12-16 14:54:38 +01:00
Daniel Lubarov
9b55ff9e81
edition = 2021 (#370)
* edition = 2021

Doesn't affect anything for us as far as I've noticed.

* imports
2021-11-17 14:43:54 -08:00
Jakub Nabaglo
9711127599
Use Jemalloc (#347) 2021-11-09 15:14:41 -08:00
wborgeaud
fb18232efd Generic config 2021-11-05 10:56:23 +01:00
Jakub Nabaglo
8a5419d461
Static asserts in x86 Poseidon (#325)
* Static asserts in x86 Poseidon

* Minor style
2021-10-30 13:10:59 -07:00
Daniel Lubarov
cd13a3be65 Update bimap 2021-10-19 19:35:10 -07:00
Daniel Lubarov
dc600d5abf
Hash benchmarks (#295) 2021-10-09 14:07:49 -07:00
Nicholas Ward
695a56c4ca addressed comments 2021-10-06 11:34:50 -07:00
Nicholas Ward
d1fea5cfd3 witnessgenerator 2021-09-03 18:07:51 -07:00
Nicholas Ward
013c8bb612 progress 2021-09-03 18:07:20 -07:00
Daniel Lubarov
d41924dad3
Benchmark transpose (#190)
* Benchmark transpose

* fmt
2021-08-18 09:43:19 -07:00
Daniel Lubarov
c31c06d227
FFT/LDE benches (#188)
And expose FftStrategy so we can bench both
2021-08-18 08:36:40 -07:00
Daniel Lubarov
b89f4d656d
Update various dependencies (#163) 2021-08-09 10:11:42 -07:00
Daniel Lubarov
cc6c365176
A couple field benchmarks (#161) 2021-08-08 09:14:50 -07:00
Daniel Lubarov
573badc96f
Parallel proof-of-work search (#92) 2021-07-15 07:40:41 -07:00
Daniel Lubarov
77ce69dc15
Proof serialization (#93)
Using `serde_cbor` for now. It's probably far from optimal, as we have many `Vec`s which I assume it will prefix with their lengths, but it's a nice and easy method for now.
2021-07-15 07:35:12 -07:00
Daniel Lubarov
7334341cfa Attempt at simplification 2021-06-01 23:27:09 -07:00
wborgeaud
4d31f5e37b Fixes from PR comments 2021-04-22 09:27:59 +02:00
wborgeaud
7ff4150679 Merge with merkle_proofs_2 2021-04-12 10:38:07 +02:00
Daniel Lubarov
5fe8d633b6 Split main into multiple binaries
... and other minor refactoring.

`bench_recursion` will be the default bin run by `cargo run`; the otheres can be selected with the `--bin` flag.

We could probably delete some of the other binaries later. E.g. `field_search` might not be useful any more. `bench_fft` should maybe be converted to a benchmark (although there are some pros and cons, e.g. the bench framework has a minimum number of runs, and isn't helpful in testing multi-core performance).
2021-04-06 13:23:47 -07:00
Daniel Lubarov
347206d161 Add Z terms in vanishing poly 2021-03-30 23:12:47 -07:00
Daniel Lubarov
ba96ab4e99 More prover work 2021-03-26 23:51:48 -07:00
Daniel Lubarov
9fdff8ea08 Gate infra 2021-02-26 13:18:41 -08:00
Daniel Lubarov
13cc76316c Initial commit 2021-02-17 14:36:32 -08:00