zkevm-circuits icon indicating copy to clipboard operation
zkevm-circuits copied to clipboard

Logs show errors for ADDMOD lookups while tests pass

Open CPerezz opened this issue 3 years ago • 4 comments

While running inside of the zkevm-circuits workspace member cargo test --release --all-features addmod we obtain:

[2022-08-17T09:29:47Z ERROR zkevm_circuits::evm_circuit::execution] incorrect rw witness. lookup input name: "rw lookup Stack lookup (stored expression)". rw: Stack { rw_counter: 29, is_write: true, call_id: 1, stack_pointer: 1023, value: 1 }, rw index: (Stack, 6), 3th rw of step ADDMOD
[2022-08-17T09:29:47Z ERROR zkevm_circuits::evm_circuit::execution] incorrect rw witness. lookup input name: "rw lookup Stack lookup (stored expression)". rw: Stack { rw_counter: 29, is_write: true, call_id: 1, stack_pointer: 1023, value: 1 }, rw index: (Stack, 6), 3th rw of step ADDMOD

The issue is that the tests are passing independently of the fact that there are ERRORS saying the lookups are wrong in the logs. This was introduced in https://github.com/privacy-scaling-explorations/zkevm-circuits/pull/676 and we should try to see if:

  1. lookups are wrong indeed and the tests are coded incorrectly so that they pass anyway.
  2. lookups are correct and the reporting tool is wrong. And therefore we should fix it.

CPerezz avatar Aug 17 '22 10:08 CPerezz

The lookup is indeed incorrect. In fact these tests are deliberately constructed to be negative tests to check error is indeed error

lispc avatar Aug 17 '22 10:08 lispc

hmmmm I see. Is there any way on which for these tests specifically we can supress the logs? Otherwise it becomes really confusing what's correct and what's not.

CPerezz avatar Aug 17 '22 12:08 CPerezz

@CPerezz the negative tests I put there are quite - let's say ad hoc - and I think that it can be commented out till we find a good strategy for #400

adria0 avatar Sep 01 '22 13:09 adria0

Still unsure on which is the correct way of doing this...

CPerezz avatar Sep 02 '22 07:09 CPerezz