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

feat(blockifier): add get_execution_info_v2 syscall #1812

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

varex83
Copy link
Contributor

@varex83 varex83 commented Nov 4, 2024

No description provided.

@varex83 varex83 added the native integration Related with the integration of Cairo Native into the Blockifier label Nov 4, 2024
@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

github-actions bot commented Nov 4, 2024

Artifacts upload triggered. View details here

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 77.12%. Comparing base (e3165c4) to head (8f17982).
Report is 403 commits behind head on main.

Files with missing lines Patch % Lines
crates/starknet_api/src/data_availability.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1812       +/-   ##
===========================================
+ Coverage   40.10%   77.12%   +37.02%     
===========================================
  Files          26      105       +79     
  Lines        1895    13663    +11768     
  Branches     1895    13663    +11768     
===========================================
+ Hits          760    10538     +9778     
- Misses       1100     2667     +1567     
- Partials       35      458      +423     

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

Copy link
Contributor

@meship-starkware meship-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 2 of 3 files at r1, all commit messages.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @noaov1 and @varex83)


crates/blockifier/src/execution/native/syscall_handler.rs line 203 at r1 (raw file):

                paymaster_data: context.paymaster_data.0.clone(),
                nonce_data_availability_mode: context.nonce_data_availability_mode as u32,
                fee_data_availability_mode: context.fee_data_availability_mode as u32,

Please use into or try_ino and not as

Suggestion:

                nonce_data_availability_mode: context.nonce_data_availability_mode.into(),
                fee_data_availability_mode: context.fee_data_availability_mode.into(),

Copy link
Contributor Author

@varex83 varex83 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: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @meship-starkware and @noaov1)


crates/blockifier/src/execution/native/syscall_handler.rs line 203 at r1 (raw file):

Previously, meship-starkware (Meshi Peled) wrote…

Please use into or try_ino and not as

TryInto is not implemented in this case for the enum, but corresponding integers are defined in the enum itself, so converting with as is a pretty idiomatic way to do

Copy link
Contributor Author

@varex83 varex83 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: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @meship-starkware and @noaov1)


crates/blockifier/src/execution/native/syscall_handler.rs line 203 at r1 (raw file):

Previously, varex83 (Bohdan Ohorodnii) wrote…

TryInto is not implemented in this case for the enum, but corresponding integers are defined in the enum itself, so converting with as is a pretty idiomatic way to do

Oh, just noticed that clippy failed (I was checking it a few times, but only now it appeared). I will push fix ASAP

Copy link

github-actions bot commented Nov 5, 2024

Artifacts upload triggered. View details here

Copy link
Contributor

@meship-starkware meship-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 r2.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @noaov1 and @varex83)


crates/blockifier/src/execution/native/syscall_handler.rs line 20 at r1 (raw file):

use starknet_types_core::felt::Felt;

use super::utils::{calculate_resource_bounds, default_tx_v2_info};

Avoid using super

Code quote:

use super::utils::{calculate_resource_bounds, default_tx_v2_info};

@varex83 varex83 force-pushed the bohdan/get-execution-info branch 2 times, most recently from 2efef80 to 70aaed6 Compare November 7, 2024 11:03
@varex83 varex83 force-pushed the bohdan/get-execution-info-v2 branch 2 times, most recently from 984af55 to 7e1fe06 Compare November 7, 2024 11:10
Copy link

github-actions bot commented Nov 7, 2024

Artifacts upload triggered. View details here

Copy link

github-actions bot commented Nov 7, 2024

Artifacts upload triggered. View details here

Copy link
Contributor Author

@varex83 varex83 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: 1 of 4 files reviewed, 1 unresolved discussion (waiting on @meship-starkware and @noaov1)


crates/blockifier/src/execution/native/syscall_handler.rs line 20 at r1 (raw file):

Previously, meship-starkware (Meshi Peled) wrote…

Avoid using super

Done

Copy link

github-actions bot commented Nov 7, 2024

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [34.101 ms 34.639 ms 35.273 ms]
change: [+1.2606% +2.8239% +4.7791%] (p = 0.00 < 0.05)
Performance has regressed.
Found 11 outliers among 100 measurements (11.00%)
2 (2.00%) high mild
9 (9.00%) high severe

Copy link
Contributor

@meship-starkware meship-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 r2, 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

@varex83 varex83 force-pushed the bohdan/get-execution-info-v2 branch from 7e1fe06 to af2de44 Compare November 7, 2024 12:41
Copy link

