Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(blockifier): remove stacker #3264

Open
wants to merge 1 commit into
base: main-v0.13.4
Choose a base branch
from
Open
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
23 changes: 0 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ serde_yaml = "0.9.16"
sha2 = "0.10.8"
sha3 = "0.10.8"
simple_logger = "4.0.0"
stacker = "0.1.17"
starknet-core = "0.6.0"
starknet-crypto = "0.7.1"
starknet-types-core = "0.1.6"
Expand Down
3 changes: 1 addition & 2 deletions crates/blockifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = "The transaction-executing component in the Starknet sequencer."
workspace = true

[features]
cairo_native = ["dep:cairo-native", "dep:stacker", "starknet_sierra_compile/cairo_native"]
cairo_native = ["dep:cairo-native", "starknet_sierra_compile/cairo_native"]
jemalloc = ["dep:tikv-jemallocator"]
native_blockifier = []
reexecution = ["transaction_serde"]
Expand Down Expand Up @@ -50,7 +50,6 @@ semver.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["arbitrary_precision"] }
sha2.workspace = true
stacker = { workspace = true, optional = true }
starknet-types-core.workspace = true
starknet_api.workspace = true
starknet_infra_utils.workspace = true
Expand Down
14 changes: 7 additions & 7 deletions crates/blockifier/src/execution/execution_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ pub fn execute_entry_point_call(
context,
)
} else {
log::debug!(
"Using Cairo Native execution. Block Number: {}, Transaction Hash: {}, Class \
Hash: {}.",
context.tx_context.block_context.block_info.block_number,
context.tx_context.tx_info.transaction_hash(),
call.class_hash.expect("Missing Class Hash")
);
// log::debug!(
// "Using Cairo Native execution. Block Number: {}, Transaction Hash: {}, Class
// \ Hash: {}.",
// context.tx_context.block_context.block_info.block_number,
// context.tx_context.tx_info.transaction_hash(),
// call.class_hash.expect("Missing Class Hash")
// );
native_entry_point_execution::execute_entry_point_call(
call,
compiled_class,
Expand Down
17 changes: 7 additions & 10 deletions crates/blockifier/src/execution/native/entry_point_execution.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use cairo_native::execution_result::ContractExecutionResult;
use cairo_native::utils::BuiltinCosts;
use num_rational::Ratio;
use stacker;

use crate::execution::call_info::{CallExecution, CallInfo, Retdata};
use crate::execution::contract_class::TrackedResource;
Expand Down Expand Up @@ -81,15 +80,13 @@ pub fn execute_entry_point_call(
.unwrap_or_else(|e| panic!("Failed to convert stack size red zone to usize: {}", e));
// Use `maybe_grow` and not `grow` for performance, since in happy flows, only the main call
// should trigger the growth.
let execution_result = stacker::maybe_grow(stack_size_red_zone, target_stack_size, || {
compiled_class.executor.run(
entry_point.selector.0,
&syscall_handler.base.call.calldata.0.clone(),
call_initial_gas,
Some(builtin_costs),
&mut syscall_handler,
)
});
let execution_result = compiled_class.executor.run(
entry_point.selector.0,
&syscall_handler.base.call.calldata.0.clone(),
call_initial_gas,
Some(builtin_costs),
&mut syscall_handler,
);
syscall_handler.finalize();

let call_result = execution_result.map_err(EntryPointExecutionError::NativeUnexpectedError)?;
Expand Down
Loading