Skip to content

Commit

Permalink
refactor: avoid ambiguous and reduce dependnecy
Browse files Browse the repository at this point in the history
  • Loading branch information
han0110 committed Jan 2, 2024
1 parent fb8b5d1 commit 0cab2bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ itertools = "0.11.0"
blake2b_simd = "1"

# For feature = "evm"
revm = { version = "3.3.0", optional = true }
revm = { version = "3.3.0", default-features = false, optional = true }

[dev-dependencies]
rand = "0.8.5"
revm = "3.3.0"
revm = { version = "3.3.0", default-features = false }
halo2_maingate = { git = "https://github.com/privacy-scaling-explorations/halo2wrong", tag = "v2023_04_20", package = "maingate" }

[features]
Expand Down
2 changes: 1 addition & 1 deletion src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl<'a> SolidityGenerator<'a> {
let l = self.meta.rotation_last.unsigned_abs() as u64;
fr_to_u256(domain.get_omega_inv().pow_vartime([l]))
};
let has_accumulator = U256::from(self.acc_encoding.is_some());
let has_accumulator = U256::from(self.acc_encoding.is_some() as usize);
let acc_offset = self
.acc_encoding
.map(|acc_encoding| U256::from(acc_encoding.offset))
Expand Down
3 changes: 1 addition & 2 deletions templates/Halo2Verifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ contract Halo2Verifier {
let proof_cptr := PROOF_CPTR
let challenge_mptr := CHALLENGE_MPTR
{%- for num_advices in num_advices %}
{%- let num_challenges = num_challenges[loop.index0] %}

// Phase {{ loop.index }}
for
Expand All @@ -274,7 +273,7 @@ contract Halo2Verifier {
}

challenge_mptr, hash_mptr := squeeze_challenge(challenge_mptr, hash_mptr, r)
{%- for _ in 0..num_challenges - 1 %}
{%- for _ in 0..num_challenges[loop.index0] - 1 %}
challenge_mptr := squeeze_challenge_cont(challenge_mptr, r)
{%- endfor %}
{%- endfor %}
Expand Down

0 comments on commit 0cab2bf

Please sign in to comment.