-
Notifications
You must be signed in to change notification settings - Fork 22
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
build(fee): tx_resources depend on resource bounds signature #455
build(fee): tx_resources depend on resource bounds signature #455
Conversation
338583b
to
8e23dff
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 7 of 7 files at r1, all commit messages.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @nimrod-starkware and @TzahiTaub)
crates/blockifier/src/fee/actual_cost.rs
line 92 at r1 (raw file):
tx_context.block_context.block_info.use_kzg_da, tx_context.tx_info.has_l2_gas_bounds(), )?;
maybe to_gas_vector
should simply borrow the tx_context
? seems weird, passing three of it's fields explicitly
Code quote:
let gas = tx_resources.to_gas_vector(
&tx_context.block_context.versioned_constants,
tx_context.block_context.block_info.use_kzg_da,
tx_context.tx_info.has_l2_gas_bounds(),
)?;
crates/blockifier/src/test_utils/struct_impls.rs
line 123 at r1 (raw file):
&block_context.versioned_constants, block_context.block_info.use_kzg_da, false,
this should be injected somehow; it's a test util, and we should be able to test both cases
Code quote:
false,
crates/blockifier/src/transaction/account_transactions_test.rs
line 0 at r1 (raw file):
see here
crates/blockifier/src/transaction/execution_flavors_test.rs
line 135 at r1 (raw file):
&block_context.versioned_constants, block_context.block_info.use_kzg_da, false
see here
Code quote:
false
crates/blockifier/src/transaction/objects.rs
line 116 at r1 (raw file):
pub fn has_l2_gas_bounds(&self) -> bool { match self { TransactionInfo::Current(context) => context.resource_bounds.0.len() == 3,
didn't we want to first look into changing this type to an enum?
Code quote:
context.resource_bounds
crates/blockifier/src/transaction/post_execution_test.rs
line 262 at r1 (raw file):
&block_context.versioned_constants, block_context.block_info.use_kzg_da, false,
see here
Code quote:
false,
crates/blockifier/src/transaction/transactions_test.rs
line 0 at r1 (raw file):
see here
614086d
to
855c361
Compare
8e23dff
to
294914f
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.
Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @dorimedini-starkware and @TzahiTaub)
crates/blockifier/src/fee/actual_cost.rs
line 92 at r1 (raw file):
Previously, dorimedini-starkware wrote…
maybe
to_gas_vector
should simply borrow thetx_context
? seems weird, passing three of it's fields explicitly
I agree it looks weird but I think passing more information than needed might be more confusing, no?
crates/blockifier/src/test_utils/struct_impls.rs
line 123 at r1 (raw file):
Previously, dorimedini-starkware wrote…
this should be injected somehow; it's a test util, and we should be able to test both cases
Done.
crates/blockifier/src/transaction/account_transactions_test.rs
line at r1 (raw file):
Previously, dorimedini-starkware wrote…
see here
Changed it to be dependent on the user's bounds signature.
crates/blockifier/src/transaction/execution_flavors_test.rs
line 135 at r1 (raw file):
Previously, dorimedini-starkware wrote…
see here
Done.
crates/blockifier/src/transaction/objects.rs
line 116 at r1 (raw file):
Previously, dorimedini-starkware wrote…
didn't we want to first look into changing this type to an enum?
I will do it separately. I haven't figured out yet how and where to do it.
crates/blockifier/src/transaction/post_execution_test.rs
line 262 at r1 (raw file):
Previously, dorimedini-starkware wrote…
see here
Added TODO to derive it from user's bounds
crates/blockifier/src/transaction/transactions_test.rs
line 1918 at r1 (raw file):
let total_gas = expected_tx_resources .to_gas_vector(versioned_constants, block_context.block_info.use_kzg_da, false)
here it's false since it tests l1 handler
Code quote:
false)
crates/blockifier/src/transaction/transactions_test.rs
line at r1 (raw file):
Previously, dorimedini-starkware wrote…
see here
Changed it to be dependent on the user's bounds signature.
855c361
to
991209e
Compare
8f1db14
to
18c1d34
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 5 of 5 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware and @TzahiTaub)
crates/blockifier/src/fee/actual_cost.rs
line 92 at r1 (raw file):
Previously, nimrod-starkware wrote…
I agree it looks weird but I think passing more information than needed might be more confusing, no?
add a TODO to consider this... maybe adding a to_gas_vector_with_context
wrapper to to_gas_vector
crates/blockifier/src/transaction/objects.rs
line 116 at r1 (raw file):
Previously, nimrod-starkware wrote…
I will do it separately. I haven't figured out yet how and where to do it.
add a TODO then for now
18c1d34
to
510e9e3
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.
Reviewable status: 4 of 8 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @TzahiTaub)
crates/blockifier/src/fee/actual_cost.rs
line 92 at r1 (raw file):
Previously, dorimedini-starkware wrote…
add a TODO to consider this... maybe adding a
to_gas_vector_with_context
wrapper toto_gas_vector
added a wrapper
crates/blockifier/src/transaction/objects.rs
line 116 at r1 (raw file):
Previously, dorimedini-starkware wrote…
add a TODO then for now
WDYT about how i did it now?
added a method for ResourceBoundsMapping
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 3 of 4 files at r3, all commit messages.
Reviewable status: 7 of 8 files reviewed, all discussions resolved (waiting on @TzahiTaub)
991209e
to
85b439a
Compare
510e9e3
to
bf7d8be
Compare
85b439a
to
45f3fbe
Compare
bf7d8be
to
ec3790b
Compare
45f3fbe
to
e0533bb
Compare
ec3790b
to
e823cfa
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## nimrod/l2_gas/starknet_resources #455 +/- ##
===================================================================
Coverage ? 75.76%
===================================================================
Files ? 85
Lines ? 11015
Branches ? 11015
===================================================================
Hits ? 8345
Misses ? 2246
Partials ? 424 ☔ View full report in Codecov by Sentry. |
597f7c1
to
5aafa22
Compare
9ddc2b9
to
db47673
Compare
5aafa22
to
338fe8c
Compare
db47673
to
6324c9a
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 r6, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware and @TzahiTaub)
338fe8c
to
60e4881
Compare
6324c9a
to
8b3d045
Compare
60e4881
to
324e884
Compare
8b3d045
to
d5f495b
Compare
324e884
to
10a6f72
Compare
d5f495b
to
afeda2e
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 r7, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware and @TzahiTaub)
10a6f72
to
e396522
Compare
afeda2e
to
48335f4
Compare
e396522
to
b3581ba
Compare
48335f4
to
24f1748
Compare
b3581ba
to
0e755c4
Compare
24f1748
to
49c16a8
Compare
0e755c4
to
427a81a
Compare
49c16a8
to
caf494f
Compare
427a81a
to
ae18c8f
Compare
caf494f
to
7eaba87
Compare
Benchmark movements: |
ae18c8f
to
b1a68c1
Compare
7eaba87
to
1d1c197
Compare
b1a68c1
to
35201a3
Compare
1d1c197
to
a8898b8
Compare
This change is