Skip to content

Commit 332092a

Browse files
committed
blockifier_reexecution: merge rpc_state_reader into state_reader
1 parent 97c8376 commit 332092a

File tree

16 files changed

+231
-340
lines changed

16 files changed

+231
-340
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/blockifier_reexecution/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ cairo_native = ["blockifier/cairo_native"]
1414
apollo_compile_to_casm.workspace = true
1515
apollo_compile_to_casm_types.workspace = true
1616
apollo_config.workspace = true
17-
apollo_rpc.workspace = true
1817
apollo_rpc_execution.workspace = true
1918
apollo_sierra_compilation_config.workspace = true
2019
assert_matches.workspace = true

crates/blockifier_reexecution/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use starknet_api::block::GasPrice;
88
use starknet_api::StarknetApiError;
99
use thiserror::Error;
1010

11-
use crate::rpc_state_reader::rpc_objects::{RpcErrorCode, RpcErrorResponse};
11+
use crate::state_reader::rpc_objects::{RpcErrorCode, RpcErrorResponse};
1212

1313
#[derive(Debug, Error)]
1414
pub enum RPCStateReaderError {

crates/blockifier_reexecution/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
pub mod cli;
22
pub mod compile;
33
pub mod errors;
4-
pub mod rpc_state_reader;
54
pub mod serde_utils;
65
pub mod state_reader;
76
pub mod utils;
@@ -12,10 +11,10 @@ use blockifier::context::BlockContext;
1211
use blockifier::state::cached_state::StateMaps;
1312
use blockifier::state::contract_class_manager::ContractClassManager;
1413
use errors::ReexecutionResult;
15-
use rpc_state_reader::config::RpcStateReaderConfig;
1614
use starknet_api::block::BlockNumber;
1715
use starknet_api::core::ChainId;
1816
use starknet_api::transaction::Transaction;
17+
use state_reader::config::RpcStateReaderConfig;
1918
use state_reader::rpc_state_reader::ConsecutiveRpcStateReaders;
2019

2120
/// Executes a single transaction at the given block number using the RPC state reader.

crates/blockifier_reexecution/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use blockifier_reexecution::cli::{
1010
TransactionInput,
1111
FULL_RESOURCES_DIR,
1212
};
13-
use blockifier_reexecution::rpc_state_reader::config::RpcStateReaderConfig;
13+
use blockifier_reexecution::state_reader::config::RpcStateReaderConfig;
1414
use blockifier_reexecution::state_reader::offline_state_reader::OfflineConsecutiveStateReaders;
1515
use blockifier_reexecution::state_reader::reexecution_state_reader::ConsecutiveReexecutionStateReaders;
1616
use blockifier_reexecution::state_reader::rpc_state_reader::ConsecutiveRpcStateReaders;

crates/blockifier_reexecution/src/rpc_state_reader/mod.rs

Lines changed: 0 additions & 6 deletions
This file was deleted.

crates/blockifier_reexecution/src/rpc_state_reader/rpc_state_reader.rs

Lines changed: 0 additions & 164 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
pub mod config;
12
pub mod offline_state_reader;
23
#[cfg(test)]
34
mod offline_state_reader_test;
45
#[cfg(test)]
56
mod raw_rpc_json_test;
67
pub mod reexecution_state_reader;
8+
pub mod rpc_objects;
79
pub mod rpc_state_reader;
10+
#[cfg(test)]
11+
mod rpc_state_reader_basic_test;
812
#[cfg(all(test, feature = "blockifier_regression_https_testing"))]
913
mod rpc_state_reader_test;

crates/blockifier_reexecution/src/rpc_state_reader/config.rs renamed to crates/blockifier_reexecution/src/state_reader/config.rs

File renamed without changes.

crates/blockifier_reexecution/src/state_reader/raw_rpc_json_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use starknet_api::{class_hash, compiled_class_hash, contract_address, felt, nonc
1616
use starknet_core::types::ContractClass;
1717

1818
use crate::compile::legacy_to_contract_class_v0;
19-
use crate::rpc_state_reader::rpc_objects::BlockHeader;
2019
use crate::serde_utils::deserialize_transaction_json_to_starknet_api_tx;
20+
use crate::state_reader::rpc_objects::BlockHeader;
2121

2222
#[fixture]
2323
fn block_header() -> BlockHeader {

0 commit comments

Comments
 (0)