-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(blockifier): versioned constant #642
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @AvivYossef-starkware and the rest of your teammates on Graphite |
b1c1703
to
bc2b9fb
Compare
c3d559e
to
54eab56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 418 of 418 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware)
a discussion (no related file):
pending python checks
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #642 +/- ##
==========================================
- Coverage 76.65% 71.51% -5.14%
==========================================
Files 351 85 -266
Lines 37202 10860 -26342
Branches 37202 10860 -26342
==========================================
- Hits 28516 7767 -20749
+ Misses 6372 2695 -3677
+ Partials 2314 398 -1916 ☔ View full report in Codecov by Sentry. |
54eab56
to
a241394
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 41 of 41 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware)
a241394
to
a08d1cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)
a discussion (no related file):
Previously, dorimedini-starkware wrote…
pending python checks
pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware)
crates/blockifier/resources/versioned_constants.json
line 89 at r5 (raw file):
"l2_gas": "L2_GAS", "l1_data_gas": "L1_DATA", "l1_data_gas_index": 2,
wait, why don't you need these fields in the other JSONs as well?
on main
, all JSONs from all versions need to be deserializable into the current VersionedConstants struct; can these OS fields simply be ignored in deserialization?
Code quote:
"l1_data_gas": "L1_DATA",
"l1_data_gas_index": 2,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)
crates/blockifier/resources/versioned_constants.json
line 89 at r5 (raw file):
Previously, dorimedini-starkware wrote…
wait, why don't you need these fields in the other JSONs as well?
onmain
, all JSONs from all versions need to be deserializable into the current VersionedConstants struct; can these OS fields simply be ignored in deserialization?
It seems that serde success.
There is a macro here that loads the other JSONs
https://github.com/starkware-libs/sequencer/blob/d846784519cedc91d90796c16b8831d71da1052e/crates/blockifier/src/versioned_constants.rs#L115
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware)
crates/blockifier/resources/versioned_constants.json
line 89 at r5 (raw file):
Previously, AvivYossef-starkware wrote…
It seems that serde success.
There is a macro here that loads the other JSONs
https://github.com/starkware-libs/sequencer/blob/d846784519cedc91d90796c16b8831d71da1052e/crates/blockifier/src/versioned_constants.rs#L115
I am wondering why this test passes; please check how these fields are loaded. it's probably fine, I just want to make sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)
crates/blockifier/resources/versioned_constants.json
line 89 at r5 (raw file):
Previously, dorimedini-starkware wrote…
I am wondering why this test passes; please check how these fields are loaded. it's probably fine, I just want to make sure
this is how it loads 0.13.2
VersionedConstants {
tx_event_limits: EventLimits {
max_data_length: 300,
max_keys_length: 50,
max_n_emitted_events: 1000,
},
invoke_tx_max_n_steps: 10000000,
l2_resource_gas_costs: L2ResourceGasCosts {
gas_per_data_felt: Ratio {
numer: 128,
denom: 1000,
},
event_key_factor: Ratio {
numer: 2,
denom: 1,
},
gas_per_code_byte: Ratio {
numer: 875,
denom: 1000,
},
},
max_recursion_depth: 50,
validate_max_n_steps: 1000000,
segment_arena_cells: false,
disable_cairo0_redeclaration: true,
os_constants: OsConstants {
gas_costs: GasCosts {
step_gas_cost: 100,
memory_hole_gas_cost: 10,
range_check_gas_cost: 70,
pedersen_gas_cost: 0,
bitwise_builtin_gas_cost: 594,
ecop_gas_cost: 0,
poseidon_gas_cost: 0,
add_mod_gas_cost: 0,
mul_mod_gas_cost: 0,
initial_gas_cost: 10000000000,
entry_point_initial_budget: 10000,
syscall_base_gas_cost: 10000,
entry_point_gas_cost: 60000,
fee_transfer_gas_cost: 70000,
transaction_gas_cost: 200000,
call_contract_gas_cost: 71000,
deploy_gas_cost: 90000,
get_block_hash_gas_cost: 15000,
get_execution_info_gas_cost: 11000,
library_call_gas_cost: 71000,
replace_class_gas_cost: 15000,
storage_read_gas_cost: 15000,
storage_write_gas_cost: 15000,
emit_event_gas_cost: 11000,
send_message_to_l1_gas_cost: 15000,
secp256k1_add_gas_cost: 42630,
secp256k1_get_point_from_x_gas_cost: 41400,
secp256k1_get_xy_gas_cost: 25070,
secp256k1_mul_gas_cost: 8143270,
secp256k1_new_gas_cost: 50350,
secp256r1_add_gas_cost: 62890,
secp256r1_get_point_from_x_gas_cost: 54280,
secp256r1_get_xy_gas_cost: 25270,
secp256r1_mul_gas_cost: 13511290,
secp256r1_new_gas_cost: 63230,
keccak_gas_cost: 10000,
keccak_round_cost_gas_cost: 180000,
sha256_process_block_gas_cost: 862060,
},
validate_rounding_consts: ValidateRoundingConsts {
validate_block_number_rounding: 100,
validate_timestamp_rounding: 3600,
},
},
os_resources: OsResources {
execute_syscalls: {
GetContractAddress: ExecutionResources {
n_steps: 64,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Keccak: ExecutionResources {
n_steps: 381,
n_memory_holes: 0,
builtin_instance_counter: {
bitwise: 6,
keccak: 1,
range_check: 56,
},
},
DelegateCall: ExecutionResources {
n_steps: 713,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 19,
},
},
Secp256r1New: ExecutionResources {
n_steps: 580,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 49,
},
},
DelegateL1Handler: ExecutionResources {
n_steps: 692,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 15,
},
},
LibraryCallL1Handler: ExecutionResources {
n_steps: 659,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 15,
},
},
GetCallerAddress: ExecutionResources {
n_steps: 64,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
ReplaceClass: ExecutionResources {
n_steps: 98,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Secp256k1GetXy: ExecutionResources {
n_steps: 207,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 11,
},
},
GetBlockTimestamp: ExecutionResources {
n_steps: 38,
n_memory_holes: 0,
builtin_instance_counter: {},
},
Secp256r1Mul: ExecutionResources {
n_steps: 125344,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 13961,
},
},
SendMessageToL1: ExecutionResources {
n_steps: 141,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
StorageWrite: ExecutionResources {
n_steps: 89,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Deploy: ExecutionResources {
n_steps: 1097,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 18,
pedersen: 7,
},
},
CallContract: ExecutionResources {
n_steps: 827,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 15,
},
},
Sha256ProcessBlock: ExecutionResources {
n_steps: 1855,
n_memory_holes: 0,
builtin_instance_counter: {
bitwise: 1115,
range_check: 65,
},
},
EmitEvent: ExecutionResources {
n_steps: 61,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Secp256k1Mul: ExecutionResources {
n_steps: 76505,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 7045,
},
},
LibraryCall: ExecutionResources {
n_steps: 818,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 15,
},
},
Secp256k1New: ExecutionResources {
n_steps: 461,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 35,
},
},
GetExecutionInfo: ExecutionResources {
n_steps: 64,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Secp256k1GetPointFromX: ExecutionResources {
n_steps: 395,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 30,
},
},
Secp256r1GetXy: ExecutionResources {
n_steps: 209,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 11,
},
},
StorageRead: ExecutionResources {
n_steps: 87,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
GetBlockHash: ExecutionResources {
n_steps: 104,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 2,
},
},
Secp256r1GetPointFromX: ExecutionResources {
n_steps: 514,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 44,
},
},
GetTxInfo: ExecutionResources {
n_steps: 64,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
GetBlockNumber: ExecutionResources {
n_steps: 40,
n_memory_holes: 0,
builtin_instance_counter: {},
},
GetTxSignature: ExecutionResources {
n_steps: 44,
n_memory_holes: 0,
builtin_instance_counter: {},
},
Secp256k1Add: ExecutionResources {
n_steps: 410,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 29,
},
},
GetSequencerAddress: ExecutionResources {
n_steps: 34,
n_memory_holes: 0,
builtin_instance_counter: {},
},
Secp256r1Add: ExecutionResources {
n_steps: 593,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 57,
},
},
},
execute_txs_inner: {
DeployAccount: ResourcesByVersion {
resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 4137,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 11,
range_check: 77,
poseidon: 10,
},
},
calldata_factor: ExecutionResources {
n_steps: 21,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 2,
},
},
},
deprecated_resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 4015,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 72,
pedersen: 23,
},
},
calldata_factor: ExecutionResources {
n_steps: 21,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 2,
},
},
},
},
InvokeFunction: ResourcesByVersion {
resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 3904,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 4,
range_check: 74,
poseidon: 11,
},
},
calldata_factor: ExecutionResources {
n_steps: 8,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 1,
},
},
},
deprecated_resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 3763,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 14,
range_check: 69,
},
},
calldata_factor: ExecutionResources {
n_steps: 8,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 1,
},
},
},
},
L1Handler: ResourcesByVersion {
resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 0,
n_memory_holes: 0,
builtin_instance_counter: {},
},
calldata_factor: ExecutionResources {
n_steps: 13,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 1,
},
},
},
deprecated_resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 1233,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 16,
pedersen: 11,
},
},
calldata_factor: ExecutionResources {
n_steps: 13,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 1,
},
},
},
},
Declare: ResourcesByVersion {
resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 3079,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 4,
range_check: 58,
poseidon: 10,
},
},
calldata_factor: ExecutionResources {
n_steps: 0,
n_memory_holes: 0,
builtin_instance_counter: {},
},
},
deprecated_resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 2973,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 16,
range_check: 53,
},
},
calldata_factor: ExecutionResources {
n_steps: 0,
n_memory_holes: 0,
builtin_instance_counter: {},
},
},
},
},
compute_os_kzg_commitment_info: ExecutionResources {
n_steps: 113,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 17,
},
},
},
vm_resource_fee_cost: {
"ecdsa_builtin": Ratio {
numer: 512,
denom: 100,
},
"range_check_builtin": Ratio {
numer: 4,
denom: 100,
},
"keccak_builtin": Ratio {
numer: 512,
denom: 100,
},
"bitwise_builtin": Ratio {
numer: 16,
denom: 100,
},
"ec_op_builtin": Ratio {
numer: 256,
denom: 100,
},
"mul_mod_builtin": Ratio {
numer: 4,
denom: 100,
},
"output_builtin": Ratio {
numer: 0,
denom: 1,
},
"add_mod_builtin": Ratio {
numer: 4,
denom: 100,
},
"pedersen_builtin": Ratio {
numer: 8,
denom: 100,
},
"range_check96_builtin": Ratio {
numer: 4,
denom: 100,
},
"n_steps": Ratio {
numer: 25,
denom: 10000,
},
"poseidon_builtin": Ratio {
numer: 8,
denom: 100,
},
},
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware)
crates/blockifier/resources/versioned_constants.json
line 89 at r5 (raw file):
Previously, AvivYossef-starkware wrote…
this is how it loads 0.13.2
VersionedConstants {
tx_event_limits: EventLimits {
max_data_length: 300,
max_keys_length: 50,
max_n_emitted_events: 1000,
},
invoke_tx_max_n_steps: 10000000,
l2_resource_gas_costs: L2ResourceGasCosts {
gas_per_data_felt: Ratio {
numer: 128,
denom: 1000,
},
event_key_factor: Ratio {
numer: 2,
denom: 1,
},
gas_per_code_byte: Ratio {
numer: 875,
denom: 1000,
},
},
max_recursion_depth: 50,
validate_max_n_steps: 1000000,
segment_arena_cells: false,
disable_cairo0_redeclaration: true,
os_constants: OsConstants {
gas_costs: GasCosts {
step_gas_cost: 100,
memory_hole_gas_cost: 10,
range_check_gas_cost: 70,
pedersen_gas_cost: 0,
bitwise_builtin_gas_cost: 594,
ecop_gas_cost: 0,
poseidon_gas_cost: 0,
add_mod_gas_cost: 0,
mul_mod_gas_cost: 0,
initial_gas_cost: 10000000000,
entry_point_initial_budget: 10000,
syscall_base_gas_cost: 10000,
entry_point_gas_cost: 60000,
fee_transfer_gas_cost: 70000,
transaction_gas_cost: 200000,
call_contract_gas_cost: 71000,
deploy_gas_cost: 90000,
get_block_hash_gas_cost: 15000,
get_execution_info_gas_cost: 11000,
library_call_gas_cost: 71000,
replace_class_gas_cost: 15000,
storage_read_gas_cost: 15000,
storage_write_gas_cost: 15000,
emit_event_gas_cost: 11000,
send_message_to_l1_gas_cost: 15000,
secp256k1_add_gas_cost: 42630,
secp256k1_get_point_from_x_gas_cost: 41400,
secp256k1_get_xy_gas_cost: 25070,
secp256k1_mul_gas_cost: 8143270,
secp256k1_new_gas_cost: 50350,
secp256r1_add_gas_cost: 62890,
secp256r1_get_point_from_x_gas_cost: 54280,
secp256r1_get_xy_gas_cost: 25270,
secp256r1_mul_gas_cost: 13511290,
secp256r1_new_gas_cost: 63230,
keccak_gas_cost: 10000,
keccak_round_cost_gas_cost: 180000,
sha256_process_block_gas_cost: 862060,
},
validate_rounding_consts: ValidateRoundingConsts {
validate_block_number_rounding: 100,
validate_timestamp_rounding: 3600,
},
},
os_resources: OsResources {
execute_syscalls: {
GetContractAddress: ExecutionResources {
n_steps: 64,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Keccak: ExecutionResources {
n_steps: 381,
n_memory_holes: 0,
builtin_instance_counter: {
bitwise: 6,
keccak: 1,
range_check: 56,
},
},
DelegateCall: ExecutionResources {
n_steps: 713,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 19,
},
},
Secp256r1New: ExecutionResources {
n_steps: 580,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 49,
},
},
DelegateL1Handler: ExecutionResources {
n_steps: 692,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 15,
},
},
LibraryCallL1Handler: ExecutionResources {
n_steps: 659,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 15,
},
},
GetCallerAddress: ExecutionResources {
n_steps: 64,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
ReplaceClass: ExecutionResources {
n_steps: 98,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Secp256k1GetXy: ExecutionResources {
n_steps: 207,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 11,
},
},
GetBlockTimestamp: ExecutionResources {
n_steps: 38,
n_memory_holes: 0,
builtin_instance_counter: {},
},
Secp256r1Mul: ExecutionResources {
n_steps: 125344,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 13961,
},
},
SendMessageToL1: ExecutionResources {
n_steps: 141,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
StorageWrite: ExecutionResources {
n_steps: 89,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Deploy: ExecutionResources {
n_steps: 1097,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 18,
pedersen: 7,
},
},
CallContract: ExecutionResources {
n_steps: 827,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 15,
},
},
Sha256ProcessBlock: ExecutionResources {
n_steps: 1855,
n_memory_holes: 0,
builtin_instance_counter: {
bitwise: 1115,
range_check: 65,
},
},
EmitEvent: ExecutionResources {
n_steps: 61,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Secp256k1Mul: ExecutionResources {
n_steps: 76505,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 7045,
},
},
LibraryCall: ExecutionResources {
n_steps: 818,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 15,
},
},
Secp256k1New: ExecutionResources {
n_steps: 461,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 35,
},
},
GetExecutionInfo: ExecutionResources {
n_steps: 64,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
Secp256k1GetPointFromX: ExecutionResources {
n_steps: 395,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 30,
},
},
Secp256r1GetXy: ExecutionResources {
n_steps: 209,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 11,
},
},
StorageRead: ExecutionResources {
n_steps: 87,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
GetBlockHash: ExecutionResources {
n_steps: 104,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 2,
},
},
Secp256r1GetPointFromX: ExecutionResources {
n_steps: 514,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 44,
},
},
GetTxInfo: ExecutionResources {
n_steps: 64,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 1,
},
},
GetBlockNumber: ExecutionResources {
n_steps: 40,
n_memory_holes: 0,
builtin_instance_counter: {},
},
GetTxSignature: ExecutionResources {
n_steps: 44,
n_memory_holes: 0,
builtin_instance_counter: {},
},
Secp256k1Add: ExecutionResources {
n_steps: 410,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 29,
},
},
GetSequencerAddress: ExecutionResources {
n_steps: 34,
n_memory_holes: 0,
builtin_instance_counter: {},
},
Secp256r1Add: ExecutionResources {
n_steps: 593,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 57,
},
},
},
execute_txs_inner: {
DeployAccount: ResourcesByVersion {
resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 4137,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 11,
range_check: 77,
poseidon: 10,
},
},
calldata_factor: ExecutionResources {
n_steps: 21,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 2,
},
},
},
deprecated_resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 4015,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 72,
pedersen: 23,
},
},
calldata_factor: ExecutionResources {
n_steps: 21,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 2,
},
},
},
},
InvokeFunction: ResourcesByVersion {
resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 3904,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 4,
range_check: 74,
poseidon: 11,
},
},
calldata_factor: ExecutionResources {
n_steps: 8,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 1,
},
},
},
deprecated_resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 3763,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 14,
range_check: 69,
},
},
calldata_factor: ExecutionResources {
n_steps: 8,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 1,
},
},
},
},
L1Handler: ResourcesByVersion {
resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 0,
n_memory_holes: 0,
builtin_instance_counter: {},
},
calldata_factor: ExecutionResources {
n_steps: 13,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 1,
},
},
},
deprecated_resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 1233,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 16,
pedersen: 11,
},
},
calldata_factor: ExecutionResources {
n_steps: 13,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 1,
},
},
},
},
Declare: ResourcesByVersion {
resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 3079,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 4,
range_check: 58,
poseidon: 10,
},
},
calldata_factor: ExecutionResources {
n_steps: 0,
n_memory_holes: 0,
builtin_instance_counter: {},
},
},
deprecated_resources: ResourcesParams {
constant: ExecutionResources {
n_steps: 2973,
n_memory_holes: 0,
builtin_instance_counter: {
pedersen: 16,
range_check: 53,
},
},
calldata_factor: ExecutionResources {
n_steps: 0,
n_memory_holes: 0,
builtin_instance_counter: {},
},
},
},
},
compute_os_kzg_commitment_info: ExecutionResources {
n_steps: 113,
n_memory_holes: 0,
builtin_instance_counter: {
range_check: 17,
},
},
},
vm_resource_fee_cost: {
"ecdsa_builtin": Ratio {
numer: 512,
denom: 100,
},
"range_check_builtin": Ratio {
numer: 4,
denom: 100,
},
"keccak_builtin": Ratio {
numer: 512,
denom: 100,
},
"bitwise_builtin": Ratio {
numer: 16,
denom: 100,
},
"ec_op_builtin": Ratio {
numer: 256,
denom: 100,
},
"mul_mod_builtin": Ratio {
numer: 4,
denom: 100,
},
"output_builtin": Ratio {
numer: 0,
denom: 1,
},
"add_mod_builtin": Ratio {
numer: 4,
denom: 100,
},
"pedersen_builtin": Ratio {
numer: 8,
denom: 100,
},
"range_check96_builtin": Ratio {
numer: 4,
denom: 100,
},
"n_steps": Ratio {
numer: 25,
denom: 10000,
},
"poseidon_builtin": Ratio {
numer: 8,
denom: 100,
},
},
}
where, for example, is the l1_handler_version
field?
I'm only interested in where the new fields you added, are loaded; no need for the entire JSON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)
crates/blockifier/resources/versioned_constants.json
line 89 at r5 (raw file):
Previously, dorimedini-starkware wrote…
where, for example, is the
l1_handler_version
field?
I'm only interested in where the new fields you added, are loaded; no need for the entire JSON
the new fields that I added are not loaded,
they are un the additional fields of
OsConstants
and it's not used by the blockifier at all, as mentioned here
https://github.com/starkware-libs/sequencer/blob/d846784519cedc91d90796c16b8831d71da1052e/crates/blockifier/src/versioned_constants.rs#L517
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-starkware)
This change is