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

feat(blockifier): add allocation cost versioned constant #2200

Merged
merged 1 commit into from
Nov 26, 2024
Merged
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
5 changes: 5 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"segment_arena_cells": true,
"disable_cairo0_redeclaration": false,
"enable_stateful_compression": false,
"allocation_cost": {
"l1_gas": 0,
"l1_data_gas": 0,
"l2_gas": 0
},
"ignore_inner_event_resources": false,
"enable_reverts": false,
"tx_event_limits": {
Expand Down
5 changes: 5 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
"segment_arena_cells": true,
"disable_cairo0_redeclaration": false,
"enable_stateful_compression": false,
"allocation_cost": {
"l1_gas": 0,
"l1_data_gas": 0,
"l2_gas": 0
},
"ignore_inner_event_resources": true,
"enable_reverts": false,
"os_constants": {
Expand Down
5 changes: 5 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_1_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
"segment_arena_cells": true,
"disable_cairo0_redeclaration": false,
"enable_stateful_compression": false,
"allocation_cost": {
"l1_gas": 0,
"l1_data_gas": 0,
"l2_gas": 0
},
"ignore_inner_event_resources": false,
"enable_reverts": false,
"os_constants": {
Expand Down
5 changes: 5 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
},
"disable_cairo0_redeclaration": true,
"enable_stateful_compression": false,
"allocation_cost": {
"l1_gas": 0,
"l1_data_gas": 0,
"l2_gas": 0
},
"ignore_inner_event_resources": false,
"enable_reverts": false,
"max_recursion_depth": 50,
Expand Down
5 changes: 5 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_2_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
},
"disable_cairo0_redeclaration": true,
"enable_stateful_compression": false,
"allocation_cost": {
"l1_gas": 0,
"l1_data_gas": 0,
"l2_gas": 0
},
"ignore_inner_event_resources": false,
"max_recursion_depth": 50,
"enable_reverts": false,
Expand Down
5 changes: 5 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
},
"disable_cairo0_redeclaration": true,
"enable_stateful_compression": false,
"allocation_cost": {
"l1_gas": 0,
"l1_data_gas": 0,
"l2_gas": 0
},
"ignore_inner_event_resources": false,
"max_recursion_depth": 50,
"enable_reverts": false,
Expand Down
5 changes: 5 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_4.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
},
"disable_cairo0_redeclaration": true,
"enable_stateful_compression": true,
"allocation_cost": {
"l1_gas": 0,
"l1_data_gas": 32,
"l2_gas": 0
},
"ignore_inner_event_resources": false,
"enable_reverts": true,
"max_recursion_depth": 50,
Expand Down
4 changes: 3 additions & 1 deletion crates/blockifier/src/versioned_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use serde::de::Error as DeserializationError;
use serde::{Deserialize, Deserializer, Serialize};
use serde_json::{Map, Number, Value};
use starknet_api::block::{GasPrice, StarknetVersion};
use starknet_api::execution_resources::GasAmount;
use starknet_api::execution_resources::{GasAmount, GasVector};
use starknet_api::transaction::fields::GasVectorComputationMode;
use strum::IntoEnumIterator;
use thiserror::Error;
Expand Down Expand Up @@ -185,6 +185,8 @@ pub struct VersionedConstants {

// Fee related.
pub(crate) vm_resource_fee_cost: Arc<VmResourceCosts>,
// Cost of allocating a storage cell.
pub allocation_cost: GasVector,

// Resources.
os_resources: Arc<OsResources>,
Expand Down
Loading