Skip to content

Commit

Permalink
test(blockifier_reexecution): reexecution test on blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
aner-starkware committed Nov 6, 2024
1 parent c959287 commit 41381bb
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use starknet_gateway::rpc_objects::BlockHeader;

use crate::state_reader::compile::legacy_to_contract_class_v0;
use crate::state_reader::serde_utils::deserialize_transaction_json_to_starknet_api_tx;
use crate::state_reader::utils::ReexecutionStateMaps;
use crate::state_reader::utils::{reexecute_block_for_testing, ReexecutionStateMaps};

#[fixture]
fn block_header() -> BlockHeader {
Expand Down Expand Up @@ -152,3 +152,18 @@ fn serialize_state_maps() {
assert_eq!(serializable_state_maps, deserialized_state_maps);
assert_eq!(original_state_maps, deserialized_state_maps.try_into().unwrap());
}

#[rstest]
// TODO(Aner): Add block for each starknet version and for declare, deploy, replace_class, etc.
#[case::v_0_13_0(600001)]
#[case::v_0_13_1(620978)]
#[case::v_0_13_1_1(649367)]
#[case::v_0_13_2(685878)]
#[case::v_0_13_2_1(700000)]
#[case::v_0_13_2_1(750000)]
#[case::invoke_with_deploy(870136)]
#[case::invoke_with_replace_class(780008)]
#[ignore = "Requires downloading JSON files prior to running; Long test, run with --release flag."]
fn test_block_reexecution(#[case] block_number: u64) {
reexecute_block_for_testing(block_number);
}

0 comments on commit 41381bb

Please sign in to comment.