From d80d4f790e8a48a6ad905c8e5af0ea2c2d2d9633 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:02:21 -0500 Subject: [PATCH] Release 0.4.0 for crates.io (#226) * chore: turn off `halo2-pse` for crates.io publish * chore: add package descriptions * chore: update gitignore * chore: add halo2-base version to halo2-ecc * chore: update readme location * chore: add crates.io versions * chore: add readme --- .gitignore | 7 +++++-- halo2-base/Cargo.toml | 12 +++++++++--- halo2-ecc/Cargo.toml | 12 +++++++++--- hashes/zkevm/Cargo.toml | 16 ++++++++++------ hashes/zkevm/README.md | 5 +++++ 5 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 hashes/zkevm/README.md diff --git a/.gitignore b/.gitignore index eb915932..17afea38 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,8 @@ Cargo.lock *.png -/halo2_ecc/src/bn254/data/ -/halo2_ecc/src/secp256k1/data/ +**/params/* +**/params/ +**/proptest-regressions/ +**/results/ +**/*.DS_Store diff --git a/halo2-base/Cargo.toml b/halo2-base/Cargo.toml index 6816bf95..0db030d0 100644 --- a/halo2-base/Cargo.toml +++ b/halo2-base/Cargo.toml @@ -1,7 +1,13 @@ [package] name = "halo2-base" version = "0.4.0" +authors = ["Intrinsic Technologies"] +license = "MIT" edition = "2021" +repository = "https://github.com/axiom-crypto/halo2-lib" +readme = "README.md" +description = "Embedded domain specific language (eDSL) for writing circuits with the [`halo2`](https://github.com/axiom-crypto/halo2) API. It simplifies circuit programming to declaring constraints over a single advice and selector column and provides built-in circuit tuning and support for multi-threaded witness generation." +rust-version = "1.73.0" [dependencies] itertools = "0.11" @@ -20,7 +26,7 @@ ark-std = { version = "0.3.0", features = ["print-trace"], optional = true } # Use Axiom's custom halo2 monorepo for faster proving when feature = "halo2-axiom" is on halo2_proofs_axiom = { version = "0.3", package = "halo2-axiom", optional = true } # Use PSE halo2 and halo2curves for compatibility when feature = "halo2-pse" is on -halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", rev = "7a21656", optional = true } +# halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", rev = "7a21656", optional = true } # This is Scroll's audited poseidon circuit. We only use it for the Native Poseidon spec. We do not use the halo2 circuit at all (and it wouldn't even work because the halo2_proofs tag is not compatbile). # We forked it to upgrade to ff v0.13 and removed the circuit module @@ -53,8 +59,8 @@ mimalloc = { version = "0.1", default-features = false, optional = true } [features] default = ["halo2-axiom", "display", "test-utils"] asm = ["halo2_proofs_axiom?/asm"] -dev-graph = ["halo2_proofs/dev-graph", "plotters"] # only works with halo2-pse for now -halo2-pse = ["halo2_proofs/circuit-params"] +#dev-graph = ["halo2_proofs/dev-graph", "plotters"] # only works with halo2-pse for now +#halo2-pse = ["halo2_proofs/circuit-params"] halo2-axiom = ["halo2_proofs_axiom"] display = [] profile = ["halo2_proofs_axiom?/profile"] diff --git a/halo2-ecc/Cargo.toml b/halo2-ecc/Cargo.toml index 2caa7e96..6ebec2aa 100644 --- a/halo2-ecc/Cargo.toml +++ b/halo2-ecc/Cargo.toml @@ -1,7 +1,13 @@ [package] name = "halo2-ecc" version = "0.4.0" +authors = ["Intrinsic Technologies"] +license = "MIT" edition = "2021" +repository = "https://github.com/axiom-crypto/halo2-lib" +readme = "../README.md" +description = "In-circuit elliptic curve library for halo2." +rust-version = "1.73.0" [dependencies] itertools = "0.10" @@ -16,7 +22,7 @@ serde_json = "1.0" rayon = "1.6.1" test-case = "3.1.0" -halo2-base = { path = "../halo2-base", default-features = false } +halo2-base = { version = "=0.4.0", path = "../halo2-base", default-features = false } # plotting circuit layout plotters = { version = "0.3.0", optional = true } @@ -32,10 +38,10 @@ env_logger = "0.10.0" [features] default = ["jemallocator", "halo2-axiom", "display"] -dev-graph = ["halo2-base/dev-graph", "plotters"] +#dev-graph = ["halo2-base/dev-graph", "plotters"] display = ["halo2-base/display"] asm = ["halo2-base/asm"] -halo2-pse = ["halo2-base/halo2-pse"] +#halo2-pse = ["halo2-base/halo2-pse"] halo2-axiom = ["halo2-base/halo2-axiom"] jemallocator = ["halo2-base/jemallocator"] mimalloc = ["halo2-base/mimalloc"] diff --git a/hashes/zkevm/Cargo.toml b/hashes/zkevm/Cargo.toml index 2c491782..a9b85088 100644 --- a/hashes/zkevm/Cargo.toml +++ b/hashes/zkevm/Cargo.toml @@ -1,8 +1,13 @@ [package] name = "zkevm-hashes" version = "0.1.4" +authors = ["Privacy Scaling Explorations Team", "Taiko Labs", "Intrinsic Technologies"] +license = "MIT" edition = "2021" -license = "MIT OR Apache-2.0" +repository = "https://github.com/axiom-crypto/halo2-lib" +readme = "README.md" +description = "Library of ZK gadgets for hash functions in halo2. This is Axiom's modification of the circuits in the zkEVM project." +rust-version = "1.73.0" [dependencies] array-init = "2.0.0" @@ -12,13 +17,12 @@ itertools = "0.11" lazy_static = "1.4" log = "0.4" num-bigint = { version = "0.4" } -halo2-base = { path = "../../halo2-base", default-features = false, features = [ - "test-utils", -] } +halo2-base = { version = "=0.4.0", path = "../../halo2-base", default-features = false, features = ["test-utils"] } rayon = "1.7" sha3 = "0.10.8" # always included but without features to use Native poseidon -snark-verifier = { git = "https://github.com/axiom-crypto/snark-verifier.git", branch = "release-0.1.6-rc0", default-features = false } +snark-verifier = { version = "=0.1.6", default-features = false } +# snark-verifier = { git = "https://github.com/axiom-crypto/snark-verifier.git", branch = "release-0.1.6-rc0", default-features = false } getset = "0.1.2" [dev-dependencies] @@ -34,7 +38,7 @@ test-case = "3.1.0" [features] default = ["halo2-axiom", "display"] display = ["halo2-base/display", "snark-verifier/display"] -halo2-pse = ["halo2-base/halo2-pse", "snark-verifier/halo2-pse"] +#halo2-pse = ["halo2-base/halo2-pse", "snark-verifier/halo2-pse"] halo2-axiom = ["halo2-base/halo2-axiom", "snark-verifier/halo2-axiom"] jemallocator = ["halo2-base/jemallocator"] mimalloc = ["halo2-base/mimalloc"] diff --git a/hashes/zkevm/README.md b/hashes/zkevm/README.md new file mode 100644 index 00000000..3bf2b6c0 --- /dev/null +++ b/hashes/zkevm/README.md @@ -0,0 +1,5 @@ +# zkEVM Hashes + +## Keccak + +See [readme](./src/keccak/README.md).