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

refactor(blockifier): make VersionedConstantsOverrides fields optional #1595

Conversation

ArniStarkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

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

Join @ArniStarkware and the rest of your teammates on Graphite Graphite

@ArniStarkware ArniStarkware marked this pull request as ready for review October 28, 2024 09:54
Copy link

Artifacts upload triggered. View details here

@ArniStarkware
Copy link
Contributor Author

config/mempool/default_config.json line 130 at r1 (raw file):

    "description": "Flag for an optional field.",
    "privacy": "TemporaryValue",
    "value": true

This acts well! As we want it to act.

Code quote:

    "value": true

@ArniStarkware
Copy link
Contributor Author

crates/gateway/src/stateful_transaction_validator.rs line 102 at r1 (raw file):

            max_recursion_depth: Some(self.config.max_recursion_depth),
            invoke_tx_max_n_steps: None,
        };

Suggestion:

        let versioned_constants_overrides = VersionedConstantsOverrides {
            validate_max_n_steps: Some(self.config.validate_max_n_steps),
            max_recursion_depth: Some(self.config.max_recursion_depth),
            ..Default::default(),
        };

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 5 files reviewed, 2 unresolved discussions (waiting on @ayeletstarkware)


crates/blockifier/src/versioned_constants_test.rs line 51 at r1 (raw file):

        max_recursion_depth: Some(updated_max_recursion_depth),
        invoke_tx_max_n_steps: None,
    });

Test the default values are also not changed.

Suggestion:

    let result = VersionedConstants::get_versioned_constants(VersionedConstantsOverrides {
        validate_max_n_steps: Some(updated_validate_max_n_steps),
        invoke_tx_max_n_steps: None,
        ..Default::default(),
    });

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 28.26087% with 33 lines in your changes missing coverage. Please review.

Project coverage is 46.86%. Comparing base (e3165c4) to head (7b03d3e).
Report is 40 commits behind head on main.

Files with missing lines Patch % Lines
crates/blockifier/src/versioned_constants.rs 17.64% 25 Missing and 3 partials ⚠️
crates/native_blockifier/src/py_objects.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1595      +/-   ##
==========================================
+ Coverage   40.10%   46.86%   +6.76%     
==========================================
  Files          26      210     +184     
  Lines        1895    24749   +22854     
  Branches     1895    24749   +22854     
==========================================
+ Hits          760    11599   +10839     
- Misses       1100    12360   +11260     
- Partials       35      790     +755     

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

@ArniStarkware
Copy link
Contributor Author

Lior thinks we don't need this. (He did not really look into it...)

@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 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.

2 participants