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

Integration test of EVM circuit should cache the proving/verifying keys#1148

Merged
leolara merged 24 commits into
mainfrom
leo/integration-tests-cache-keys-evm
Feb 16, 2023
Merged

Integration test of EVM circuit should cache the proving/verifying keys#1148
leolara merged 24 commits into
mainfrom
leo/integration-tests-cache-keys-evm

Conversation

@leolara

@leolara leolara commented Feb 7, 2023

Copy link
Copy Markdown
Contributor

Closes #967

Additionally moves max_evm_rows.

Closes #1122

3 out of 5 real prover integration tests still are failing, perhaps there is another variation between circuits instances other than row number.

@github-actions github-actions Bot added crate-bus-mapping Issues related to the bus-mapping workspace member crate-circuit-benchmarks Issues related to the circuit-benchmarks workspace member crate-integration-tests Issues related to the integration-tests workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member T-bench Type: benchmark improvements labels Feb 7, 2023
@leolara leolara changed the title Leo/integration tests cache keys evm Integration test of EVM circuit should cache the proving/verifying keys Feb 7, 2023
@leolara leolara requested a review from CPerezz February 8, 2023 11:20
@leolara leolara marked this pull request as ready for review February 8, 2023 11:20
Comment thread integration-tests/tests/circuits.rs Outdated
let pk = if $real_prover { Some((*EVM_CIRCUIT_KEY).clone()) } else { None };
let (builder, _) = gen_inputs(*block_num).await;
let mut block = block_convert::<Fr>(&builder.block, &builder.code_db).unwrap();
block.circuits_params.max_evm_rows = 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's 0 by default. And here we have a default circuits_params right? So this statement is unneded.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also ,if we want to reuse the PK/VK, we should set a fixed value instead of compute at runtime.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this statement is a left over, and perhaps it is causing the errorsm thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except it is not 0 by default in the integration tests. I set it to zero to trigger the calculation of the minimum rows, but then I created the method that does that without setting any parameters.

Anyway, it is an error, and might cause an error

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh by default i meant the Default trait impl for CircuitsParams.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in integration tests is where we need to set MAX_EVM_ROWS instead of 0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread integration-tests/tests/circuits.rs Outdated
Comment thread zkevm-circuits/src/evm_circuit.rs
Comment thread zkevm-circuits/src/evm_circuit.rs Outdated
}
}

num_rows + 2 // EndBlock and at least one unused

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this comment is enough to understand why we add 2 precisely. and why EndBlock only requires 1.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't actually know the answer, I just refactored the value that had before. An idea of a better explanation for this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope.. But we can file an issue for that! :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the details of the EVM circuit, I guess I should put some time into that. It seems one of the most advanced ones.

@leolara leolara force-pushed the leo/integration-tests-cache-keys-evm branch from f55ab94 to 47d5b00 Compare February 8, 2023 17:38
@leolara leolara force-pushed the leo/integration-tests-cache-keys-evm branch from 47d5b00 to f1e8986 Compare February 8, 2023 17:47
@andyguzmaneth

andyguzmaneth commented Feb 9, 2023

Copy link
Copy Markdown
Collaborator

Note: should not be an issue on the circuit tests. But rather it could be something on the flow

For example type of errors like: "before using 0 generating parameters for the circuit, if we have more than 1 instance of a circuit, need proving keys for the bigger one and trigger for the smallers."

Prove for circuits annotation: #1108

@leolara

leolara commented Feb 9, 2023

Copy link
Copy Markdown
Contributor Author

Note: should not be an issue on the circuit tests. But rather it could be something on the flow

For example type of errors like: "before using 0 generating parameters for the circuit, if we have more than 1 instance of a circuit, need proving keys for the bigger one and trigger for the smallers."

Prove for circuits annotation: #1108

There is no code in that issue so I cannot run the test on this circuit.

@ed255

ed255 commented Feb 10, 2023

Copy link
Copy Markdown
Contributor

I just realized that now the ExpTable contains a fixed column, and when the table is used without its circuit, we're missing the padding to a fixed size max_exp_steps. This means that probably when testing the EVM Circuit, the assignment to the fixed column in the ExpTable will vary. See:
https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/1835da888abb6bdf3c746a5ee0640242434aa904/zkevm-circuits/src/table.rs#L1393-L1398

