Skip to content

Commit 9adc853

Browse files
chore: Fix prove e2e (#3460)
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
1 parent 83a0f92 commit 9adc853

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/workflows/ci-prover-e2e.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,19 @@ jobs:
4343
run: |
4444
git fetch
4545
# Checkout the commit with the DualVerifier contract to test FFLONK interface
46-
git checkout b4d5b984
46+
git checkout b68a01afa494fbb2fe85c954f0afe0d36ef589ca
4747
git submodule update --init --recursive
4848
git rev-parse HEAD
4949
50+
- name: Set new genesis for fflonk
51+
# Note, that while `Verifier` is not explicitly a part of the genensis state,
52+
# it affects it indirectly as it is a part of the repo.
53+
working-directory: ./etc/env/file_based
54+
if: matrix.compressor-mode == 'fflonk'
55+
run: |
56+
sudo sed -i 's/^genesis_root: .*/genesis_root: 0xc2cbb3df06a08ba40810e07848d6522f5def60d9206b3638ee60d72cd9fac83c/' genesis.yaml
57+
sudo sed -i "s/^genesis_batch_commitment: .*/genesis_batch_commitment: 0x5edce2e6a07abbb54d71581905b8fa3d9b9ecafea9add94be3c1b8ae709e690a/" genesis.yaml
58+
5059
- name: Init
5160
run: |
5261
ci_run chmod -R +x ./bin

core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ impl ProveBatches {
5858
}
5959
};
6060

61+
let should_use_fflonk = !is_verifier_pre_fflonk || !protocol_version.is_pre_fflonk();
62+
6163
if protocol_version.is_pre_gateway() {
62-
let proof_input = if !is_verifier_pre_fflonk || !protocol_version.is_pre_fflonk() {
64+
let proof_input = if should_use_fflonk {
6365
Token::Tuple(vec![
6466
Token::Array(vec![verifier_type.into_token()]),
6567
Token::Array(proof.into_iter().map(Token::Uint).collect()),
@@ -73,7 +75,17 @@ impl ProveBatches {
7375

7476
vec![prev_l1_batch_info, batches_arg, proof_input]
7577
} else {
76-
let proof_input = Token::Array(proof.into_iter().map(Token::Uint).collect());
78+
let proof_input = if should_use_fflonk {
79+
Token::Array(
80+
vec![verifier_type]
81+
.into_iter()
82+
.chain(proof)
83+
.map(Token::Uint)
84+
.collect(),
85+
)
86+
} else {
87+
Token::Array(proof.into_iter().map(Token::Uint).collect())
88+
};
7789

7890
let encoded_data = encode(&[prev_l1_batch_info, batches_arg, proof_input]);
7991
let prove_data = [[SUPPORTED_ENCODING_VERSION].to_vec(), encoded_data]

0 commit comments

Comments
 (0)