Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid ambiguous and reduce dependnecy #11

Merged
merged 3 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
cache-on-failure: true

- name: Install solc
run: (hash svm 2>/dev/null || cargo install --locked --git https://github.com/alloy-rs/svm-rs) && svm install 0.8.21 && solc --version
run: (hash svm 2>/dev/null || cargo install svm-rs) && svm install 0.8.21 && solc --version

- name: Run test
run: cargo test --workspace --all-features --all-targets -- --nocapture
Expand Down
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 examples/separately.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ mod prelude {
ff::PrimeField,
},
plonk::*,
poly::{commitment::Params, kzg::commitment::ParamsKZG, Rotation},
poly::{kzg::commitment::ParamsKZG, Rotation},
};
pub use rand::{
rngs::{OsRng, StdRng},
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
Loading