Although this may be unrelated to this issue, I'm not sure if any of the integration tests we have use the EXP opcode.

@leolara

leolara commented Feb 13, 2023

Copy link
Copy Markdown
Contributor Author

Currently we have these results:

Details
└─> ⬘ ./run.sh --steps tests --tests circuits::mock_prover
+ Running test group circuits::mock_prover
    Finished release [optimized] target(s) in 0.58s
     Running tests/circuits.rs (/Users/leo/src/zkevm-circuits/target/release/deps/circuits-449d1275391b6c68)

running 30 tests
[2023-02-13T09:31:37Z INFO  integration_tests::integration_test_circuits] test Copy circuit, block: #6 - ERC20 OpenZeppelin transfer failed
[2023-02-13T09:31:37Z INFO  integration_tests::integration_test_circuits] test Bytecode circuit, block: #7 - ERC20 OpenZeppelin transfer successful
test mock_prover::serial_test_copy_circuit_erc20_openzeppelin_transfer_fail ... ok
[2023-02-13T09:31:37Z INFO  integration_tests::integration_test_circuits] test Copy circuit, block: #1 - Transfer 0
test mock_prover::serial_test_bytecode_circuit_erc20_openzeppelin_transfer_succeed ... ok
[2023-02-13T09:31:37Z INFO  integration_tests::integration_test_circuits] test Bytecode circuit, block: #5 - Multiple transfers 0
thread 'mock_prover::serial_test_copy_circuit_block_transfer_0' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test mock_prover::serial_test_copy_circuit_block_transfer_0 ... FAILED
[2023-02-13T09:31:37Z INFO  integration_tests::integration_test_circuits] test EVM circuit, block: #1 - Transfer 0
[2023-02-13T09:31:37Z INFO  integration_tests::integration_test_circuits] test Copy circuit, block: #7 - ERC20 OpenZeppelin transfer successful
test mock_prover::serial_test_bytecode_circuit_multiple_transfers_0 ... ok
test mock_prover::serial_test_copy_circuit_erc20_openzeppelin_transfer_succeed ... ok
[2023-02-13T09:31:38Z INFO  integration_tests::integration_test_circuits] test Bytecode circuit, block: #6 - ERC20 OpenZeppelin transfer failed
[2023-02-13T09:31:38Z INFO  integration_tests::integration_test_circuits] test Copy circuit, block: #8 - Multiple ERC20 OpenZeppelin transfers
thread 'mock_prover::serial_test_copy_circuit_multiple_erc20_openzeppelin_transfers' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_copy_circuit_multiple_erc20_openzeppelin_transfers ... FAILED
[2023-02-13T09:31:38Z INFO  integration_tests::integration_test_circuits] test Copy circuit, block: #5 - Multiple transfers 0
thread 'mock_prover::serial_test_copy_circuit_multiple_transfers_0' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_copy_circuit_multiple_transfers_0 ... FAILED
test mock_prover::serial_test_bytecode_circuit_erc20_openzeppelin_transfer_fail ... ok
[2023-02-13T09:31:38Z INFO  integration_tests::integration_test_circuits] test State circuit, block: #1 - Transfer 0
[2023-02-13T09:31:38Z INFO  integration_tests::integration_test_circuits] test Bytecode circuit, block: #1 - Transfer 0
test mock_prover::serial_test_bytecode_circuit_block_transfer_0 ... ok
[2023-02-13T09:31:38Z INFO  integration_tests::integration_test_circuits] test Bytecode circuit, block: #8 - Multiple ERC20 OpenZeppelin transfers
test mock_prover::serial_test_bytecode_circuit_multiple_erc20_openzeppelin_transfers ... ok
test mock_prover::serial_test_state_circuit_block_transfer_0 ... ok
[2023-02-13T09:31:40Z INFO  integration_tests::integration_test_circuits] test State circuit, block: #6 - ERC20 OpenZeppelin transfer failed
test mock_prover::serial_test_state_circuit_erc20_openzeppelin_transfer_fail ... ok
[2023-02-13T09:31:57Z INFO  integration_tests::integration_test_circuits] test State circuit, block: #7 - ERC20 OpenZeppelin transfer successful
test mock_prover::serial_test_state_circuit_erc20_openzeppelin_transfer_succeed ... ok
[2023-02-13T09:32:03Z INFO  integration_tests::integration_test_circuits] test Super circuit, block: #1 - Transfer 0
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post absorb:
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 4
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 14
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post padding:
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 22
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post theta:
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 22
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 66
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post rho/pi:
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 116
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 402
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post chi:
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 114
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 410
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post squeeze:
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 415
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Degree: 4
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Minimum rows: 59
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Lookups: 260
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Columns: 415
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] num unused cells: 32
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size absorb: 4
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta: 3
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta c: 3
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta t: 3
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size rho/pi: 3
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size chi base: 3
[2023-02-13T09:32:03Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] uniform part sizes: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1]
[2023-02-13T09:32:03Z INFO  integration_tests::integration_test_circuits] test State circuit, block: #8 - Multiple ERC20 OpenZeppelin transfers
test mock_prover::serial_test_state_circuit_multiple_erc20_openzeppelin_transfers ... ok
[2023-02-13T09:32:17Z INFO  integration_tests::integration_test_circuits] test State circuit, block: #5 - Multiple transfers 0
test mock_prover::serial_test_state_circuit_multiple_transfers_0 ... ok
test mock_prover::serial_test_evm_circuit_block_transfer_0 ... ok
[2023-02-13T09:32:26Z INFO  integration_tests::integration_test_circuits] test EVM circuit, block: #6 - ERC20 OpenZeppelin transfer failed
thread 'mock_prover::serial_test_evm_circuit_erc20_openzeppelin_transfer_fail' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_evm_circuit_erc20_openzeppelin_transfer_fail ... FAILED
[2023-02-13T09:32:27Z INFO  integration_tests::integration_test_circuits] test EVM circuit, block: #7 - ERC20 OpenZeppelin transfer successful
thread 'mock_prover::serial_test_evm_circuit_erc20_openzeppelin_transfer_succeed' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_evm_circuit_erc20_openzeppelin_transfer_succeed ... FAILED
[2023-02-13T09:32:29Z INFO  integration_tests::integration_test_circuits] test Tx circuit, block: #1 - Transfer 0
[2023-02-13T09:32:29Z INFO  integration_tests::integration_test_circuits] test EVM circuit, block: #8 - Multiple ERC20 OpenZeppelin transfers
thread 'mock_prover::serial_test_evm_circuit_multiple_erc20_openzeppelin_transfers' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_evm_circuit_multiple_erc20_openzeppelin_transfers ... FAILED
[2023-02-13T09:32:31Z INFO  integration_tests::integration_test_circuits] test EVM circuit, block: #5 - Multiple transfers 0
test mock_prover::serial_test_evm_circuit_multiple_transfers_0 has been running for over 60 seconds
test mock_prover::serial_test_tx_circuit_block_transfer_0 ... ok
[2023-02-13T09:32:42Z INFO  integration_tests::integration_test_circuits] test Tx circuit, block: #6 - ERC20 OpenZeppelin transfer failed
test mock_prover::serial_test_tx_circuit_erc20_openzeppelin_transfer_fail ... ok
[2023-02-13T09:32:51Z INFO  integration_tests::integration_test_circuits] test Tx circuit, block: #7 - ERC20 OpenZeppelin transfer successful
test mock_prover::serial_test_tx_circuit_erc20_openzeppelin_transfer_succeed ... ok
test mock_prover::serial_test_super_circuit_block_transfer_0 has been running for over 60 seconds
[2023-02-13T09:33:03Z INFO  integration_tests::integration_test_circuits] test Tx circuit, block: #8 - Multiple ERC20 OpenZeppelin transfers
test mock_prover::serial_test_tx_circuit_multiple_erc20_openzeppelin_transfers ... ok
[2023-02-13T09:33:13Z INFO  integration_tests::integration_test_circuits] test Tx circuit, block: #5 - Multiple transfers 0
test mock_prover::serial_test_super_circuit_erc20_openzeppelin_transfer_fail has been running for over 60 seconds
test mock_prover::serial_test_evm_circuit_multiple_transfers_0 ... ok
test mock_prover::serial_test_tx_circuit_multiple_transfers_0 ... ok
test mock_prover::serial_test_super_circuit_erc20_openzeppelin_transfer_succeed has been running for over 60 seconds
test mock_prover::serial_test_super_circuit_multiple_erc20_openzeppelin_transfers has been running for over 60 seconds
test mock_prover::serial_test_super_circuit_multiple_transfers_0 has been running for over 60 seconds



