Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 5b94df9

Browse files
committed
Set KECCAK_ROW=50 when init batch-prover.
1 parent ddc94a0 commit 5b94df9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

prover/src/aggregator/prover.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use crate::{
22
common,
33
config::{LayerId, AGG_DEGREES},
4-
consts::{AGG_VK_FILENAME, CHUNK_PROTOCOL_FILENAME},
4+
consts::{AGG_KECCAK_ROW, AGG_VK_FILENAME, CHUNK_PROTOCOL_FILENAME},
55
io::{force_to_read, try_to_read},
66
BatchProof, ChunkProof,
77
};
88
use aggregator::{ChunkHash, MAX_AGG_SNARKS};
99
use anyhow::{bail, Result};
1010
use sha2::{Digest, Sha256};
1111
use snark_verifier_sdk::Snark;
12-
use std::iter::repeat;
12+
use std::{env, iter::repeat};
1313

1414
#[derive(Debug)]
1515
pub struct Prover {
@@ -21,6 +21,8 @@ pub struct Prover {
2121

2222
impl Prover {
2323
pub fn from_dirs(params_dir: &str, assets_dir: &str) -> Self {
24+
env::set_var("KECCAK_ROW", AGG_KECCAK_ROW.to_string());
25+
2426
let inner = common::Prover::from_params_dir(params_dir, &AGG_DEGREES);
2527
let chunk_protocol = force_to_read(assets_dir, &CHUNK_PROTOCOL_FILENAME);
2628

prover/src/consts.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::utils::read_env_var;
22
use once_cell::sync::Lazy;
33

4+
pub static AGG_KECCAK_ROW: Lazy<usize> = Lazy::new(|| read_env_var("AGG_KECCAK_ROW", 50));
45
pub static AGG_VK_FILENAME: Lazy<String> =
56
Lazy::new(|| read_env_var("AGG_VK_FILENAME", "agg_vk.vkey".to_string()));
67
pub static CHUNK_PROTOCOL_FILENAME: Lazy<String> =

prover/tests/batch_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ use std::env;
1111
#[cfg(feature = "prove_verify")]
1212
#[test]
1313
fn test_batch_prove_verify() {
14-
env::set_var("KECCAK_ROW", "50");
15-
1614
let output_dir = init_env_and_log("batch_tests");
1715
log::info!("Initialized ENV and created output-dir {output_dir}");
1816

0 commit comments

Comments
 (0)