-
Notifications
You must be signed in to change notification settings - Fork 107
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1968 +/- ##
==========================================
+ Coverage 78.17% 78.25% +0.07%
==========================================
Files 62 62
Lines 8842 8865 +23
Branches 8842 8865 +23
==========================================
+ Hits 6912 6937 +25
Misses 1492 1492
+ Partials 438 436 -2 ☔ View full report in Codecov by Sentry. |
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 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @noaov1 and @Yoni-Starkware)
crates/blockifier/src/test_utils.rs
line 455 at r1 (raw file):
.to_gas_vector(&block_context.versioned_constants, block_context.block_info.use_kzg_da)?; Ok(get_fee_by_gas_vector(&block_context.block_info, gas_vector, fee_type)) }
make this a method of TransactionResources please, next to to_gas_vector
Code quote:
pub fn calculate_tx_fee(
tx_resources: &TransactionResources,
block_context: &BlockContext,
fee_type: &FeeType,
) -> TransactionFeeResult<Fee> {
let gas_vector = tx_resources
.to_gas_vector(&block_context.versioned_constants, block_context.block_info.use_kzg_da)?;
Ok(get_fee_by_gas_vector(&block_context.block_info, gas_vector, fee_type))
}
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 and @noaov1)
crates/blockifier/src/test_utils.rs
line 455 at r1 (raw file):
Previously, dorimedini-starkware wrote…
make this a method of TransactionResources please, next to
to_gas_vector
Why? It is used only in tests.
Or did you mean to put it under test
config?
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 @noaov1 and @Yoni-Starkware)
crates/blockifier/src/test_utils.rs
line 455 at r1 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Why? It is used only in tests.
Or did you mean to put it undertest
config?
I would simply like all fee manipulation logic to be encapsulated in one object, instead of many utilities floating around without context.
maybe add an impl TransactionResources
block in a test_utils module, with this function?
e440026
to
a5ff62f
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: 3 of 7 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @noaov1)
crates/blockifier/src/test_utils.rs
line 455 at r1 (raw file):
Previously, dorimedini-starkware wrote…
I would simply like all fee manipulation logic to be encapsulated in one object, instead of many utilities floating around without context.
maybe add animpl TransactionResources
block in a test_utils module, with this function?
Done.
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 4 of 4 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @noaov1)
…e function (starkware-libs#1968) # Description put all the logic that is required for every tx execution (ie building the receipt, exec info, etc) into a single unit of execution (ie `transact`). this allow us to simplify testing/benchmarking tx execution, bcs all the necessary steps are now included in a single function that we can easily test, without having to create the entire `BlockExecutor` trait. ## Related issue <!-- Please link related issues: Fixes #<issue_number> More info: https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> ## Tests <!-- Please refer to the CONTRIBUTING.md file to know more about the testing process. Ensure you've tested at least the package you're modifying if running all the tests consumes too much memory on your system. --> - [ ] Yes - [x] No, because they aren't needed - [ ] No, because I need help ## Added to documentation? <!-- If the changes are small, code comments are enough, otherwise, the documentation is needed. It may be a README.md file added to your module/package, a DojoBook PR or both. --> - [ ] README.md - [ ] [Dojo Book](https://github.com/dojoengine/book) - [x] No documentation needed ## Checklist - [x] I've formatted my code (`scripts/prettier.sh`, `scripts/rust_fmt.sh`, `scripts/cairo_fmt.sh`) - [x] I've linted my code (`scripts/clippy.sh`, `scripts/docs.sh`) - [ ] I've commented my code - [ ] I've requested a review after addressing the comments
This change is