Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Fixed basic test #41

Merged
merged 9 commits into from
Nov 3, 2023
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
1 change: 1 addition & 0 deletions circuit_definitions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ zk_evm = {git = "https://github.com/matter-labs/era-zk_evm.git", branch = "v1.4.
derivative = "*"
serde = {version = "1", features = ["derive"]}
crossbeam = "0.8"
seq-macro = "0.3.5"

[features]
default = []
Expand Down
2 changes: 2 additions & 0 deletions src/compute_setups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,14 @@ mod test {

#[test]
fn test_run_create_base_layer_vks_and_proofs() {
LocalFileDataSource::create_folders_for_storing_data();
let mut source = LocalFileDataSource;
generate_base_layer_vks_and_proofs(&mut source).expect("must compute setup");
}

#[test]
fn test_run_create_recursion_layer_vks_and_proofs() {
LocalFileDataSource::create_folders_for_storing_data();
let mut source = LocalFileDataSource;
generate_recursive_layer_vks_and_proofs(&mut source).expect("must compute setup");
}
Expand Down
28 changes: 24 additions & 4 deletions src/data_source/in_memory_data_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ impl SetupDataSource for InMemoryDataSource {
}

fn get_recursion_layer_node_vk(&self) -> SourceResult<ZkSyncRecursionLayerVerificationKey> {
Ok(self.recursion_layer_node_vk.clone().unwrap())
self.recursion_layer_node_vk
.clone()
.ok_or(Box::new(Error::new(
ErrorKind::Other,
format!("no data for recursion layer node vk"),
)))
}

fn get_recursion_layer_padding_proof(
Expand Down Expand Up @@ -152,17 +157,32 @@ impl SetupDataSource for InMemoryDataSource {
}

fn get_recursion_layer_leaf_padding_proof(&self) -> SourceResult<ZkSyncRecursionLayerProof> {
Ok(self.recursion_layer_leaf_padding_proof.clone().unwrap())
self.recursion_layer_leaf_padding_proof
.clone()
.ok_or(Box::new(Error::new(
ErrorKind::Other,
format!("no data for recursion layer node vk"),
)))
}

fn get_recursion_layer_node_padding_proof(&self) -> SourceResult<ZkSyncRecursionLayerProof> {
Ok(self.recursion_layer_node_padding_proof.clone().unwrap())
self.recursion_layer_node_padding_proof
.clone()
.ok_or(Box::new(Error::new(
ErrorKind::Other,
format!("no data for recursion layer node vk"),
)))
}

fn get_recursion_layer_node_finalization_hint(
&self,
) -> SourceResult<ZkSyncRecursionLayerFinalizationHint> {
Ok(self.recursion_layer_node_finalization_hint.clone().unwrap())
self.recursion_layer_node_finalization_hint
.clone()
.ok_or(Box::new(Error::new(
ErrorKind::Other,
format!("no data for recursion layer node vk"),
)))
}

fn get_compression_vk(
Expand Down
Loading
Loading