Skip to content

Commit

Permalink
add test with reference PIEs
Browse files Browse the repository at this point in the history
  • Loading branch information
ftheirs committed Dec 30, 2024
1 parent 8b1aed8 commit 106b2a7
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 2 deletions.
Binary file removed crates/bin/prove_block/reference-pies/173404.zip
Binary file not shown.
Binary file not shown.
Binary file added crates/bin/prove_block/reference-pies/341101.zip
Binary file not shown.
Binary file added crates/bin/prove_block/reference-pies/355710.zip
Binary file not shown.
Binary file added crates/bin/prove_block/reference-pies/355783.zip
Binary file not shown.
Binary file added crates/bin/prove_block/reference-pies/355802.zip
Binary file not shown.
13 changes: 11 additions & 2 deletions crates/bin/prove_block/tests/prove_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const DEFAULT_COMPILED_OS: &[u8] = include_bytes!("../../../../build/os_latest.j
#[case::inconsistent_cairo0_class_hash_1(204936)]
#[case::no_possible_convertion_1(155007)]
#[case::no_possible_convertion_2(155029)]
// #[case::reference_pie_with_full_output_enabled(173404)]
#[case::inconsistent_cairo0_class_hash_2(159674)]
#[case::inconsistent_cairo0_class_hash_3(164180)]
#[case::key_not_in_proof_0(155087)]
Expand All @@ -72,6 +71,12 @@ const DEFAULT_COMPILED_OS: &[u8] = include_bytes!("../../../../build/os_latest.j
#[case::memory_invalid_signature(216914)]
#[case::diff_assert_values(218624)]
#[case::could_nt_compute_operand_op1(204337)]
// Reference pies for v0.13.3
#[case::reference_pie_with_full_output_enabled_00(341097)]
#[case::reference_pie_with_full_output_enabled_01(341101)]
#[case::reference_pie_with_full_output_enabled_02(355710)]
#[case::reference_pie_with_full_output_enabled_03(355783)]
#[case::reference_pie_with_full_output_enabled_04(355802)]
#[ignore = "Requires a running Pathfinder node"]
#[tokio::test(flavor = "multi_thread")]
async fn test_prove_selected_blocks(#[case] block_number: u64) {
Expand All @@ -98,7 +103,11 @@ async fn test_prove_selected_blocks(#[case] block_number: u64) {

fn get_reference_pie_bytes(block_number: u64) -> Option<Vec<u8>> {
match block_number {
173404 => Some(include_bytes!("../reference-pies/173404.zip").to_vec()),
341097 => Some(include_bytes!("../reference-pies/341097.zip").to_vec()),
341101 => Some(include_bytes!("../reference-pies/341101.zip").to_vec()),
355710 => Some(include_bytes!("../reference-pies/355710.zip").to_vec()),
355783 => Some(include_bytes!("../reference-pies/355783.zip").to_vec()),
355802 => Some(include_bytes!("../reference-pies/355802.zip").to_vec()),
_ => None,
}
}

0 comments on commit 106b2a7

Please sign in to comment.