scroll-tech / ceno

Accelerate Zero-knowledge Virtual Machine by Non-uniform Prover Based on GKR Protocol
Apache License 2.0
53 stars 6 forks source link

SRLI / SRAI confusion bug #539

Closed naure closed 2 weeks ago

naure commented 2 weeks ago

SRLI and SRAI have a function code that was forgotten. So their circuits are unsound because they can be used for the other instruction.

Bug discovered during refactoring of the internal encoding: https://github.com/scroll-tech/ceno/pull/538

And fixed in this same PR.

matthiasgoergens commented 2 weeks ago

Great find! The switch to saner decoding, like using InsnKind is already paying dividends.