From d33972567f83f3218257b286b541ad97ba32928c Mon Sep 17 00:00:00 2001 From: Alex Kuzmin Date: Mon, 18 Dec 2023 18:29:42 +0800 Subject: [PATCH] Update halo2 dependency and fix conditional assignment in codegen.rs --- Cargo.toml | 2 +- src/codegen.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8106040..9742da3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2", tag = "v2023_04_20" } +halo2_proofs = { git = "https://github.com/summa-dev/halo2"} askama = { version = "0.12.0", features = ["config"], default-features = false } hex = "0.4.3" ruint = "1" diff --git a/src/codegen.rs b/src/codegen.rs index 547a90a..7d420ca 100644 --- a/src/codegen.rs +++ b/src/codegen.rs @@ -176,7 +176,11 @@ impl<'a> SolidityGenerator<'a> { fr_to_u256(domain.get_omega_inv().pow_vartime([l])) }; let num_instances = U256::from(self.num_instances); - let has_accumulator = U256::from(self.acc_encoding.is_some()); + let has_accumulator = if self.acc_encoding.is_some() { + U256::from(1) + } else { + U256::from(0) + }; let acc_offset = self .acc_encoding .map(|acc_encoding| U256::from(acc_encoding.offset))