test mock_prover::serial_test_super_circuit_block_transfer_0 ... ok
[2023-02-13T09:36:39Z INFO  integration_tests::integration_test_circuits] test Super circuit, block: #6 - ERC20 OpenZeppelin transfer failed
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post absorb:
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 4
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 14
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post padding:
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 22
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post theta:
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 22
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 66
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post rho/pi:
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 116
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 402
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post chi:
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 114
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 410
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post squeeze:
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 415
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Degree: 4
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Minimum rows: 59
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Lookups: 260
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Columns: 415
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] num unused cells: 32
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size absorb: 4
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta: 3
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta c: 3
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta t: 3
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size rho/pi: 3
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size chi base: 3
[2023-02-13T09:36:39Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] uniform part sizes: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1]
thread 'mock_prover::serial_test_super_circuit_erc20_openzeppelin_transfer_fail' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_super_circuit_erc20_openzeppelin_transfer_fail ... FAILED
[2023-02-13T09:36:57Z INFO  integration_tests::integration_test_circuits] test Super circuit, block: #7 - ERC20 OpenZeppelin transfer successful
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post absorb:
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 4
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 14
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post padding:
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 22
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post theta:
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 22
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 66
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post rho/pi:
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 116
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 402
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post chi:
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 114
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 410
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post squeeze:
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 415
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Degree: 4
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Minimum rows: 59
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Lookups: 260
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Columns: 415
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] num unused cells: 32
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size absorb: 4
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta: 3
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta c: 3
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta t: 3
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size rho/pi: 3
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size chi base: 3
[2023-02-13T09:36:57Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] uniform part sizes: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1]
thread 'mock_prover::serial_test_super_circuit_erc20_openzeppelin_transfer_succeed' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_super_circuit_erc20_openzeppelin_transfer_succeed ... FAILED
[2023-02-13T09:37:16Z INFO  integration_tests::integration_test_circuits] test Super circuit, block: #8 - Multiple ERC20 OpenZeppelin transfers
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post absorb:
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 4
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 14
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post padding:
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 22
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post theta:
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 22
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 66
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post rho/pi:
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 116
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 402
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post chi:
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 114
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 410
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post squeeze:
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 415
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Degree: 4
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Minimum rows: 59
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Lookups: 260
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Columns: 415
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] num unused cells: 32
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size absorb: 4
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta: 3
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta c: 3
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta t: 3
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size rho/pi: 3
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size chi base: 3
[2023-02-13T09:37:16Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] uniform part sizes: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1]

