From 064540dc32fbf40ea260c3db2f3edc7d273359df Mon Sep 17 00:00:00 2001 From: Aner Ben Efraim Date: Thu, 28 Nov 2024 15:55:28 +0200 Subject: [PATCH] chore(blockifier): add global max_sierra_gas to versioned constants --- crates/blockifier/resources/versioned_constants_0_13_0.json | 2 ++ crates/blockifier/resources/versioned_constants_0_13_1.json | 2 ++ crates/blockifier/resources/versioned_constants_0_13_1_1.json | 2 ++ crates/blockifier/resources/versioned_constants_0_13_2.json | 2 ++ crates/blockifier/resources/versioned_constants_0_13_2_1.json | 2 ++ crates/blockifier/resources/versioned_constants_0_13_3.json | 2 ++ crates/blockifier/resources/versioned_constants_0_13_4.json | 2 ++ crates/blockifier/src/versioned_constants.rs | 2 ++ 8 files changed, 16 insertions(+) diff --git a/crates/blockifier/resources/versioned_constants_0_13_0.json b/crates/blockifier/resources/versioned_constants_0_13_0.json index 6f52d6cb438..ba7e4402f27 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_0.json +++ b/crates/blockifier/resources/versioned_constants_0_13_0.json @@ -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, @@ -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": { diff --git a/crates/blockifier/resources/versioned_constants_0_13_1.json b/crates/blockifier/resources/versioned_constants_0_13_1.json index 1be6a8686f8..35ad6933306 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_1.json +++ b/crates/blockifier/resources/versioned_constants_0_13_1.json @@ -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, @@ -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": { diff --git a/crates/blockifier/resources/versioned_constants_0_13_1_1.json b/crates/blockifier/resources/versioned_constants_0_13_1_1.json index 782d3ca1307..fe8ac3d783f 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_1_1.json +++ b/crates/blockifier/resources/versioned_constants_0_13_1_1.json @@ -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, @@ -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": { diff --git a/crates/blockifier/resources/versioned_constants_0_13_2.json b/crates/blockifier/resources/versioned_constants_0_13_2.json index 86ab5aeb02b..bf403835faf 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_2.json +++ b/crates/blockifier/resources/versioned_constants_0_13_2.json @@ -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, @@ -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": { diff --git a/crates/blockifier/resources/versioned_constants_0_13_2_1.json b/crates/blockifier/resources/versioned_constants_0_13_2_1.json index 0b740a12059..8f89e1db9e0 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_2_1.json +++ b/crates/blockifier/resources/versioned_constants_0_13_2_1.json @@ -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, @@ -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": { diff --git a/crates/blockifier/resources/versioned_constants_0_13_3.json b/crates/blockifier/resources/versioned_constants_0_13_3.json index 0b740a12059..8f89e1db9e0 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_3.json +++ b/crates/blockifier/resources/versioned_constants_0_13_3.json @@ -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, @@ -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": { diff --git a/crates/blockifier/resources/versioned_constants_0_13_4.json b/crates/blockifier/resources/versioned_constants_0_13_4.json index 3c1703482bf..47e01c4689c 100644 --- a/crates/blockifier/resources/versioned_constants_0_13_4.json +++ b/crates/blockifier/resources/versioned_constants_0_13_4.json @@ -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, @@ -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": { diff --git a/crates/blockifier/src/versioned_constants.rs b/crates/blockifier/src/versioned_constants.rs index 0ce942652a2..2ec8fa629d5 100644 --- a/crates/blockifier/src/versioned_constants.rs +++ b/crates/blockifier/src/versioned_constants.rs @@ -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