github-actions bot commented Nov 7, 2024

Artifacts upload triggered. View details here

Copy link
Contributor

@meship-starkware meship-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 r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

@varex83 varex83 force-pushed the bohdan/get-execution-info branch 2 times, most recently from 5af9c72 to 82c7715 Compare November 8, 2024 12:26
@varex83 varex83 force-pushed the bohdan/get-execution-info-v2 branch from af2de44 to 1738c76 Compare November 8, 2024 12:28
Copy link

github-actions bot commented Nov 8, 2024

Artifacts upload triggered. View details here

@varex83 varex83 force-pushed the bohdan/get-execution-info branch from 82c7715 to f246924 Compare November 11, 2024 09:48
@varex83 varex83 force-pushed the bohdan/get-execution-info-v2 branch from 1738c76 to 7c6e4e3 Compare November 11, 2024 09:49
Copy link

Artifacts upload triggered. View details here

Copy link

Artifacts upload triggered. View details here

Copy link

Benchmark movements:
tree_computation_flow performance improved 😺
tree_computation_flow time: [34.636 ms 34.722 ms 34.809 ms]
change: [-5.2677% -3.6098% -2.1573%] (p = 0.00 < 0.05)
Performance has improved.

Copy link
Contributor

@meship-starkware meship-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 r8, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1 and @Yoni-Starkware)

@varex83 varex83 force-pushed the bohdan/get-execution-info branch 3 times, most recently from ffd093d to f3a504e Compare November 13, 2024 14:18
Copy link
Contributor

@meship-starkware meship-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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1 and @Yoni-Starkware)

@varex83 varex83 force-pushed the bohdan/get-execution-info-v2 branch from b6988aa to f1bbb57 Compare November 13, 2024 14:55
Copy link

Artifacts upload triggered. View details here

Copy link
Contributor

@meship-starkware meship-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 r9, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1 and @Yoni-Starkware)

Copy link
Contributor

@avi-starkware avi-starkware 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 2 files at r2, 2 of 4 files at r6, 1 of 1 files at r7, 1 of 1 files at r8.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1 and @Yoni-Starkware)

@varex83 varex83 force-pushed the bohdan/get-execution-info branch 2 times, most recently from 7f6d275 to e75ea9a Compare November 14, 2024 13:37
@varex83 varex83 changed the base branch from bohdan/get-execution-info to main November 14, 2024 14:17
@varex83 varex83 force-pushed the bohdan/get-execution-info-v2 branch from f1bbb57 to fd49a8b Compare November 14, 2024 14:17
Copy link

Artifacts upload triggered. View details here

Copy link
Collaborator

@Yoni-Starkware Yoni-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: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @meship-starkware, @noaov1, and @varex83)


crates/blockifier/src/execution/native/utils.rs line 72 at r10 (raw file):

                },
                ResourceBounds {
                    resource: Felt::from_hex(Resource::L1DataGas.to_hex()).unwrap(),

I think this is the wrong order. Please check against the vm impl

@varex83 varex83 force-pushed the bohdan/get-execution-info-v2 branch from fd49a8b to 5d1f6c5 Compare November 14, 2024 14:37
Copy link
Contributor Author

@varex83 varex83 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: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @meship-starkware, @noaov1, and @Yoni-Starkware)


crates/blockifier/src/execution/native/utils.rs line 72 at r10 (raw file):

Previously, Yoni-Starkware (Yoni) wrote…

I think this is the wrong order. Please check against the vm impl

Done.

Copy link

Artifacts upload triggered. View details here

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware 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 2 files at r2, 1 of 4 files at r6, 1 of 1 files at r10, 1 of 1 files at r11, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

Copy link
Contributor

@meship-starkware meship-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 r10, 1 of 1 files at r11, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

@varex83 varex83 force-pushed the bohdan/get-execution-info-v2 branch from 5d1f6c5 to 8f17982 Compare November 14, 2024 14:48
Copy link

Artifacts upload triggered. View details here

Copy link
Contributor

@meship-starkware meship-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 r12, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

@meship-starkware meship-starkware merged commit df433f1 into main Nov 14, 2024
15 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2024
@meship-starkware meship-starkware deleted the bohdan/get-execution-info-v2 branch November 19, 2024 08:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
native integration Related with the integration of Cairo Native into the Blockifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants