Skip to content

Commit

Permalink
Set KECCAK_ROW=50 when init batch-prover.
Browse files Browse the repository at this point in the history
  • Loading branch information
silathdiir committed Sep 7, 2023
1 parent ddc94a0 commit 5b94df9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions prover/src/aggregator/prover.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use crate::{
common,
config::{LayerId, AGG_DEGREES},
consts::{AGG_VK_FILENAME, CHUNK_PROTOCOL_FILENAME},
consts::{AGG_KECCAK_ROW, AGG_VK_FILENAME, CHUNK_PROTOCOL_FILENAME},
io::{force_to_read, try_to_read},
BatchProof, ChunkProof,
};
use aggregator::{ChunkHash, MAX_AGG_SNARKS};
use anyhow::{bail, Result};
use sha2::{Digest, Sha256};
use snark_verifier_sdk::Snark;
use std::iter::repeat;
use std::{env, iter::repeat};

#[derive(Debug)]
pub struct Prover {
Expand All @@ -21,6 +21,8 @@ pub struct Prover {

impl Prover {
pub fn from_dirs(params_dir: &str, assets_dir: &str) -> Self {
env::set_var("KECCAK_ROW", AGG_KECCAK_ROW.to_string());

let inner = common::Prover::from_params_dir(params_dir, &AGG_DEGREES);
let chunk_protocol = force_to_read(assets_dir, &CHUNK_PROTOCOL_FILENAME);

Expand Down
1 change: 1 addition & 0 deletions prover/src/consts.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::utils::read_env_var;
use once_cell::sync::Lazy;

pub static AGG_KECCAK_ROW: Lazy<usize> = Lazy::new(|| read_env_var("AGG_KECCAK_ROW", 50));
pub static AGG_VK_FILENAME: Lazy<String> =
Lazy::new(|| read_env_var("AGG_VK_FILENAME", "agg_vk.vkey".to_string()));
pub static CHUNK_PROTOCOL_FILENAME: Lazy<String> =
Expand Down
2 changes: 0 additions & 2 deletions prover/tests/batch_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use std::env;
#[cfg(feature = "prove_verify")]
#[test]
fn test_batch_prove_verify() {
env::set_var("KECCAK_ROW", "50");

let output_dir = init_env_and_log("batch_tests");
log::info!("Initialized ENV and created output-dir {output_dir}");

Expand Down

0 comments on commit 5b94df9

Please sign in to comment.