mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-08 08:43:06 +00:00
Merge pull request #967 from toposware/fix_decode
Fix decode constraint
This commit is contained in:
commit
7a65b1d4df
@ -146,7 +146,7 @@ impl<F: RichField + Extendable<D>, const D: usize> Stark<F, D> for CpuStark<F, D
|
||||
bootstrap_kernel::eval_bootstrap_kernel(vars, yield_constr);
|
||||
contextops::eval_packed(local_values, next_values, yield_constr);
|
||||
control_flow::eval_packed_generic(local_values, next_values, yield_constr);
|
||||
decode::eval_packed_generic(local_values, &mut dummy_yield_constr);
|
||||
decode::eval_packed_generic(local_values, yield_constr);
|
||||
dup_swap::eval_packed(local_values, yield_constr);
|
||||
gas::eval_packed(local_values, next_values, yield_constr);
|
||||
jumps::eval_packed(local_values, next_values, yield_constr);
|
||||
@ -176,7 +176,7 @@ impl<F: RichField + Extendable<D>, const D: usize> Stark<F, D> for CpuStark<F, D
|
||||
bootstrap_kernel::eval_bootstrap_kernel_circuit(builder, vars, yield_constr);
|
||||
contextops::eval_ext_circuit(builder, local_values, next_values, yield_constr);
|
||||
control_flow::eval_ext_circuit(builder, local_values, next_values, yield_constr);
|
||||
decode::eval_ext_circuit(builder, local_values, &mut dummy_yield_constr);
|
||||
decode::eval_ext_circuit(builder, local_values, yield_constr);
|
||||
dup_swap::eval_ext_circuit(builder, local_values, yield_constr);
|
||||
gas::eval_ext_circuit(builder, local_values, next_values, yield_constr);
|
||||
jumps::eval_ext_circuit(builder, local_values, next_values, yield_constr);
|
||||
|
||||
@ -191,7 +191,7 @@ pub fn eval_packed_generic<P: PackedField>(
|
||||
.into_iter()
|
||||
.zip(bits_from_opcode(oc))
|
||||
.rev()
|
||||
.take(block_length + 1)
|
||||
.take(8 - block_length)
|
||||
.map(|(row_bit, flag_bit)| match flag_bit {
|
||||
// 1 if the bit does not match, and 0 otherwise
|
||||
false => row_bit,
|
||||
@ -264,7 +264,7 @@ pub fn eval_ext_circuit<F: RichField + Extendable<D>, const D: usize>(
|
||||
.into_iter()
|
||||
.zip(bits_from_opcode(oc))
|
||||
.rev()
|
||||
.take(block_length + 1)
|
||||
.take(8 - block_length)
|
||||
.fold(builder.zero_extension(), |cumul, (row_bit, flag_bit)| {
|
||||
let to_add = match flag_bit {
|
||||
false => row_bit,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user