Skip to content

Commit

Permalink
fixed fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
matzayonc committed Oct 16, 2024
1 parent 1c632ff commit 79a6553
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/bin/prove_block/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ use starknet_os::error::SnOsError::{self};
use starknet_os::execution::helper::{ContractStorageMap, ExecutionHelperWrapper};
use starknet_os::io::input::StarknetOsInput;
use starknet_os::io::output::StarknetOsOutput;
use starknet_os::run_os;
use starknet_os::starknet::business_logic::fact_state::contract_state_objects::ContractState;
use starknet_os::starknet::starknet_storage::CommitmentInfo;
use starknet_os::starkware_utils::commitment_tree::base_types::Height;
use starknet_os::starkware_utils::commitment_tree::errors::TreeError;
use starknet_os::starkware_utils::commitment_tree::patricia_tree::patricia_tree::PatriciaTree;
use starknet_os::{config, run_os};
use starknet_os_types::chain_id::chain_id_from_felt;
use starknet_os_types::error::ContractClassError;
use starknet_os_types::starknet_core_addons::LegacyContractDecompressionError;
Expand Down
11 changes: 7 additions & 4 deletions crates/bin/prove_block/tests/prove_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use cairo_vm::vm::runners::cairo_pie::CairoPie;
use prove_block::{debug_prove_error, prove_block};
use rstest::rstest;

pub const DEFAULT_COMPILED_OS: &[u8] = include_bytes!("../../../../build/os_latest.json");

// # These blocks verify the following issues:
// # * 76793: the first block that we managed to prove, only has a few invoke txs
// # * 76766 / 76775: additional basic blocks
Expand Down Expand Up @@ -61,10 +63,11 @@ use rstest::rstest;
#[tokio::test(flavor = "multi_thread")]
async fn test_prove_selected_blocks(#[case] block_number: u64) {
let endpoint = std::env::var("PATHFINDER_RPC_URL").expect("Missing PATHFINDER_RPC_URL in env");
let (snos_pie, _snos_output) = prove_block(block_number, &endpoint, LayoutName::all_cairo, true)
.await
.map_err(debug_prove_error)
.expect("OS generate Cairo PIE");
let (snos_pie, _snos_output) =
prove_block(DEFAULT_COMPILED_OS, block_number, &endpoint, LayoutName::all_cairo, true)
.await
.map_err(debug_prove_error)
.expect("OS generate Cairo PIE");
snos_pie.run_validity_checks().expect("Valid SNOS PIE");

if let Some(reference_pie_bytes) = get_reference_pie_bytes(block_number) {
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/l1_handler_txn_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ async fn l1_handler<F>(
tx_hash: Default::default(),
};
let txs = vec![l1_tx].into_iter().map(Into::into).collect();
let _result = execute_txs_and_run_os(crate::common::DEFAULT_COMPILED_OS,
let _result = execute_txs_and_run_os(
crate::common::DEFAULT_COMPILED_OS,
initial_state.cached_state,
block_context,
txs,
Expand Down

0 comments on commit 79a6553

Please sign in to comment.