From 8b8ea051554966e1df0e76650310d07b3d2c0b75 Mon Sep 17 00:00:00 2001 From: Leo Lara Date: Wed, 21 Jun 2023 11:30:43 +0800 Subject: [PATCH] Better name query_advice --- zkevm-circuits/src/bytecode_circuit/circuit.rs | 14 +++++++++----- zkevm-circuits/src/util/word.rs | 10 +++++++--- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/zkevm-circuits/src/bytecode_circuit/circuit.rs b/zkevm-circuits/src/bytecode_circuit/circuit.rs index 6cad140b4c..5b78de6b74 100644 --- a/zkevm-circuits/src/bytecode_circuit/circuit.rs +++ b/zkevm-circuits/src/bytecode_circuit/circuit.rs @@ -281,7 +281,7 @@ impl SubCircuitConfig for BytecodeCircuitConfig { cb.require_equal_word( "assert cur.hash == EMPTY_HASH", - bytecode_table.code_hash.query(meta, Rotation::cur()), + bytecode_table.code_hash.query_advice(meta, Rotation::cur()), empty_hash_word, ); @@ -322,8 +322,10 @@ impl SubCircuitConfig for BytecodeCircuitConfig { cb.require_equal_word( "next.hash == cur.hash", - bytecode_table.code_hash.query(meta, Rotation::next()), - bytecode_table.code_hash.query(meta, Rotation::cur()), + bytecode_table + .code_hash + .query_advice(meta, Rotation::next()), + bytecode_table.code_hash.query_advice(meta, Rotation::cur()), ); cb.require_equal( @@ -365,8 +367,10 @@ impl SubCircuitConfig for BytecodeCircuitConfig { cb.require_equal_word( "next.hash == cur.hash", - bytecode_table.code_hash.query(meta, Rotation::next()), - bytecode_table.code_hash.query(meta, Rotation::cur()), + bytecode_table + .code_hash + .query_advice(meta, Rotation::next()), + bytecode_table.code_hash.query_advice(meta, Rotation::cur()), ); cb.require_equal( diff --git a/zkevm-circuits/src/util/word.rs b/zkevm-circuits/src/util/word.rs index 029fcd2adb..cca33a8049 100644 --- a/zkevm-circuits/src/util/word.rs +++ b/zkevm-circuits/src/util/word.rs @@ -50,7 +50,7 @@ impl WordLimbs { impl WordLimbs, N> { /// Query advice of WordLibs of columns advice - pub fn query( + pub fn query_advice( &self, meta: &mut VirtualCells, at: Rotation, @@ -393,8 +393,12 @@ impl Word> { impl Word> { /// Query advice of Word of columns advice - pub fn query(&self, meta: &mut VirtualCells, at: Rotation) -> Word> { - self.0.query(meta, at).to_word() + pub fn query_advice( + &self, + meta: &mut VirtualCells, + at: Rotation, + ) -> Word> { + self.0.query_advice(meta, at).to_word() } }