Skip to content

Commit

Permalink
chore(blockifier): add global max_sierra_gas to versioned constants
Browse files Browse the repository at this point in the history
  • Loading branch information
aner-starkware committed Dec 1, 2024
1 parent 822f957 commit b643703
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"max_contract_bytecode_size": 61440
},
"invoke_tx_max_n_steps": 3000000,
"execute_max_sierra_gas": 10000000000,
"max_recursion_depth": 50,
"segment_arena_cells": true,
"disable_cairo0_redeclaration": false,
Expand Down Expand Up @@ -558,6 +559,7 @@
}
},
"validate_max_n_steps": 1000000,
"validate_max_sierra_gas": 10000000000,
"min_compiler_version_for_sierra_gas": "2.8.0",
"vm_resource_fee_cost": {
"builtins": {
Expand Down
2 changes: 2 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"max_contract_bytecode_size": 81920
},
"invoke_tx_max_n_steps": 4000000,
"execute_max_sierra_gas": 10000000000,
"deprecated_l2_resource_gas_costs": {
"gas_per_data_felt": [
128,
Expand Down Expand Up @@ -594,6 +595,7 @@
}
},
"validate_max_n_steps": 1000000,
"validate_max_sierra_gas": 10000000000,
"min_compiler_version_for_sierra_gas": "2.8.0",
"vm_resource_fee_cost": {
"builtins": {
Expand Down
2 changes: 2 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 @@ -9,6 +9,7 @@
"max_contract_bytecode_size": 81920
},
"invoke_tx_max_n_steps": 4000000,
"execute_max_sierra_gas": 10000000000,
"deprecated_l2_resource_gas_costs": {
"gas_per_data_felt": [
128,
Expand Down Expand Up @@ -594,6 +595,7 @@
}
},
"validate_max_n_steps": 1000000,
"validate_max_sierra_gas": 10000000000,
"min_compiler_version_for_sierra_gas": "2.8.0",
"vm_resource_fee_cost": {
"builtins": {
Expand Down
2 changes: 2 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"max_contract_bytecode_size": 81920
},
"invoke_tx_max_n_steps": 10000000,
"execute_max_sierra_gas": 10000000000,
"deprecated_l2_resource_gas_costs": {
"gas_per_data_felt": [
128,
Expand Down Expand Up @@ -600,6 +601,7 @@
}
},
"validate_max_n_steps": 1000000,
"validate_max_sierra_gas": 10000000000,
"min_compiler_version_for_sierra_gas": "2.8.0",
"vm_resource_fee_cost": {
"builtins": {
Expand Down
2 changes: 2 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 @@ -9,6 +9,7 @@
"max_contract_bytecode_size": 81920
},
"invoke_tx_max_n_steps": 10000000,
"execute_max_sierra_gas": 10000000000,
"deprecated_l2_resource_gas_costs": {
"gas_per_data_felt": [
128,
Expand Down Expand Up @@ -600,6 +601,7 @@
}
},
"validate_max_n_steps": 1000000,
"validate_max_sierra_gas": 10000000000,
"min_compiler_version_for_sierra_gas": "2.8.0",
"vm_resource_fee_cost": {
"builtins": {
Expand Down
2 changes: 2 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"max_contract_bytecode_size": 81920
},
"invoke_tx_max_n_steps": 10000000,
"execute_max_sierra_gas": 10000000000,
"deprecated_l2_resource_gas_costs": {
"gas_per_data_felt": [
128,
Expand Down Expand Up @@ -600,6 +601,7 @@
}
},
"validate_max_n_steps": 1000000,
"validate_max_sierra_gas": 10000000000,
"min_compiler_version_for_sierra_gas": "2.8.0",
"vm_resource_fee_cost": {
"builtins": {
Expand Down
2 changes: 2 additions & 0 deletions crates/blockifier/resources/versioned_constants_0_13_4.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"max_contract_bytecode_size": 81920
},
"invoke_tx_max_n_steps": 10000000,
"execute_max_sierra_gas": 1000000000,
"deprecated_l2_resource_gas_costs": {
"gas_per_data_felt": [
128,
Expand Down Expand Up @@ -605,6 +606,7 @@
}
},
"validate_max_n_steps": 1000000,
"validate_max_sierra_gas": 100000000,
"min_compiler_version_for_sierra_gas": "2.8.0",
"vm_resource_fee_cost": {
"builtins": {
Expand Down
2 changes: 2 additions & 0 deletions crates/blockifier/src/versioned_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,12 @@ pub struct VersionedConstants {
// Limits.
pub tx_event_limits: EventLimits,
pub invoke_tx_max_n_steps: u32,
pub execute_max_sierra_gas: GasAmount,
pub deprecated_l2_resource_gas_costs: ArchivalDataGasCosts,
pub archival_data_gas_costs: ArchivalDataGasCosts,
pub max_recursion_depth: usize,
pub validate_max_n_steps: u32,
pub validate_max_sierra_gas: GasAmount,
pub min_compiler_version_for_sierra_gas: CompilerVersion,
// BACKWARD COMPATIBILITY: If true, the segment_arena builtin instance counter will be
// multiplied by 3. This offsets a bug in the old vm where the counter counted the number of
Expand Down

0 comments on commit b643703

Please sign in to comment.