Skip to content

Commit

Permalink
Compute the helper inverse of the shift high limbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Oct 7, 2023
1 parent 35cdd73 commit dd1a005
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions evm/src/witness/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@ fn append_shift<F: Field>(
channel.addr_context = F::from_canonical_usize(lookup_addr.context);
channel.addr_segment = F::from_canonical_usize(lookup_addr.segment);
channel.addr_virtual = F::from_canonical_usize(lookup_addr.virt);

// Extra field required by the constraints for large shifts.
let high_limb_sum = row.mem_channels[0].value[1..].iter().copied().sum::<F>();
row.general.shift_mut().high_limb_sum_inv = high_limb_sum.inverse();
}

let operator = if is_shl {
Expand Down

0 comments on commit dd1a005

Please sign in to comment.