Reduce constant_gate_size to 5 (#366)

This results in 8 constant polynomials, which means our Merkle tree containing preprocessed polynomials has leaves of size 80 + 8 = 88. A multiple of 8 is efficient in terms of how many gates it takes to hash a leaf. Saves 17 gates.
This commit is contained in:
Daniel Lubarov 2021-11-16 09:29:22 -08:00 committed by GitHub
parent eb5a60bef1
commit 8b71075154
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
proof: &MerkleProofTarget,
) {
let zero = self.zero();
let mut state: HashOutTarget = self.hash_or_noop(leaf_data);
let mut state = self.hash_or_noop(leaf_data);
for (&bit, &sibling) in leaf_index_bits.iter().zip(&proof.siblings) {
let mut perm_inputs = [zero; SPONGE_WIDTH];

View File

@ -61,7 +61,7 @@ impl CircuitConfig {
Self {
num_wires: 135,
num_routed_wires: 80,
constant_gate_size: 8,
constant_gate_size: 5,
use_base_arithmetic_gate: true,
security_bits: 93,
rate_bits: 3,