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

test: streamline the v0 version tx for invoke tx towards code dedup in test utils #1930

Closed

Conversation

ArniStarkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

ArniStarkware commented Nov 11, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ArniStarkware ArniStarkware marked this pull request as ready for review November 11, 2024 08:39
Copy link

Artifacts upload triggered. View details here

@ArniStarkware ArniStarkware force-pushed the arni/test_utils/tx_creator/streamline_invoke_v0 branch from 7ed47ef to c534585 Compare November 11, 2024 19:04
Copy link

Artifacts upload triggered. View details here

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.18%. Comparing base (e3165c4) to head (4fe6120).
Report is 419 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1930       +/-   ##
===========================================
+ Coverage   40.10%   77.18%   +37.07%     
===========================================
  Files          26      103       +77     
  Lines        1895    13560    +11665     
  Branches     1895    13560    +11665     
===========================================
+ Hits          760    10466     +9706     
- Misses       1100     2639     +1539     
- Partials       35      455      +420     

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

@ArniStarkware ArniStarkware force-pushed the arni/test_utils/tx_creator/streamline_invoke_v0 branch from c534585 to f4430e8 Compare November 12, 2024 10:02
Copy link

Artifacts upload triggered. View details here

@ArniStarkware ArniStarkware force-pushed the arni/test_utils/tx_creator/streamline_invoke_v0 branch from f4430e8 to 77a2a48 Compare November 13, 2024 12:43
Copy link

Artifacts upload triggered. View details here

@ArniStarkware ArniStarkware force-pushed the arni/test_utils/tx_creator/streamline_invoke_v0 branch from 77a2a48 to 4fe6120 Compare November 13, 2024 13:11
Copy link

Artifacts upload triggered. View details here

Copy link
Contributor

@ayeletstarkware ayeletstarkware 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: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)


crates/starknet_api/src/test_utils/invoke.rs line 103 at r3 (raw file):

            contract_address: invoke_args.sender_address,
            signature: invoke_args.signature,
            entry_point_selector: *EXECUTE_ENTRY_POINT_SELECTOR,

Why do you use this instead of selector_from_name(EXECUTE_ENTRY_POINT_NAME)? What are the differences? I see the comment says there were issues with the computation, can you elaborate?

Code quote:

 *EXECUTE_ENTRY_POINT_SELECTOR

Copy link
Contributor Author

@ArniStarkware ArniStarkware 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: 0 of 2 files reviewed, all discussions resolved (waiting on @ayeletstarkware)


crates/starknet_api/src/test_utils/invoke.rs line 103 at r3 (raw file):

Previously, ayeletstarkware (Ayelet Zilber) wrote…

Why do you use this instead of selector_from_name(EXECUTE_ENTRY_POINT_NAME)? What are the differences? I see the comment says there were issues with the computation, can you elaborate?

The issue is that the function selector_from_name is from the blockifier. This is Starknet API. We don't want SNAPI to be dependent of blockifier (the dependency is reversed).

Copy link
Contributor

@ayeletstarkware ayeletstarkware 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: 0 of 2 files reviewed, all discussions resolved


crates/starknet_api/src/test_utils/invoke.rs line 103 at r3 (raw file):

Previously, ArniStarkware (Arnon Hod) wrote…

The issue is that the function selector_from_name is from the blockifier. This is Starknet API. We don't want SNAPI to be dependent of blockifier (the dependency is reversed).

can this be used in blockifier as well?

@ArniStarkware ArniStarkware deleted the arni/test_utils/tx_creator/streamline_invoke_v0 branch November 17, 2024 11:33
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2024
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