-
Notifications
You must be signed in to change notification settings - Fork 65
feat(blockifier): expose more fields in OsConstants #6268
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
feat(blockifier): expose more fields in OsConstants #6268
Conversation
dorimedini-starkware
left a comment
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: 0 of 1 files reviewed, all discussions resolved
crates/blockifier/src/blockifier_versioned_constants.rs line 1095 at r1 (raw file):
// Validation. pub validate_rounding_consts: ValidateRoundingConsts,
moved, not added
Code quote:
pub validate_rounding_consts: ValidateRoundingConsts,crates/blockifier/src/blockifier_versioned_constants.rs line 1122 at r1 (raw file):
// L1 handler. pub l1_handler_version: u8, pub l1_handler_max_amount_bounds: GasVector,
moved, not added
Code quote:
pub l1_handler_max_amount_bounds: GasVector,crates/blockifier/src/blockifier_versioned_constants.rs line 1126 at r1 (raw file):
// Miscellaneous. pub nop_entry_point_offset: i8, pub os_contract_addresses: OsContractAddresses,
moved, not added
Code quote:
pub os_contract_addresses: OsContractAddresses,crates/blockifier/src/blockifier_versioned_constants.rs line 1154 at r1 (raw file):
gas_costs.base.step_gas_cost * entry_point_initial_budget_steps.0; let default_initial_gas_cost = gas_costs.base.step_gas_cost * default_initial_gas_cost_steps.0;
to align with other values in VersionedConstants: precompute total costs of entry_point_initial_budget and default_initial_gas_cost (i.e. multiply by step gas costs).
We use explicit destructuring (let RawStepGasCost { .. } = ..) to avoid the case where these initial costs depend on more than just steps (i.e. builtins) without the compiler complaining - if more cost types are added to these later, the compiler will catch that this computation must be updated.
Code quote:
// Preprocess inital budget costs.
let RawStepGasCost { step_gas_cost: entry_point_initial_budget_steps } =
raw_constants.entry_point_initial_budget;
let RawStepGasCost { step_gas_cost: default_initial_gas_cost_steps } =
raw_constants.default_initial_gas_cost;
let entry_point_initial_budget =
gas_costs.base.step_gas_cost * entry_point_initial_budget_steps.0;
let default_initial_gas_cost =
gas_costs.base.step_gas_cost * default_initial_gas_cost_steps.0;04926e5 to
f876d75
Compare
f1176fb to
7fa7428
Compare
f876d75 to
abf4950
Compare
7fa7428 to
c16fe40
Compare
abf4950 to
67ed994
Compare
c16fe40 to
c43084e
Compare
67ed994 to
747017c
Compare
c43084e to
61d3c36
Compare
747017c to
506edf5
Compare
61d3c36 to
57e43fa
Compare
506edf5 to
04c1b5c
Compare
57e43fa to
08d614a
Compare
04c1b5c to
4c76a10
Compare
08d614a to
b5137b2
Compare
4c76a10 to
f8f640e
Compare
b5137b2 to
fe14b9c
Compare
f8f640e to
003d36b
Compare
8aab23f to
3e09fd3
Compare
1ddf989 to
38ff341
Compare
3e09fd3 to
a4644d7
Compare
38ff341 to
b852e7c
Compare
a4644d7 to
a67d1bc
Compare
b852e7c to
74960f5
Compare
a67d1bc to
cc2ca31
Compare
74960f5 to
d0c6309
Compare
cc2ca31 to
50efaa4
Compare
d0c6309 to
159eee4
Compare
50efaa4 to
abb42e2
Compare
159eee4 to
1a034f9
Compare
abb42e2 to
6dfd8c0
Compare
1a034f9 to
0dfdac8
Compare
6dfd8c0 to
f5aca3e
Compare
0dfdac8 to
2a5e8c8
Compare
f5aca3e to
ae11937
Compare
AvivYossef-starkware
left a comment
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 r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)
dorimedini-starkware
left a comment
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 2 of 2 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)

No description provided.