Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
fix: Pay #925 tech debt
Browse files Browse the repository at this point in the history
  • Loading branch information
CPerezz committed Nov 30, 2022
1 parent c74c1ed commit 1abe872
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 3 additions & 7 deletions zkevm-circuits/src/keccak_circuit/keccak_packed_multi.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::util::{
get_num_bits_per_lookup, load_lookup_table, load_normalize_table, load_pack_table,
CHI_BASE_LOOKUP_TABLE, NUM_ROUNDS,
extract_field, get_num_bits_per_lookup, load_lookup_table, load_normalize_table,
load_pack_table, CHI_BASE_LOOKUP_TABLE, NUM_ROUNDS,
};
use crate::evm_circuit::util::{not, rlc};
use crate::keccak_circuit::util::{
Expand Down Expand Up @@ -187,11 +187,7 @@ impl<F: FieldExt> Cell<F> {
// API customized for this impl specifically, for now I'm opening the
// value and extracting it. Once https://github.com/privacy-scaling-explorations/zkevm-circuits/issues/933 is resolved,
// this shouldn't be needed.
let mut value_f = F::zero();
value.map(|f| {
value_f = f;
f
});
let value_f = extract_field(value);

region.assign(
self.column_idx,
Expand Down
3 changes: 2 additions & 1 deletion zkevm-circuits/src/keccak_circuit/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use eth_types::{Field, ToScalar, Word};
use halo2_proofs::{
circuit::{Layouter, Value},
halo2curves::FieldExt,
plonk::{Error, TableColumn},
};
use itertools::Itertools;
Expand Down Expand Up @@ -453,7 +454,7 @@ pub fn load_lookup_table<F: Field>(
)
}

pub(crate) fn extract_field<F: Field>(value: Value<F>) -> F {
pub(crate) fn extract_field<F: FieldExt>(value: Value<F>) -> F {
let mut field = F::zero();
let _ = value.map(|f| {
field = f;
Expand Down

0 comments on commit 1abe872

Please sign in to comment.