Skip to content

Commit

Permalink
chore: re-enable github for halo2-pse (#248)
Browse files Browse the repository at this point in the history
chore: fix imports for halo2-pse
  • Loading branch information
jonathanpwang authored Jan 19, 2024
1 parent 4dc5c48 commit 633e727
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions halo2-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,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.4", 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", tag = "v0.3.0", 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
Expand Down Expand Up @@ -59,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"]
Expand Down
12 changes: 5 additions & 7 deletions halo2-base/src/utils/halo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ use std::collections::hash_map::Entry;
use crate::ff::Field;
use crate::halo2_proofs::{
circuit::{AssignedCell, Cell, Region, Value},
halo2curves::bn256::Bn256,
plonk::{Advice, Assigned, Circuit, Column, Fixed},
poly::kzg::commitment::ParamsKZG,
};
use crate::virtual_region::copy_constraints::{CopyConstraintManager, EXTERNAL_CELL_TYPE_ID};
use crate::AssignedValue;

pub use keygen::ProvingKeyGenerator;

/// Raw (physical) assigned cell in Plonkish arithmetization.
#[cfg(feature = "halo2-axiom")]
pub type Halo2AssignedCell<'v, F> = AssignedCell<&'v Assigned<F>, F>;
Expand Down Expand Up @@ -136,17 +140,11 @@ pub trait KeygenCircuitIntent<F: Field> {
) -> Self::Pinning;
}

use halo2_proofs_axiom::halo2curves::bn256::Bn256;
use halo2_proofs_axiom::poly::kzg::commitment::ParamsKZG;
pub use keygen::ProvingKeyGenerator;

mod keygen {
use halo2_proofs_axiom::poly::commitment::Params;

use crate::halo2_proofs::{
halo2curves::bn256::{Bn256, Fr, G1Affine},
plonk::{self, ProvingKey},
poly::kzg::commitment::ParamsKZG,
poly::{commitment::Params, kzg::commitment::ParamsKZG},
};

use super::KeygenCircuitIntent;
Expand Down
4 changes: 2 additions & 2 deletions halo2-ecc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,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"]
Expand Down
6 changes: 3 additions & 3 deletions hashes/zkevm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ serde = { version = "1.0", features = ["derive"] }
rayon = "1.8"
sha3 = "0.10.8"
# always included but without features to use Native poseidon and get CircuitExt trait
snark-verifier-sdk = { version = "=0.1.7", default-features = false }
# snark-verifier-sdk = { git = "https://github.com/axiom-crypto/snark-verifier.git", branch = "main", default-features = false }
# snark-verifier-sdk = { version = "=0.1.7", default-features = false }
snark-verifier-sdk = { git = "https://github.com/axiom-crypto/snark-verifier.git", branch = "main", default-features = false }
getset = "0.1.2"
type-map = "0.5.0"

Expand All @@ -41,7 +41,7 @@ sha2 = "0.10.7"
[features]
default = ["halo2-axiom", "display"]
display = ["snark-verifier-sdk/display"]
# halo2-pse = ["halo2-base/halo2-pse", "snark-verifier-sdk/halo2-pse"]
halo2-pse = ["halo2-base/halo2-pse", "snark-verifier-sdk/halo2-pse"]
halo2-axiom = ["halo2-base/halo2-axiom", "snark-verifier-sdk/halo2-axiom"]
jemallocator = ["halo2-base/jemallocator"]
mimalloc = ["halo2-base/mimalloc"]
Expand Down

0 comments on commit 633e727

Please sign in to comment.