Skip to content

Commit

Permalink
chore: Fix prove e2e (#3460)
Browse files Browse the repository at this point in the history
## 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`.
  • Loading branch information
StanislavBreadless authored Jan 11, 2025
1 parent 83a0f92 commit 9adc853
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci-prover-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand All @@ -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]
Expand Down

0 comments on commit 9adc853

Please sign in to comment.