Skip to content
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

chore(blockifier): alternate use of casm and native depending on tracked_resource #1699

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

avivg-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

Artifacts upload triggered. View details here

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.09%. Comparing base (e3165c4) to head (5f0517d).
Report is 123 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1699       +/-   ##
===========================================
+ Coverage   40.10%   69.09%   +28.99%     
===========================================
  Files          26      100       +74     
  Lines        1895    13449    +11554     
  Branches     1895    13449    +11554     
===========================================
+ Hits          760     9293     +8533     
- Misses       1100     3754     +2654     
- Partials       35      402      +367     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/native_alternate_use_of_casm branch from 92137be to a5fba16 Compare October 30, 2024 15:28
Copy link

Artifacts upload triggered. View details here

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/native_alternate_use_of_casm branch from a5fba16 to 0cf8cda Compare October 30, 2024 15:39
Copy link

Artifacts upload triggered. View details here

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/native_alternate_use_of_casm branch from 0cf8cda to 5e6e0de Compare October 30, 2024 16:59
Copy link

Artifacts upload triggered. View details here

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/native_alternate_use_of_casm branch from 5e6e0de to b421a99 Compare October 31, 2024 08:49
Copy link

Artifacts upload triggered. View details here

Copy link
Collaborator

@noaov1 noaov1 left a 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 r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @avivg-starkware)


crates/blockifier/src/execution/execution_utils.rs line 145 at r1 (raw file):

        #[cfg(feature = "cairo_native")]
        ContractClass::V1Native(contract_class) => {
            if context.tracked_resource_stack.last() == Some(&TrackedResource::CairoSteps) {

Please add a doc explaining this behaviour.

Code quote:

if context.tracked_resource_stack.last() == Some(&TrackedResource::CairoSteps) {

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/native_alternate_use_of_casm branch from b421a99 to a216985 Compare October 31, 2024 12:30
@avivg-starkware
Copy link
Contributor Author

crates/blockifier/src/execution/execution_utils.rs line 145 at r1 (raw file):

Previously, noaov1 (Noa Oved) wrote…

Please add a doc explaining this behaviour.

added, WDYT?

Copy link

Artifacts upload triggered. View details here

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/native_alternate_use_of_casm branch from a216985 to 0ca5873 Compare October 31, 2024 12:38
Copy link

Artifacts upload triggered. View details here

Copy link
Contributor Author

@avivg-starkware avivg-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @noaov1)

Copy link
Collaborator

@noaov1 noaov1 left a 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 @avivg-starkware)


crates/blockifier/src/execution/execution_utils.rs line 147 at r2 (raw file):

            if context.tracked_resource_stack.last() == Some(&TrackedResource::CairoSteps) {
                // if CairoSteps are tracked instead of SierraGas, use Casm for all following
                // calling txs.

Suggestion:

            // We cannot run native with cairo steps as the tracked resources (it's a vm resouorce).
            if context.tracked_resource_stack.last() == Some(&TrackedResource::CairoSteps) {

@avivg-starkware avivg-starkware force-pushed the avivg/blockifier/native_alternate_use_of_casm branch from 0ca5873 to 5f0517d Compare October 31, 2024 15:20
Copy link
Contributor Author

@avivg-starkware avivg-starkware left a 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)


crates/blockifier/src/execution/execution_utils.rs line 147 at r2 (raw file):

            if context.tracked_resource_stack.last() == Some(&TrackedResource::CairoSteps) {
                // if CairoSteps are tracked instead of SierraGas, use Casm for all following
                // calling txs.

Done.

Copy link

Artifacts upload triggered. View details here

Copy link
Contributor Author

@avivg-starkware avivg-starkware left a 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 r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @noaov1)

Copy link
Collaborator

@noaov1 noaov1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @avivg-starkware)

@avivg-starkware avivg-starkware merged commit e5696eb into main Oct 31, 2024
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2024
@avivg-starkware avivg-starkware deleted the avivg/blockifier/native_alternate_use_of_casm branch November 7, 2024 14:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants