Skip to content

Commit

Permalink
refactor(blockifier): os resource bounds fix by python script
Browse files Browse the repository at this point in the history
  • Loading branch information
AvivYossef-starkware committed Sep 2, 2024
1 parent 5c782b6 commit 23e7d41
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
31 changes: 15 additions & 16 deletions crates/blockifier/resources/versioned_constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"entry_point_gas_cost": 1,
"step_gas_cost": 827,
"range_check_gas_cost": 15

},
"constructor_entry_point_selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",
"default_entry_point_selector": 0,
Expand Down Expand Up @@ -68,7 +67,6 @@
"get_block_hash_gas_cost": {
"step_gas_cost": 104,
"range_check_gas_cost": 2

},
"get_execution_info_gas_cost": {
"step_gas_cost": 100,
Expand Down Expand Up @@ -217,7 +215,7 @@
"n_memory_holes": 0
},
"Deploy": {
"n_steps": 1097,
"n_steps": 1099,
"builtin_instance_counter": {
"pedersen_builtin": 7,
"range_check_builtin": 18
Expand Down Expand Up @@ -420,10 +418,11 @@
"Declare": {
"deprecated_resources": {
"constant": {
"n_steps": 2973,
"n_steps": 3099,
"builtin_instance_counter": {
"pedersen_builtin": 16,
"range_check_builtin": 53
"range_check_builtin": 56,
"poseidon_builtin": 4
},
"n_memory_holes": 0
},
Expand All @@ -435,11 +434,11 @@
},
"resources": {
"constant": {
"n_steps": 3079,
"n_steps": 3231,
"builtin_instance_counter": {
"pedersen_builtin": 4,
"range_check_builtin": 58,
"poseidon_builtin": 10
"range_check_builtin": 64,
"poseidon_builtin": 14
},
"n_memory_holes": 0
},
Expand All @@ -453,7 +452,7 @@
"DeployAccount": {
"deprecated_resources": {
"constant": {
"n_steps": 4015,
"n_steps": 4020,
"builtin_instance_counter": {
"pedersen_builtin": 23,
"range_check_builtin": 72
Expand All @@ -470,10 +469,10 @@
},
"resources": {
"constant": {
"n_steps": 4137,
"n_steps": 4169,
"builtin_instance_counter": {
"pedersen_builtin": 11,
"range_check_builtin": 77,
"range_check_builtin": 80,
"poseidon_builtin": 10
},
"n_memory_holes": 0
Expand All @@ -490,7 +489,7 @@
"InvokeFunction": {
"deprecated_resources": {
"constant": {
"n_steps": 3763,
"n_steps": 3769,
"builtin_instance_counter": {
"pedersen_builtin": 14,
"range_check_builtin": 69
Expand All @@ -507,10 +506,10 @@
},
"resources": {
"constant": {
"n_steps": 3904,
"n_steps": 3942,
"builtin_instance_counter": {
"pedersen_builtin": 4,
"range_check_builtin": 74,
"range_check_builtin": 77,
"poseidon_builtin": 11
},
"n_memory_holes": 0
Expand All @@ -527,7 +526,7 @@
"L1Handler": {
"deprecated_resources": {
"constant": {
"n_steps": 1233,
"n_steps": 1234,
"builtin_instance_counter": {
"pedersen_builtin": 11,
"range_check_builtin": 16
Expand Down Expand Up @@ -617,4 +616,4 @@
100
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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(6682));
assert_eq!(tx_execution_info.receipt.gas, GasVector::from_l1_gas(6688));
}

#[rstest]
Expand Down Expand Up @@ -152,7 +152,7 @@ fn test_rc96_holes(
[&BuiltinName::range_check96],
24
);
assert_eq!(tx_execution_info.receipt.gas, GasVector::from_l1_gas(6598));
assert_eq!(tx_execution_info.receipt.gas, GasVector::from_l1_gas(6604));
}

#[rstest]
Expand Down

0 comments on commit 23e7d41

Please sign in to comment.