diff --git a/crates/blockifier/resources/versioned_constants.json b/crates/blockifier/resources/versioned_constants.json index 4020e8d97d..eb47536907 100644 --- a/crates/blockifier/resources/versioned_constants.json +++ b/crates/blockifier/resources/versioned_constants.json @@ -194,7 +194,7 @@ "os_resources": { "execute_syscalls": { "CallContract": { - "n_steps": 827, + "n_steps": 860, "builtin_instance_counter": { "range_check_builtin": 15 }, @@ -215,7 +215,7 @@ "n_memory_holes": 0 }, "Deploy": { - "n_steps": 1099, + "n_steps": 1128, "builtin_instance_counter": { "pedersen_builtin": 7, "range_check_builtin": 18 @@ -294,7 +294,7 @@ "n_memory_holes": 0 }, "LibraryCall": { - "n_steps": 818, + "n_steps": 836, "builtin_instance_counter": { "range_check_builtin": 15 }, @@ -308,7 +308,7 @@ "n_memory_holes": 0 }, "ReplaceClass": { - "n_steps": 98, + "n_steps": 104, "builtin_instance_counter": { "range_check_builtin": 1 }, @@ -400,14 +400,14 @@ "n_memory_holes": 0 }, "StorageRead": { - "n_steps": 87, + "n_steps": 89, "builtin_instance_counter": { "range_check_builtin": 1 }, "n_memory_holes": 0 }, "StorageWrite": { - "n_steps": 89, + "n_steps": 93, "builtin_instance_counter": { "range_check_builtin": 1 }, @@ -418,7 +418,7 @@ "Declare": { "deprecated_resources": { "constant": { - "n_steps": 3099, + "n_steps": 3161, "builtin_instance_counter": { "pedersen_builtin": 16, "range_check_builtin": 56, @@ -434,10 +434,10 @@ }, "resources": { "constant": { - "n_steps": 3231, + "n_steps": 3254, "builtin_instance_counter": { "pedersen_builtin": 4, - "range_check_builtin": 64, + "range_check_builtin": 61, "poseidon_builtin": 14 }, "n_memory_holes": 0 @@ -452,7 +452,7 @@ "DeployAccount": { "deprecated_resources": { "constant": { - "n_steps": 4020, + "n_steps": 4114, "builtin_instance_counter": { "pedersen_builtin": 23, "range_check_builtin": 72 @@ -469,10 +469,10 @@ }, "resources": { "constant": { - "n_steps": 4169, + "n_steps": 4224, "builtin_instance_counter": { "pedersen_builtin": 11, - "range_check_builtin": 80, + "range_check_builtin": 77, "poseidon_builtin": 10 }, "n_memory_holes": 0 @@ -489,7 +489,7 @@ "InvokeFunction": { "deprecated_resources": { "constant": { - "n_steps": 3769, + "n_steps": 3854, "builtin_instance_counter": { "pedersen_builtin": 14, "range_check_builtin": 69 @@ -506,10 +506,10 @@ }, "resources": { "constant": { - "n_steps": 3942, + "n_steps": 3988, "builtin_instance_counter": { "pedersen_builtin": 4, - "range_check_builtin": 77, + "range_check_builtin": 74, "poseidon_builtin": 11 }, "n_memory_holes": 0 @@ -526,7 +526,7 @@ "L1Handler": { "deprecated_resources": { "constant": { - "n_steps": 1234, + "n_steps": 1257, "builtin_instance_counter": { "pedersen_builtin": 11, "range_check_builtin": 16 @@ -616,4 +616,4 @@ 100 ] } -} \ No newline at end of file +} diff --git a/crates/blockifier/src/transaction/account_transactions_test.rs b/crates/blockifier/src/transaction/account_transactions_test.rs index 82faa7eaca..2cf0603012 100644 --- a/crates/blockifier/src/transaction/account_transactions_test.rs +++ b/crates/blockifier/src/transaction/account_transactions_test.rs @@ -110,7 +110,7 @@ fn test_circuit(block_context: BlockContext, max_resource_bounds: DeprecatedReso .unwrap(); assert!(tx_execution_info.revert_error.is_none()); - assert_eq!(tx_execution_info.receipt.gas, GasVector::from_l1_gas(6688)); + assert_eq!(tx_execution_info.receipt.gas, GasVector::from_l1_gas(6806)); } #[rstest] @@ -152,7 +152,7 @@ fn test_rc96_holes( [&BuiltinName::range_check96], 24 ); - assert_eq!(tx_execution_info.receipt.gas, GasVector::from_l1_gas(6604)); + assert_eq!(tx_execution_info.receipt.gas, GasVector::from_l1_gas(6722)); } #[rstest] @@ -292,7 +292,7 @@ fn test_infinite_recursion( max_resource_bounds: DeprecatedResourceBoundsMapping, ) { // Limit the number of execution steps (so we quickly hit the limit). - block_context.versioned_constants.invoke_tx_max_n_steps = 4100; + block_context.versioned_constants.invoke_tx_max_n_steps = 4200; let TestInitData { mut state, account_address, contract_address, mut nonce_manager } = create_test_init_data(&block_context.chain_info, CairoVersion::Cairo0); @@ -702,7 +702,7 @@ fn test_reverted_reach_steps_limit( create_test_init_data(&block_context.chain_info, cairo_version); // Limit the number of execution steps (so we quickly hit the limit). - block_context.versioned_constants.invoke_tx_max_n_steps = 5000; + block_context.versioned_constants.invoke_tx_max_n_steps = 6000; let recursion_base_args = invoke_tx_args! { max_fee, resource_bounds: max_resource_bounds, @@ -771,6 +771,8 @@ fn test_reverted_reach_steps_limit( // Make sure that the failed transaction gets charged for the extra steps taken, compared with // the smaller valid transaction. + + // If this fail, try to increase the `invoke_tx_max_n_steps` above. assert!(n_steps_fail > n_steps_1); assert!(actual_fee_fail > actual_fee_1); diff --git a/crates/blockifier/src/transaction/transactions_test.rs b/crates/blockifier/src/transaction/transactions_test.rs index f52e744438..e151866b95 100644 --- a/crates/blockifier/src/transaction/transactions_test.rs +++ b/crates/blockifier/src/transaction/transactions_test.rs @@ -1857,7 +1857,7 @@ fn test_l1_handler(#[values(false, true)] use_kzg_da: bool) { ..Default::default() }, resources: ExecutionResources { - n_steps: 154, + n_steps: 158, n_memory_holes: 0, builtin_instance_counter: HashMap::from([(BuiltinName::range_check, 6)]), }, @@ -1893,7 +1893,7 @@ fn test_l1_handler(#[values(false, true)] use_kzg_da: bool) { + 6, ), ]), - n_steps: get_tx_resources(TransactionType::L1Handler).n_steps + 167, + n_steps: get_tx_resources(TransactionType::L1Handler).n_steps + 171, n_memory_holes: 0, };