Skip to content

Commit

Permalink
feat(blockifier): add allocation cost versioned constant
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavGrs committed Nov 25, 2024
1 parent aa0115b commit cf88e58
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 1 deletion.
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

0 comments on commit cf88e58

Please sign in to comment.