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

Commit

Permalink
chore: rename segment arena flag in versioned constants (#2095)
Browse files Browse the repository at this point in the history
  • Loading branch information
avi-starkware authored Jul 18, 2024
1 parent 9d77c75 commit d12978e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/blockifier/resources/versioned_constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"disable_cairo0_redeclaration": true,
"max_recursion_depth": 50,
"count_segment_arena_cells_not_instances": false,
"segment_arena_cells": false,
"os_constants": {
"block_hash_contract_address": 1,
"call_contract_gas_cost": {
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/resources/versioned_constants_13_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"invoke_tx_max_n_steps": 3000000,
"max_recursion_depth": 50,
"count_segment_arena_cells_not_instances": true,
"segment_arena_cells": true,
"os_constants": {
"nop_entry_point_offset": -1,
"entry_point_type_external": 0,
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/resources/versioned_constants_13_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
]
},
"max_recursion_depth": 50,
"count_segment_arena_cells_not_instances": true,
"segment_arena_cells": true,
"os_constants": {
"nop_entry_point_offset": -1,
"entry_point_type_external": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
]
},
"max_recursion_depth": 50,
"count_segment_arena_cells_not_instances": true,
"segment_arena_cells": true,
"os_constants": {
"nop_entry_point_offset": -1,
"entry_point_type_external": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ pub fn finalize_execution(
.map_err(VirtualMachineError::RunnerError)?
.filter_unused_builtins();
let versioned_constants = syscall_handler.context.versioned_constants();
if versioned_constants.count_segment_arena_cells_not_instances {
if versioned_constants.segment_arena_cells {
vm_resources_without_inner_calls
.builtin_instance_counter
.get_mut(&BuiltinName::segment_arena)
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/entry_point_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ pub fn finalize_execution(
.map_err(VirtualMachineError::RunnerError)?
.filter_unused_builtins();
let versioned_constants = syscall_handler.context.versioned_constants();
if versioned_constants.count_segment_arena_cells_not_instances {
if versioned_constants.segment_arena_cells {
vm_resources_without_inner_calls
.builtin_instance_counter
.get_mut(&BuiltinName::segment_arena)
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/versioned_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub struct VersionedConstants {
// multiplied by 3. This offsets a bug in the old vm where the counter counted the number of
// cells used by instances of the builtin, instead of the number of instances.
#[serde(default)]
pub count_segment_arena_cells_not_instances: bool,
pub segment_arena_cells: bool,

// Transactions settings.
#[serde(default)]
Expand Down

0 comments on commit d12978e

Please sign in to comment.