<\details>



thread 'mock_prover::serial_test_super_circuit_multiple_erc20_openzeppelin_transfers' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_super_circuit_multiple_erc20_openzeppelin_transfers ... FAILED
[2023-02-13T09:37:36Z INFO  integration_tests::integration_test_circuits] test Super circuit, block: #5 - Multiple transfers 0
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post absorb:
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 4
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 14
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post padding:
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 22
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post theta:
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 22
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 66
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post rho/pi:
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 116
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 402
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post chi:
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 114
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 410
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] - Post squeeze:
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Lookups: 2
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Columns: 415
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Degree: 4
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Minimum rows: 59
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Lookups: 260
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] Total Columns: 415
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] num unused cells: 32
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size absorb: 4
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta: 3
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta c: 3
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size theta t: 3
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size rho/pi: 3
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] part_size chi base: 3
[2023-02-13T09:37:36Z INFO  zkevm_circuits::keccak_circuit::keccak_packed_multi] uniform part sizes: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1]
thread 'mock_prover::serial_test_super_circuit_multiple_transfers_0' panicked at 'circuit fixed columns are not constant for different witnesses', /Users/leo/src/zkevm-circuits/integration-tests/src/integration_test_circuits.rs:252:17
test mock_prover::serial_test_super_circuit_multiple_transfers_0 ... FAILED

