Skip to content

refactor: make some order in error types #157

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

Merged
merged 1 commit into from
May 29, 2024

Conversation

nimrod-starkware
Copy link
Contributor

@nimrod-starkware nimrod-starkware commented May 28, 2024

This change is Reviewable

Copy link
Collaborator

@dorimedini-starkware dorimedini-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 8 of 8 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @amosStarkware and @nimrod-starkware)


crates/committer/src/forest_errors.rs line 8 at r1 (raw file):

use thiserror::Error;
pub(crate) type ForestResult<T> = Result<T, ForestError<LeafDataImpl>>;

newline after uses

Suggestion:

use thiserror::Error;

pub(crate) type ForestResult<T> = Result<T, ForestError<LeafDataImpl>>;

crates/committer/src/forest_errors.rs line 31 at r1 (raw file):

    #[error("Can't fill storage trie, because there is no updated skeleton at address {0:?}")]
    MissingUpdatedSkeleton(ContractAddress),
}

no need for extra indirection

Suggestion:

    #[error("Can't build storage trie's updated skeleton, because there is no original skeleton at address {0:?}")]
    MissingOriginalSkeleton(ContractAddress),
    #[allow(dead_code)]
    #[error("Can't fill storage trie, because there is no updated skeleton at address {0:?}")]
    MissingUpdatedSkeleton(ContractAddress),
}

@nimrod-starkware nimrod-starkware force-pushed the nimrod/errors_refactor branch from 8e10052 to ba49f80 Compare May 28, 2024 13:42
Copy link
Contributor Author

@nimrod-starkware nimrod-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, 2 unresolved discussions (waiting on @amosStarkware and @dorimedini-starkware)


crates/committer/src/forest_errors.rs line 8 at r1 (raw file):

Previously, dorimedini-starkware wrote…

newline after uses

Done.


crates/committer/src/forest_errors.rs line 31 at r1 (raw file):

Previously, dorimedini-starkware wrote…

no need for extra indirection

Done.

@nimrod-starkware nimrod-starkware force-pushed the nimrod/errors_refactor branch from ba49f80 to 8f294f3 Compare May 28, 2024 13:42
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 40.00000% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 61.44%. Comparing base (2ef9eac) to head (8f294f3).

Files Patch % Lines
...ter/src/patricia_merkle_tree/filled_tree/forest.rs 0.00% 4 Missing ⚠️
...kle_tree/original_skeleton_tree/skeleton_forest.rs 72.72% 0 Missing and 3 partials ⚠️
...rkle_tree/updated_skeleton_tree/skeleton_forest.rs 0.00% 3 Missing ⚠️
crates/committer/src/block_committer/commit.rs 0.00% 1 Missing ⚠️
crates/committer/src/forest_errors.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
- Coverage   61.58%   61.44%   -0.14%     
==========================================
  Files          35       36       +1     
  Lines        1442     1442              
  Branches     1442     1442              
==========================================
- Hits          888      886       -2     
  Misses        512      512              
- Partials       42       44       +2     

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

Copy link
Collaborator

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

@nimrod-starkware nimrod-starkware added this pull request to the merge queue May 29, 2024
Merged via the queue into main with commit 49f0b8d May 29, 2024
11 checks passed
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.

3 participants