Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
chore: update costs (#2044)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyalesokhin-starkware authored Jul 7, 2024
1 parent ae0ae00 commit c90f11b
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 57 deletions.
78 changes: 39 additions & 39 deletions crates/blockifier/resources/versioned_constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@
"os_resources": {
"execute_syscalls": {
"CallContract": {
"n_steps": 690,
"n_steps": 827,
"builtin_instance_counter": {
"range_check_builtin": 12
"range_check_builtin": 15
},
"n_memory_holes": 0
},
Expand All @@ -204,10 +204,10 @@
"n_memory_holes": 0
},
"Deploy": {
"n_steps": 956,
"n_steps": 1097,
"builtin_instance_counter": {
"pedersen_builtin": 7,
"range_check_builtin": 15
"range_check_builtin": 18
},
"n_memory_holes": 0
},
Expand Down Expand Up @@ -282,18 +282,10 @@
},
"n_memory_holes": 0
},
"Sha256ProcessBlock": {
"builtin_instance_counter": {
"range_check_builtin": 65,
"bitwise_builtin": 1115
},
"n_memory_holes": 0,
"n_steps": 1852
},
"LibraryCall": {
"n_steps": 681,
"n_steps": 818,
"builtin_instance_counter": {
"range_check_builtin": 12
"range_check_builtin": 15
},
"n_memory_holes": 0
},
Expand All @@ -312,82 +304,90 @@
"n_memory_holes": 0
},
"Secp256k1Add": {
"n_steps": 408,
"n_steps": 410,
"builtin_instance_counter": {
"range_check_builtin": 29
},
"n_memory_holes": 0
},
"Secp256k1GetPointFromX": {
"n_steps": 393,
"n_steps": 395,
"builtin_instance_counter": {
"range_check_builtin": 30
},
"n_memory_holes": 0
},
"Secp256k1GetXy": {
"n_steps": 205,
"n_steps": 207,
"builtin_instance_counter": {
"range_check_builtin": 11
},
"n_memory_holes": 0
},
"Secp256k1Mul": {
"n_steps": 76503,
"n_steps": 76505,
"builtin_instance_counter": {
"range_check_builtin": 7045
},
"n_memory_holes": 0
},
"Secp256k1New": {
"n_steps": 459,
"n_steps": 461,
"builtin_instance_counter": {
"range_check_builtin": 35
},
"n_memory_holes": 0
},
"Secp256r1Add": {
"n_steps": 591,
"n_steps": 593,
"builtin_instance_counter": {
"range_check_builtin": 57
},
"n_memory_holes": 0
},
"Secp256r1GetPointFromX": {
"n_steps": 512,
"n_steps": 514,
"builtin_instance_counter": {
"range_check_builtin": 44
},
"n_memory_holes": 0
},
"Secp256r1GetXy": {
"n_steps": 207,
"n_steps": 209,
"builtin_instance_counter": {
"range_check_builtin": 11
},
"n_memory_holes": 0
},
"Secp256r1Mul": {
"n_steps": 125342,
"n_steps": 125344,
"builtin_instance_counter": {
"range_check_builtin": 13961
},
"n_memory_holes": 0
},
"Secp256r1New": {
"n_steps": 578,
"n_steps": 580,
"builtin_instance_counter": {
"range_check_builtin": 49
},
"n_memory_holes": 0
},
"SendMessageToL1": {
"n_steps": 139,
"n_steps": 141,
"builtin_instance_counter": {
"range_check_builtin": 1
},
"n_memory_holes": 0
},
"Sha256ProcessBlock": {
"n_steps": 1855,
"builtin_instance_counter": {
"range_check_builtin": 65,
"bitwise_builtin": 1115
},
"n_memory_holes": 0
},
"StorageRead": {
"n_steps": 87,
"builtin_instance_counter": {
Expand All @@ -407,10 +407,10 @@
"Declare": {
"deprecated_resources": {
"constant": {
"n_steps": 2699,
"n_steps": 2973,
"builtin_instance_counter": {
"pedersen_builtin": 16,
"range_check_builtin": 47
"range_check_builtin": 53
},
"n_memory_holes": 0
},
Expand All @@ -422,10 +422,10 @@
},
"resources": {
"constant": {
"n_steps": 2805,
"n_steps": 3079,
"builtin_instance_counter": {
"pedersen_builtin": 4,
"range_check_builtin": 52,
"range_check_builtin": 58,
"poseidon_builtin": 10
},
"n_memory_holes": 0
Expand All @@ -440,10 +440,10 @@
"DeployAccount": {
"deprecated_resources": {
"constant": {
"n_steps": 3598,
"n_steps": 4015,
"builtin_instance_counter": {
"pedersen_builtin": 23,
"range_check_builtin": 63
"range_check_builtin": 72
},
"n_memory_holes": 0
},
Expand All @@ -457,10 +457,10 @@
},
"resources": {
"constant": {
"n_steps": 3724,
"n_steps": 4137,
"builtin_instance_counter": {
"pedersen_builtin": 11,
"range_check_builtin": 68,
"range_check_builtin": 77,
"poseidon_builtin": 10
},
"n_memory_holes": 0
Expand All @@ -477,10 +477,10 @@
"InvokeFunction": {
"deprecated_resources": {
"constant": {
"n_steps": 3352,
"n_steps": 3763,
"builtin_instance_counter": {
"pedersen_builtin": 14,
"range_check_builtin": 60
"range_check_builtin": 69
},
"n_memory_holes": 0
},
Expand All @@ -494,10 +494,10 @@
},
"resources": {
"constant": {
"n_steps": 3493,
"n_steps": 3904,
"builtin_instance_counter": {
"pedersen_builtin": 4,
"range_check_builtin": 65,
"range_check_builtin": 74,
"poseidon_builtin": 11
},
"n_memory_holes": 0
Expand All @@ -514,10 +514,10 @@
"L1Handler": {
"deprecated_resources": {
"constant": {
"n_steps": 1092,
"n_steps": 1233,
"builtin_instance_counter": {
"pedersen_builtin": 11,
"range_check_builtin": 13
"range_check_builtin": 16
},
"n_memory_holes": 0
},
Expand Down
10 changes: 5 additions & 5 deletions crates/blockifier/resources/versioned_constants_13_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,6 @@
"n_memory_holes": 0,
"n_steps": 381
},
"Sha256ProcessBlock": {
"builtin_instance_counter": {},
"n_memory_holes": 0,
"n_steps": 0
},
"LibraryCall": {
"builtin_instance_counter": {
"range_check_builtin": 19
Expand Down Expand Up @@ -343,6 +338,11 @@
"n_memory_holes": 0,
"n_steps": 84
},
"Sha256ProcessBlock": {
"builtin_instance_counter": {},
"n_memory_holes": 0,
"n_steps": 0
},
"StorageRead": {
"builtin_instance_counter": {},
"n_memory_holes": 0,
Expand Down
10 changes: 5 additions & 5 deletions crates/blockifier/resources/versioned_constants_13_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,6 @@
},
"n_memory_holes": 0
},
"Sha256ProcessBlock": {
"builtin_instance_counter": {},
"n_memory_holes": 0,
"n_steps": 0
},
"LibraryCall": {
"n_steps": 751,
"builtin_instance_counter": {
Expand Down Expand Up @@ -382,6 +377,11 @@
},
"n_memory_holes": 0
},
"Sha256ProcessBlock": {
"builtin_instance_counter": {},
"n_memory_holes": 0,
"n_steps": 0
},
"StorageRead": {
"n_steps": 87,
"builtin_instance_counter": {
Expand Down
10 changes: 5 additions & 5 deletions crates/blockifier/resources/versioned_constants_13_1_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,6 @@
},
"n_memory_holes": 0
},
"Sha256ProcessBlock": {
"builtin_instance_counter": {},
"n_memory_holes": 0,
"n_steps": 0
},
"LibraryCall": {
"n_steps": 751,
"builtin_instance_counter": {
Expand Down Expand Up @@ -382,6 +377,11 @@
},
"n_memory_holes": 0
},
"Sha256ProcessBlock": {
"builtin_instance_counter": {},
"n_memory_holes": 0,
"n_steps": 0
},
"StorageRead": {
"n_steps": 87,
"builtin_instance_counter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn test_circuit(block_context: BlockContext, max_resource_bounds: ResourceBounds
.unwrap();

assert!(tx_execution_info.revert_error.is_none());
assert_eq!(tx_execution_info.transaction_receipt.gas, GasVector::from_l1_gas(6142));
assert_eq!(tx_execution_info.transaction_receipt.gas, GasVector::from_l1_gas(6690));
}

#[rstest]
Expand Down Expand Up @@ -222,7 +222,7 @@ fn test_infinite_recursion(
max_resource_bounds: ResourceBoundsMapping,
) {
// Limit the number of execution steps (so we quickly hit the limit).
block_context.versioned_constants.invoke_tx_max_n_steps = 4000;
block_context.versioned_constants.invoke_tx_max_n_steps = 4100;

let TestInitData { mut state, account_address, contract_address, mut nonce_manager } =
create_test_init_data(&block_context.chain_info, CairoVersion::Cairo0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ fn test_simulate_validate_charge_fee_fail_validate(

// Validation scenario: fallible validation.
let (actual_gas_used, actual_fee) = gas_and_fee(
u64_from_usize(get_tx_resources(TransactionType::InvokeFunction).n_steps + 27229),
u64_from_usize(get_tx_resources(TransactionType::InvokeFunction).n_steps + 27231),
validate,
&fee_type,
);
Expand Down

0 comments on commit c90f11b

Please sign in to comment.