diff --git a/expander_compiler/src/builder/final_build_opt.rs b/expander_compiler/src/builder/final_build_opt.rs index 9135831..65f80c1 100644 --- a/expander_compiler/src/builder/final_build_opt.rs +++ b/expander_compiler/src/builder/final_build_opt.rs @@ -458,8 +458,8 @@ impl Builder { + cost_of_possible_references::(&[0, 1, 0], ref_count.add, ref_count.mul); should_compress |= cost_compress < cost_no_compress; should_compress &= e.degree() > 0; - if should_compress && false { - // Currently, this don't consider the cost of relay, so it's disabled + if should_compress { + // Currently, this don't consider the cost of relay, so it's not good in some cases // TODO: fix this let es = self.to_single(e); self.in_var_exprs.push(es); diff --git a/expander_compiler/src/circuit/config.rs b/expander_compiler/src/circuit/config.rs index 83b9743..9875b86 100644 --- a/expander_compiler/src/circuit/config.rs +++ b/expander_compiler/src/circuit/config.rs @@ -42,5 +42,9 @@ impl Config for GF2Config { const CONFIG_ID: usize = 3; + // temporary fix for Keccak_GF2 + // TODO: measure actual costs + const COST_MUL: usize = 200; + const ENABLE_RANDOM_COMBINATION: bool = false; }