From dd1a005dbcafaea5f138e357e56d9b52215a1436 Mon Sep 17 00:00:00 2001 From: Robin Salen Date: Fri, 6 Oct 2023 20:00:41 -0400 Subject: [PATCH] Compute the helper inverse of the shift high limbs --- evm/src/witness/operation.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/evm/src/witness/operation.rs b/evm/src/witness/operation.rs index 568fe4b181..f4dc03e806 100644 --- a/evm/src/witness/operation.rs +++ b/evm/src/witness/operation.rs @@ -497,6 +497,10 @@ fn append_shift( 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::(); + row.general.shift_mut().high_limb_sum_inv = high_limb_sum.inverse(); } let operator = if is_shl {