mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-22 23:53:11 +00:00
PR comments
This commit is contained in:
parent
747c9f894b
commit
df9a211475
@ -5,7 +5,6 @@ use crate::field::extension_field::target::ExtensionTarget;
|
||||
use crate::field::extension_field::Extendable;
|
||||
use crate::field::field_types::{Field, RichField};
|
||||
use crate::gates::gate::Gate;
|
||||
use crate::hash::hashing::SPONGE_WIDTH;
|
||||
use crate::hash::poseidon;
|
||||
use crate::hash::poseidon::Poseidon;
|
||||
use crate::iop::generator::{GeneratedValues, SimpleGenerator, WitnessGenerator};
|
||||
@ -104,7 +103,7 @@ where
|
||||
let swap = vars.local_wires[Self::WIRE_SWAP];
|
||||
constraints.push(swap * (swap - F::Extension::ONE));
|
||||
|
||||
let mut state = Vec::with_capacity(SPONGE_WIDTH);
|
||||
let mut state = Vec::with_capacity(WIDTH);
|
||||
for i in 0..4 {
|
||||
let a = vars.local_wires[i];
|
||||
let b = vars.local_wires[i + 4];
|
||||
@ -115,7 +114,7 @@ where
|
||||
let b = vars.local_wires[i];
|
||||
state.push(a + swap * (b - a));
|
||||
}
|
||||
for i in 8..SPONGE_WIDTH {
|
||||
for i in 8..WIDTH {
|
||||
state.push(vars.local_wires[i]);
|
||||
}
|
||||
|
||||
@ -183,7 +182,7 @@ where
|
||||
let swap = vars.local_wires[Self::WIRE_SWAP];
|
||||
constraints.push(swap * (swap - F::ONE));
|
||||
|
||||
let mut state = Vec::with_capacity(SPONGE_WIDTH);
|
||||
let mut state = Vec::with_capacity(WIDTH);
|
||||
for i in 0..4 {
|
||||
let a = vars.local_wires[i];
|
||||
let b = vars.local_wires[i + 4];
|
||||
@ -194,7 +193,7 @@ where
|
||||
let b = vars.local_wires[i];
|
||||
state.push(a + swap * (b - a));
|
||||
}
|
||||
for i in 8..SPONGE_WIDTH {
|
||||
for i in 8..WIDTH {
|
||||
state.push(vars.local_wires[i]);
|
||||
}
|
||||
|
||||
@ -266,7 +265,7 @@ where
|
||||
let swap = vars.local_wires[Self::WIRE_SWAP];
|
||||
constraints.push(builder.mul_sub_extension(swap, swap, swap));
|
||||
|
||||
let mut state = Vec::with_capacity(SPONGE_WIDTH);
|
||||
let mut state = Vec::with_capacity(WIDTH);
|
||||
for i in 0..4 {
|
||||
let a = vars.local_wires[i];
|
||||
let b = vars.local_wires[i + 4];
|
||||
@ -279,7 +278,7 @@ where
|
||||
let delta = builder.sub_extension(b, a);
|
||||
state.push(builder.mul_add_extension(swap, delta, a));
|
||||
}
|
||||
for i in 8..SPONGE_WIDTH {
|
||||
for i in 8..WIDTH {
|
||||
state.push(vars.local_wires[i]);
|
||||
}
|
||||
|
||||
|
||||
@ -87,6 +87,10 @@ impl GMiMC<12> for CrandallField {
|
||||
const ROUND_CONSTANTS: [u64; NUM_ROUNDS] = CRANDALL_AND_GOLDILOCKS_ROUND_CONSTANTS;
|
||||
}
|
||||
|
||||
impl GMiMC<8> for GoldilocksField {
|
||||
const ROUND_CONSTANTS: [u64; NUM_ROUNDS] = CRANDALL_AND_GOLDILOCKS_ROUND_CONSTANTS;
|
||||
}
|
||||
|
||||
impl GMiMC<12> for GoldilocksField {
|
||||
const ROUND_CONSTANTS: [u64; NUM_ROUNDS] = CRANDALL_AND_GOLDILOCKS_ROUND_CONSTANTS;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user