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 impl for GasCosts in versioned_constants #2067

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yonatan-Starkware
Copy link

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

Artifacts upload triggered. View details here

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 4.16667% with 23 lines in your changes missing coverage. Please review.

Project coverage is 68.85%. Comparing base (b0cfe82) to head (1d93eab).
Report is 883 commits behind head on main.

Files with missing lines Patch % Lines
crates/blockifier/src/versioned_constants.rs 4.16% 23 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (b0cfe82) and HEAD (1d93eab). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (b0cfe82) HEAD (1d93eab)
3 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2067      +/-   ##
==========================================
- Coverage   74.18%   68.85%   -5.34%     
==========================================
  Files         359      105     -254     
  Lines       36240    13700   -22540     
  Branches    36240    13700   -22540     
==========================================
- Hits        26886     9433   -17453     
+ Misses       7220     3864    -3356     
+ Partials     2134      403    -1731     
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it 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: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @avi-starkware and @Yonatan-Starkware)


crates/blockifier/src/versioned_constants.rs line 592 at r1 (raw file):

    pub fn get_builtin_gas_cost(&self, builtin: &BuiltinName) -> u64 {
        match *builtin {
            BuiltinName::output => 0,

Please locate all zeros at the end and document them
segment_arena - it's a virtual builtin.
output - not relevant for smart contract.
The rest are not supported for cairo 1


crates/blockifier/src/versioned_constants.rs line 631 at r1 (raw file):

            SyscallSelector::StorageRead => self.storage_read_gas_cost,
            SyscallSelector::StorageWrite => self.storage_write_gas_cost,
            _ => 0,

Please list all cases explicitly (we don't like default, it could hide bugs)

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.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Yonatan-Starkware)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants