Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix prove e2e #3460

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading