77 Commits

Author SHA1 Message Date
Dimitris Apostolou
371ddb5906 fix: fix typo (#60) 2024-02-26 16:03:01 +08:00
yanziseeker
b3b073f6ae fix:cirucit->circuit (#58) 2024-02-08 14:46:42 +08:00
Ming
946536fc01 upgrade dependency (#59)
* wip: upgrade dependency

* chores: clippy

* chores: trait bound using where clause

* chores: clippy

* cleanup trait bound

* remove halo2curve patch

* simplify trait bound
v2024_01_31
2024-02-01 15:57:25 +08:00
Chih Cheng Liang
c400ffcd62 Merge pull request #57 from privacy-scaling-explorations/update-readme
Add a user guide in the README
2023-12-12 18:21:31 +08:00
ChihChengLiang
ab8b79db4c highlight proof aggregation 2023-12-12 18:01:31 +08:00
Chih Cheng Liang
d2cf14357b Update README.md
Co-authored-by: Han <tinghan0110@gmail.com>
2023-12-12 17:48:42 +08:00
ChihChengLiang
c9cb89c09e GPT editing 2023-12-08 18:25:43 +08:00
ChihChengLiang
4333fbe1c9 first draft 2023-12-08 18:19:18 +08:00
Ivan Oleynikov
9feead7d4d Make KzgDecidingKey fields public (#56)
Fixes #55.

This commit enables users to re-use more of snark-verifier code when
implementing

  impl AccumulationDecider<_, MyLoader> for KzgAs<_, _>

in order to define their own Loader and make it work with KZG10.

The field `svk` was already exported through `impl
AsRef<KzgSuccinctVerifyingKey<M::G1Affine>>`, but this commit
additionally defines it as `pub` for consistency with `g2` and `s_g2`
fields.
2023-11-23 16:25:49 +08:00
Han
fedd7a8ffa ci: add build task to check it builds for wasm (#54) 2023-11-09 07:38:18 +08:00
Han
6691f02b7e fix: compute system_challenge_offset correctly (#53) 2023-11-08 22:31:30 +08:00
Haaai
37759af74f bump revm to 3.5.0 and disable default features (#52) 2023-11-08 22:31:16 +08:00
shuoer86
29dad32587 chore: fix typos (#51) 2023-11-03 16:14:23 +08:00
Jonathan Wang
bd61f8dc08 feat: make assembly block Solidity memory safe (#50) 2023-10-30 17:02:24 +08:00
Minhee Hong
37b99a3187 modify compile_solidity (#49)
* modify compile_yul

* modified format

* deleted unneccesary comments

* fix error
2023-09-28 17:41:42 +08:00
smtmfft
0e7ff92047 give AggregationCircuit a simple generic trait type (#43) 2023-09-21 22:05:30 +08:00
Jonathan Wang
a440ff913a feat: change yul code into Solidity assembly (#47)
* feat: change yul code into Solidity assembly

Just changes to wrapping yul in solidity assembly block

* chore: loosen pragma

* chore: remove example sol file
2023-09-14 15:58:55 +08:00
Han
810ba0d3c3 ci: install svm-rs with its Cargo.lock (#48) 2023-09-13 15:45:47 +08:00
soham
27f8b205d6 Derive num_instance from instances in CircuitExt (#44) 2023-07-01 18:01:25 +08:00
qy3u
461bc247bd fix typo (#46) 2023-06-30 10:58:06 +08:00
enrico.eth
5ea36197d7 fix: modify evm_verify function signature (#42) 2023-06-11 22:32:52 +08:00
Han
cc1f677949 feat: upgrade revm to support lastest hardfork (#40) 2023-06-02 14:41:37 +08:00
Jonathan Wang
7e5254cafa feat: add snark-verifier-sdk (#38)
* feat: add snark-verifier-sdk

* chore: remove config and add example dir

* feat: add "derive_serde" feature to `snark-verifier`

This way `Snark` can be derive `Serialize`d

* fix: remove leftover artifacts

* feat: add back feature `halo2_circuit_params` and fix clippy

* fix: consider  for all targets

---------

Co-authored-by: Jonathan Wang <jonathanpwang@users.noreply.github.com>
Co-authored-by: Han <tinghan0110@gmail.com>
2023-06-01 14:08:41 +08:00
Han
5a7693bf1a Pin svm-rs to 0.2.22 for CI (#39)
* ci: pin `svm-rs` to `0.2.22`

* feat: bump MSRV to `1.64.0`
2023-05-30 16:18:16 +08:00
Han
e5d5e4a6cc Upgrade halo2curves and halo2_proofs (#35)
* feat: upgrade `halo2curves` to `0.3.2` and `halo2_proofs` to `v2023_04_20`

* feat: support `circuit-params` feature flag
v2023_04_20
2023-04-26 21:52:42 +08:00
Han
54452c71a5 fix: stick to num_chunk of quotient poly calculated by constraint system (#29) 2023-02-22 19:26:44 +08:00
Han
f1265f503f fix: enable util::hash::poseidon only when feature = loader_halo2 (#27) 2023-02-14 21:15:36 +08:00
Han
df03d898b8 chore: update halo2 and halo2wrong version (#25) v2023_02_02 2023-02-03 15:30:34 +08:00
dante
2d5ef6b4cb chore: update dependencies (#24) 2023-02-01 12:39:14 +08:00
Carlos Pérez
e4e0a4de66 Merge pull request #22 from han0110/feature/docs
Add simple documents
2023-01-20 07:18:05 +01:00
han0110
8cc0b1503b fix: rustdoc warnings 2023-01-20 12:28:05 +08:00
han0110
50232938fb feat: expand more things and fix typos
Co-authored-by: Chih Cheng Liang <chihchengliang@gmail.com>
Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
2023-01-20 12:19:31 +08:00
han0110
3f3da272f4 refactor: remove redudant check validate_ec_point (still doesn not support identity) 2023-01-06 15:36:39 +08:00
han0110
6a518c94ce docs: add #![deny(missing_docs)] and simple documents 2023-01-06 14:35:47 +08:00
Han
dda742375c Restructure for more kind of verifier (#21)
* feat: restructure to monorepo and expand the project scope to be generic (s)nark verifier

* feat: reorganize mods and traits for further new features

* refactor: simplify trait bounds

* chore: use hyphen case for crate name (`snark_verifier` -> `snark-verifier`)
v2022_12_23
2022-12-23 15:31:23 +08:00
Han
50d69c18f6 fix: looser trait bound on impl CostEstimation for Plonk (#20) 2022-12-17 12:44:08 +08:00
Han
5e5de91c5d fix: pin all revm dependencies (#18) 2022-11-30 18:18:44 +08:00
DoHoon Kim
c5645e705e Update EvmLoader to generate Yul code instead of bytecode (#15)
* Update `EvmLoader` to generate Yul instead of bytecode

* feat: simplify

* feat: Add missing end_gas_metering impl

Co-authored-by: Han <tinghan0110@gmail.com>

Co-authored-by: Han <tinghan0110@gmail.com>
2022-11-17 23:50:24 +08:00
Han
ba167b73ca ci: add svm-rs and install solc@0.8.17 in job test (#16) 2022-11-14 16:21:11 +08:00
Han
5c31088f85 feat: implement ipa pcs and accumulation (#14) 2022-11-09 11:58:00 +08:00
Han
25dbaf524e General refactor for further integration (#13)
* feat: remove dev-dependency `foundry` and vendor necessary part of it

* refactor: simplify traits and remove unused stuff

* refactor: much less clone

* feat: generalized `AccumulatorEncoding` for `EccInstructions`
2022-11-09 02:21:24 +08:00
Han
2cd8b9d1e5 Generalized Halo2Loader (#12)
* feat: generalize `Protocol` for further usage

* feat: add `EccInstruction::{fixed_base_msm,variable_base_msm,sum_with_const}`

* chore: move `rand_chacha` as dev dependency
2022-10-28 22:26:06 +08:00
Han
916b29fe89 Rollback to pse halo2 and halo2wrong for first release (#5)
* feat: move `Accumulator` to `accumulator.rs`

* feat: update due to halo2

* feat: upgrade to use branch `feature/generic-instructions` of `halo2wrong`

* refactor: rollback to `{halo2,halo2_wrong}` without challenge API and cleanup dependencies

* chore: rename statement to instance and auxliary to witness

* chore: use `finalize` instead of `code`

* feat: add `Code::deployment` and `EvmLoader::deployment_code`; add example `evm-verifier-codegen`

* fix: typo

* feat: reduce generated evm verifier size; rename to `evm-verifier` and add another example `evm-verifier-with-accumulator`

* fix: due to `halo2wrong`

* feat: reorganize mods and traits

* fix: allow empty `values` in `sum_*` and move them under `ScalarLoader`

* ci: use `--all-features` for `cargo test`

* fix: use same strategy for aggregation testing

* fix: simplify trait `PlonkVerifier` again

* fix: move system specified transcript under mod `system`

* feat: add `quotient_poly` info in `Protocol`

* feat: implement linearization for circom integration

* feat: re-export loader's dependency for consumer

* refactor: for circom's integration

* tmp: pin `revm` to rev

* fix: remove parentheses

* fix: upgrade for multi-phase halo2

* feat: improve error reporting

* chore: rename crate to snake case

* feat: add `Domain` as an input of `PolynomialCommitmentScheme::read_proof`

* refactor: for further integration

* feat: generalize to suppoer also ipa and add builder fns to `system::halo2::Config`

* feat: add `KzgDecider` for simple evm verifier

* refactor: split `AccumulationScheme` and `AccumulatorEncoding`

* refactor: split `PolynomialCommitmentScheme` and `MultiOpenScheme`

* fix: not need sealed actually

* fix: `chunk_size` should be `LIMBS` when recovering accumulator

* feat: add `Expression::DistributePowers` to avoid stack overflow

* fix: update and pin foundry

* fix: move testing circuits under `system/halo2`

* fix: allow accumulate single accumulator

* feat: remove all patch and make less depending `halo2wrong`
v2022_10_22
2022-10-24 18:39:01 +08:00
Han
a11b9c1748 fix: upgrade adn pin foundry_evm version and upgrade halo2_curve to 0.2.1 (#4) 2022-08-19 01:18:38 +08:00
han0110
5c19b64657 refactor: use Itertools methods 2022-07-23 17:12:10 +08:00
han0110
6358c0ce0c feat: add main_gate_with_plookup_with_mock_kzg_accumulator and CostEstimation 2022-07-23 17:12:10 +08:00
han0110
d2315546e5 feat: adopt evaluate_committed to simplify Shuffle and Plookup 2022-07-19 01:18:44 +08:00
han0110
e32fd3faed feat: update for multi-phase ConstraintSystem and implement shuffle and plookup with extra challenges 2022-07-18 01:50:27 +08:00
han0110
64f358fb0e fix: correct testing naming convention 2022-07-10 23:08:48 +08:00
han0110
6bf26cc973 fix: update to insert_account_info 2022-07-10 15:24:11 +08:00