Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

bug: add shf0 == shift.cells[0] constraint to shlshr #372

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/zkevm_specs/evm/execution/shl_shr.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def check_witness(
instruction.constrain_equal(
push.expr(), (is_shl * dividend.expr() + is_shr * quotient.expr()) * (1 - divisor_is_zero)
)
instruction.constrain_zero(shf0 - FQ(shift.le_bytes[0]))

# Constrain shift == shift.cells[0] when divisor != 0.
instruction.constrain_zero(
Expand Down