Go to file
Eduard S e1f6e41757
Remove dependency to common ConstraintSystem in the backend (#290)
* refactor: generalize ExpressionMid

* refactor: move ConstraintSystem::from(ConstraintSystemV2Backend) to backend

* refactor: generalize Expression type

* feat: define ExpressionMid as an alias

* refactor: rename ConstraintSystemV2Back to ConstraintSystemMid, GateV2Back to GateMid

* refactor: use ConstraintSystemBack in halo2_backend

* fix: warnings

* refactor: simplify Query type

* feat(backend): rewrite pk/vk serialization

- Rewrite VerifyingKey and ProvingKey methods in terms of the
  ConstraintSystemBack so that the backend becomes independent of the
  Circuit trait (which belongs to the frontend)
- Add `vk_read` and `pk_read` legacy functions in halo2_proofs for
  compatiblity.
- Split the implementation of converting selectors to fixed columns into
  two parts:
  - One part just converts the ConstraintSystem, transforming the
    selectors into fixed columns (compressed and direct versions)
  - The other part transforms the assignments of selector columns into
    assignments of fixed columns based on the mappings calculated in
    part one.

* feat: remove feature circuit-params from halo2_backend

* wip: clean up common+backend

* wip: clean up frontend

* wip: clean common plonk folder

* refactor: move Error to frontend

* refactor: move Error to backend

* refactor: clean up error types

* fix: use errors instead of temporary panics

* feat: annotate columns in test

* fix: remove unnecessary pub, set correct SelectorsToFixed.compressed value, add safety check

In selectors_to_fixed_compressed and selectors_to_fixed_direct add
safety check via the ConstraintSystem.selectors_to_fixed status field
such that the methods can only be called once.  Calling them multiple
times would lead to an invalid ConstraintSystem with unused duplicated
fixed columns.

* fix: ponk_api unit tests

* fix: clippy warnings, common dependencies

* fix: remove old TODO

* chore: bump VK version

* chore: remove unnecessary code

* chore: remove virtual variable rules in middleware Expression

* chore: remove unused evaluate_lazy, deprecate directly_convert_selectors_to_fixed
2024-03-18 11:39:06 +01:00
.github update `halo2curves` to v0.6.0 2024-01-10 18:27:47 +03:00
book chore: correcting few mistakes in documentation (#240) 2023-12-20 10:01:39 +01:00
halo2 bump version to 0.3.0 2024-01-10 18:27:47 +03:00
halo2_backend Remove dependency to common ConstraintSystem in the backend (#290) 2024-03-18 11:39:06 +01:00
halo2_common Remove dependency to common ConstraintSystem in the backend (#290) 2024-03-18 11:39:06 +01:00
halo2_frontend Remove dependency to common ConstraintSystem in the backend (#290) 2024-03-18 11:39:06 +01:00
halo2_middleware Remove dependency to common ConstraintSystem in the backend (#290) 2024-03-18 11:39:06 +01:00
halo2_proofs Remove dependency to common ConstraintSystem in the backend (#290) 2024-03-18 11:39:06 +01:00
.gitignore remove .DS_Store 2022-05-13 09:18:59 -04:00
COPYING.md Relicense Halo 2 crates as MIT OR Apache 2.0 2022-04-07 14:22:49 +00:00
Cargo.toml Remove dependency to common ConstraintSystem in the backend (#290) 2024-03-18 11:39:06 +01:00
LICENSE-APACHE Relicense Halo 2 crates as MIT OR Apache 2.0 2022-04-07 14:22:49 +00:00
LICENSE-MIT Add an umbrella copyright line to cover future contributors 2022-04-07 14:51:05 +00:00
README.md update `halo2curves` to v0.6.0 2024-01-10 18:27:47 +03:00
rust-toolchain refactor: move the `halo2_common::arithmetic` to `halo2_backend`(post fe-be split) (#281) 2024-02-22 09:42:07 +01:00

README.md

halo2 Crates.io

Documentation

For experimental features privacy-scaling-explorations/halo2 fork adds, please refer to experimental-features.md.

Minimum Supported Rust Version

Requires Rust 1.65.0 or higher.

Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump.

Controlling parallelism

halo2 currently uses rayon for parallel computation. The RAYON_NUM_THREADS environment variable can be used to set the number of threads.

When compiling to WASM-targets, notice that since version 1.7, rayon will fallback automatically (with no need to handle features) to require getrandom in order to be able to work. For more info related to WASM-compilation.

See: Rayon: Usage with WebAssembly for more

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.