Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 45cf848

Browse files
committed
compiles
1 parent bae6f57 commit 45cf848

File tree

18 files changed

+25
-11
lines changed

18 files changed

+25
-11
lines changed

zkevm-circuits/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ eth-types = { path = "../eth-types" }
1717
gadgets = { path = "../gadgets" }
1818
ethers-core.workspace = true
1919
ethers-signers = { workspace = true, optional = true }
20+
halo2-base.workspace = true
21+
halo2-ecc.workspace = true
2022
mock = { path = "../mock", optional = true }
2123
strum.workspace = true
2224
strum_macros.workspace = true
@@ -32,10 +34,7 @@ serde.workspace = true
3234
serde_json.workspace = true
3335

3436
hash-circuit.workspace = true
35-
misc-precompiled-circuit = { package = "misc-precompiled-circuit", git = "https://github.com/scroll-tech/misc-precompiled-circuit.git", branch = "sync-halo2-lib-0.4.0" }
36-
37-
halo2-base = { git = "https://github.com/scroll-tech/halo2-lib", branch = "sync-halo2-lib-0.4.0", default-features=false, features=["halo2-pse","display"] }
38-
halo2-ecc = { git = "https://github.com/scroll-tech/halo2-lib", branch = "sync-halo2-lib-0.4.0", default-features=false, features=["halo2-pse","display"] }
37+
misc-precompiled-circuit = { package = "misc-precompiled-circuit", git = "https://github.com/scroll-tech/misc-precompiled-circuit.git", branch = "sync-ff-0.13" }
3938

4039
# maingate = { git = "https://github.com/privacy-scaling-explorations/halo2wrong", tag = "v2023_02_02" }
4140