failures:

failures:
    mock_prover::serial_test_copy_circuit_block_transfer_0
    mock_prover::serial_test_copy_circuit_multiple_erc20_openzeppelin_transfers
    mock_prover::serial_test_copy_circuit_multiple_transfers_0
    mock_prover::serial_test_evm_circuit_erc20_openzeppelin_transfer_fail
    mock_prover::serial_test_evm_circuit_erc20_openzeppelin_transfer_succeed
    mock_prover::serial_test_evm_circuit_multiple_erc20_openzeppelin_transfers
    mock_prover::serial_test_super_circuit_erc20_openzeppelin_transfer_fail
    mock_prover::serial_test_super_circuit_erc20_openzeppelin_transfer_succeed
    mock_prover::serial_test_super_circuit_multiple_erc20_openzeppelin_transfers
    mock_prover::serial_test_super_circuit_multiple_transfers_0

test result: FAILED. 20 passed; 10 failed; 0 ignored; 0 measured; 30 filtered out; finished in 372.93s

Edited by @CPerezz so that the msg does not take the entire thread.

@ed255

ed255 commented Feb 13, 2023

Copy link
Copy Markdown
Contributor

I have analyzed the non-constant fixed columns error with the copy_circuit and found the issue: The TxTable contains a fixed column, and when used without the TxCircuit it varies depending on the input. At least in the scenario of the Integration Tests. I'm working on a fix.

@leolara

leolara commented Feb 13, 2023

Copy link
Copy Markdown
Contributor Author

@ed255 @CPerezz what is the best plan? do I fix these things in this PR? Do i wait to merge this to get it fixed in other PRs? Or we merge it with the errors?

@ed255

ed255 commented Feb 13, 2023

Copy link
Copy Markdown
Contributor

@ed255 @CPerezz what is the best plan? do I fix these things in this PR? Do i wait to merge this to get it fixed in other PRs? Or we merge it with the errors?

I think merging this PR is a viable option: we will see the failures on main, but this will allow others to work on fixes via parallel PRs.
I'm also OK with having this PR on hold while we fix the issues in other PRs, and keep updating this PR until all integration tests pass.

BTW, before reading your message I submitted this PR #1169 with the intention to fix the copy circuit error you shared, but I think it also fixes the evm circuit error. I'm not sure about the super circuit, as I haven't tested it.

@leolara

leolara commented Feb 13, 2023

Copy link
Copy Markdown
Contributor Author

@ed255 I think merging it is the best as I would need to be fixing conflics for a long time otherwise.

@leolara

leolara commented Feb 13, 2023

Copy link
Copy Markdown
Contributor Author

Also, Super uses EVM and EVM uses copy so it is likely that it will solve it.

@leolara

leolara commented Feb 14, 2023

Copy link
Copy Markdown
Contributor Author

@ed255 @CPerezz after merging back main, that contains Edu fix for copy circuit, I still get different witness for super circuit. EVM and copy fixed.

I would merge like this and fix the super circuit in another PR.

@ed255 ed255 linked an issue Feb 14, 2023 that may be closed by this pull request

@ed255 ed255 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice refactor as well! :D

Comment thread integration-tests/src/integration_test_circuits.rs

@CPerezz CPerezz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Let's hope that we can solve this with the fix from @ed255

@leolara leolara enabled auto-merge February 16, 2023 09:17
@leolara leolara added this pull request to the merge queue Feb 16, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Feb 16, 2023
@leolara leolara added this pull request to the merge queue Feb 16, 2023
Merged via the queue into main with commit 9a819c8 Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

crate-bus-mapping Issues related to the bus-mapping workspace member crate-circuit-benchmarks Issues related to the circuit-benchmarks workspace member crate-integration-tests Issues related to the integration-tests workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member T-bench Type: benchmark improvements

Projects

None yet

4 participants