From 1950aed629501e893ff380a79789eb69c197c924 Mon Sep 17 00:00:00 2001 From: Mason Liang Date: Mon, 30 Oct 2023 21:33:33 -0400 Subject: [PATCH] cargo fix --- src/gadgets/mpt_update.rs | 22 +++++----------------- src/mpt.rs | 3 +-- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/gadgets/mpt_update.rs b/src/gadgets/mpt_update.rs index 058d7ed1..4a4733dc 100644 --- a/src/gadgets/mpt_update.rs +++ b/src/gadgets/mpt_update.rs @@ -5,12 +5,8 @@ pub use path::PathType; use segment::SegmentType; use super::{ - byte_representation::BytesLookup, - canonical_representation::{FrHiLoLookup, FrRlcLookup}, - is_zero::IsZeroGadget, - key_bit::KeyBitLookup, - one_hot::OneHot, - poseidon::PoseidonLookup, + byte_representation::BytesLookup, canonical_representation::FrHiLoLookup, + is_zero::IsZeroGadget, key_bit::KeyBitLookup, one_hot::OneHot, poseidon::PoseidonLookup, }; use crate::{ constraint_builder::{ @@ -21,15 +17,13 @@ use crate::{ trie::{next_domain, TrieRows}, ClaimKind, HashDomain, Proof, }, - util::{ - account_key, domain_hash, fr_to_u256, lagrange_polynomial, rlc, u256_hi_lo, u256_to_fr, - }, + util::{account_key, domain_hash, fr_to_u256, lagrange_polynomial, u256_hi_lo, u256_to_fr}, MPTProofType, }; use ethers_core::types::Address; use halo2_proofs::{ arithmetic::{Field, FieldExt}, - circuit::{Region, Value}, + circuit::Region, halo2curves::{bn256::Fr, group::ff::PrimeField}, plonk::ConstraintSystem, }; @@ -122,7 +116,6 @@ impl MptUpdateConfig { poseidon: &impl PoseidonLookup, key_bit: &impl KeyBitLookup, bytes: &impl BytesLookup, - fr_rlc: &impl FrRlcLookup, fr_hi_lo: &impl FrHiLoLookup, ) -> Self { let proof_type: OneHot = OneHot::configure(cs, cb); @@ -356,12 +349,7 @@ impl MptUpdateConfig { } /// .. - pub fn assign( - &self, - region: &mut Region<'_, Fr>, - proofs: &[Proof], - randomness: Value, - ) -> usize { + pub fn assign(&self, region: &mut Region<'_, Fr>, proofs: &[Proof]) -> usize { let mut n_rows = 0; let mut offset = 1; // selector on first row is disabled. for proof in proofs { diff --git a/src/mpt.rs b/src/mpt.rs index 467f41ef..bed50d7d 100644 --- a/src/mpt.rs +++ b/src/mpt.rs @@ -67,7 +67,6 @@ impl MptCircuitConfig { &key_bit, &byte_representation, &canonical_representation, - &canonical_representation, ); // This ensures that the final mpt update in the circuit is complete, since the padding @@ -158,7 +157,7 @@ impl MptCircuitConfig { randomness, ); - let n_assigned_rows = self.mpt_update.assign(&mut region, proofs, randomness); + let n_assigned_rows = self.mpt_update.assign(&mut region, proofs); assert!( 2 + n_assigned_rows <= n_rows,