zkevm-circuits/src/bytecode_circuit/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub type CircuitConfig<F> = super::circuit::BytecodeCircuitConfig<F>;
2828
impl<F: Field> Circuit<F> for BytecodeCircuit<F> {
2929
type Config = (CircuitConfig<F>, Challenges);
3030
type FloorPlanner = SimpleFloorPlanner;
31+
#[cfg(feature = "circuit-params")]
3132
type Params = ();
3233

3334
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/copy_circuit/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use halo2_proofs::{
1414
impl<F: Field> Circuit<F> for CopyCircuit<F> {
1515
type Config = (CopyCircuitConfig<F>, Challenges<Challenge>);
1616
type FloorPlanner = SimpleFloorPlanner;
17+
#[cfg(feature = "circuit-params")]
1718
type Params = ();
1819

1920
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/evm_circuit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ use crate::util::MockChallenges as Challenges;
445445
impl<F: Field> Circuit<F> for EvmCircuit<F> {
446446
type Config = (EvmCircuitConfig<F>, Challenges);
447447
type FloorPlanner = SimpleFloorPlanner;
448+
#[cfg(feature = "circuit-params")]
448449
type Params = ();
449450

450451
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ impl<G> UnitTestMathGadgetBaseCircuit<G> {
102102
impl<F: Field, G: MathGadgetContainer<F>> Circuit<F> for UnitTestMathGadgetBaseCircuit<G> {
103103
type Config = (UnitTestMathGadgetBaseCircuitConfig<F, G>, Challenges);
104104
type FloorPlanner = SimpleFloorPlanner;
105+
#[cfg(feature = "circuit-params")]
105106
type Params = ();
106107

107108
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/exp_circuit/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use halo2_proofs::{
1414
impl<F: Field> Circuit<F> for ExpCircuit<F> {
1515
type Config = (ExpCircuitConfig<F>, Challenges);
1616
type FloorPlanner = SimpleFloorPlanner;
17+
#[cfg(feature = "circuit-params")]
1718
type Params = ();
1819

1920
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/keccak_circuit/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use halo2_proofs::{
1414
impl<F: Field> Circuit<F> for KeccakCircuit<F> {
1515
type Config = (KeccakCircuitConfig<F>, Challenges);
1616
type FloorPlanner = SimpleFloorPlanner;
17+
#[cfg(feature = "circuit-params")]
1718
type Params = ();
1819

1920
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/keccak_circuit/table.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ mod tests {
258258
impl Circuit<F> for TableTestCircuit {
259259
type Config = [TableColumn; 2];
260260
type FloorPlanner = SimpleFloorPlanner;
261+
#[cfg(feature = "circuit-params")]
261262
type Params = ();
262263

263264
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ compile_error!("This program requires a 64-bit target architecture.");
2626

2727
pub mod bytecode_circuit;
2828
pub mod copy_circuit;
29-
// pub mod ecc_circuit;
29+
pub mod ecc_circuit;
3030
pub mod evm_circuit;
3131
pub mod exp_circuit;
3232
pub mod keccak_circuit;
3333
pub mod mpt_circuit;
3434
pub mod pi_circuit;
3535
pub mod poseidon_circuit;
3636
pub mod rlp_circuit_fsm;
37-
// pub mod sig_circuit;
37+
pub mod sig_circuit;
3838
// we don't use this for aggregation
3939
//pub mod root_circuit;
4040
pub mod modexp_circuit;

zkevm-circuits/src/modexp_circuit/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use halo2_proofs::{
99
impl Circuit<Fr> for ModExpCircuit<Fr> {
1010
type Config = (ModExpCircuitConfig, MockChallenges);
1111
type FloorPlanner = SimpleFloorPlanner;
12+
#[cfg(feature = "circuit-params")]
1213
type Params = ();
1314

1415
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/mpt_circuit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ impl SubCircuit<Fr> for MptCircuit<Fr> {
157157
impl Circuit<Fr> for MptCircuit<Fr> {
158158
type Config = (MptCircuitConfig<Fr>, PoseidonTable, Challenges);
159159
type FloorPlanner = SimpleFloorPlanner;
160+
#[cfg(feature = "circuit-params")]
160161
type Params = ();
161162

162163
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/pi_circuit/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ impl<F: Field, const MAX_TXS: usize, const MAX_CALLDATA: usize, const MAX_INNER_
5454
{
5555
type Config = (PiCircuitConfig<F>, Challenges);
5656
type FloorPlanner = SimpleFloorPlanner;
57+
#[cfg(feature = "circuit-params")]
5758
type Params = ();
5859

5960
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/poseidon_circuit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ impl<F: Field> SubCircuit<F> for PoseidonCircuit<F> {
204204
impl<F: Field + Hashable> Circuit<F> for PoseidonCircuit<F> {
205205
type Config = (PoseidonCircuitConfig<F>, Challenges);
206206
type FloorPlanner = SimpleFloorPlanner;
207+
#[cfg(feature = "circuit-params")]
207208
type Params = ();
208209

209210
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/rlp_circuit_fsm/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use halo2_proofs::{
1313
impl<F: Field> Circuit<F> for RlpCircuit<F, Transaction> {
1414
type Config = (RlpCircuitConfig<F>, Challenges);
1515
type FloorPlanner = SimpleFloorPlanner;
16+
#[cfg(feature = "circuit-params")]
1617
type Params = ();
1718

1819
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/sig_circuit/ecdsa.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ where
7979
.or(ctx, Existing(s_is_zero), Existing(s_in_range));
8080

8181
// load required constants
82-
let zero = scalar_chip.load_constant(ctx, FpConfig::<F, SF>::fe_to_constant(SF::zero()));
83-
let one = scalar_chip.load_constant(ctx, FpConfig::<F, SF>::fe_to_constant(SF::one()));
82+
let zero = scalar_chip.load_constant(ctx, FpConfig::<F, SF>::fe_to_constant(SF::ZERO));
83+
let one = scalar_chip.load_constant(ctx, FpConfig::<F, SF>::fe_to_constant(SF::ONE));
8484
let point_at_infinity = EcPoint::construct(
8585
ecc_chip
8686
.field_chip()
87-
.load_constant(ctx, fe_to_biguint(&CF::zero())),
87+
.load_constant(ctx, fe_to_biguint(&CF::ZERO)),
8888
ecc_chip
8989
.field_chip()
90-
.load_constant(ctx, fe_to_biguint(&CF::zero())),
90+
.load_constant(ctx, fe_to_biguint(&CF::ZERO)),
9191
);
9292

9393
// compute u1 = m * s^{-1} mod n
@@ -179,7 +179,7 @@ where
179179
let lambda = {
180180
let a_val = base_chip.get_assigned_value(&dy);
181181
let b_val = base_chip.get_assigned_value(&dx);
182-
let b_inv = b_val.map(|bv| bv.invert().unwrap_or(CF::zero()));
182+
let b_inv = b_val.map(|bv| bv.invert().unwrap_or(CF::ZERO));
183183
let quot_val = a_val.zip(b_inv).map(|(a, bi)| a * bi);
184184
let quot = base_chip.load_private(ctx, FpConfig::<F, CF>::fe_to_witness(&quot_val));
185185
// constrain quot * b - a = 0 mod p

zkevm-circuits/src/state_circuit/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ where
1717
{
1818
type Config = (StateCircuitConfig<F>, Challenges);
1919
type FloorPlanner = SimpleFloorPlanner;
20+
#[cfg(feature = "circuit-params")]
2021
type Params = ();
2122

2223
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/super_circuit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ impl<
705705
{
706706
type Config = (SuperCircuitConfig<Fr>, Challenges);
707707
type FloorPlanner = SimpleFloorPlanner;
708+
#[cfg(feature = "circuit-params")]
708709
type Params = ();
709710

710711
fn without_witnesses(&self) -> Self {

zkevm-circuits/src/tx_circuit/dev.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ impl<F: Field> SubCircuit<F> for TxCircuitTester<F> {
156156
impl<F: Field> Circuit<F> for TxCircuitTester<F> {
157157
type Config = (TxCircuitTesterConfig<F>, Challenges);
158158
type FloorPlanner = SimpleFloorPlanner;
159+
#[cfg(feature = "circuit-params")]
159160
type Params = ();
160161

161162
fn without_witnesses(&self) -> Self {

0 commit comments

Comments
 (0)