diff --git a/.github/workflows/ci-prover-e2e.yml b/.github/workflows/ci-prover-e2e.yml index f5f2819b55e4..a1843ef9e2d3 100644 --- a/.github/workflows/ci-prover-e2e.yml +++ b/.github/workflows/ci-prover-e2e.yml @@ -43,10 +43,19 @@ jobs: run: | git fetch # Checkout the commit with the DualVerifier contract to test FFLONK interface - git checkout b4d5b984 + git checkout b68a01afa494fbb2fe85c954f0afe0d36ef589ca git submodule update --init --recursive git rev-parse HEAD + - name: Set new genesis for fflonk + # Note, that while `Verifier` is not explicitly a part of the genensis state, + # it affects it indirectly as it is a part of the repo. + working-directory: ./etc/env/file_based + if: matrix.compressor-mode == 'fflonk' + run: | + sudo sed -i 's/^genesis_root: .*/genesis_root: 0xc2cbb3df06a08ba40810e07848d6522f5def60d9206b3638ee60d72cd9fac83c/' genesis.yaml + sudo sed -i "s/^genesis_batch_commitment: .*/genesis_batch_commitment: 0x5edce2e6a07abbb54d71581905b8fa3d9b9ecafea9add94be3c1b8ae709e690a/" genesis.yaml + - name: Init run: | ci_run chmod -R +x ./bin diff --git a/core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs b/core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs index 2d02bd5a1764..817448cc1b62 100644 --- a/core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs +++ b/core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs @@ -58,8 +58,10 @@ impl ProveBatches { } }; + let should_use_fflonk = !is_verifier_pre_fflonk || !protocol_version.is_pre_fflonk(); + if protocol_version.is_pre_gateway() { - let proof_input = if !is_verifier_pre_fflonk || !protocol_version.is_pre_fflonk() { + let proof_input = if should_use_fflonk { Token::Tuple(vec![ Token::Array(vec![verifier_type.into_token()]), Token::Array(proof.into_iter().map(Token::Uint).collect()), @@ -73,7 +75,17 @@ impl ProveBatches { vec![prev_l1_batch_info, batches_arg, proof_input] } else { - let proof_input = Token::Array(proof.into_iter().map(Token::Uint).collect()); + let proof_input = if should_use_fflonk { + Token::Array( + vec![verifier_type] + .into_iter() + .chain(proof) + .map(Token::Uint) + .collect(), + ) + } else { + Token::Array(proof.into_iter().map(Token::Uint).collect()) + }; let encoded_data = encode(&[prev_l1_batch_info, batches_arg, proof_input]); let prove_data = [[SUPPORTED_ENCODING_VERSION].to_vec(), encoded_data]