Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

refacto: state traits take all their args by value #1264

Conversation

tdelabro
Copy link
Contributor

@tdelabro tdelabro commented Dec 14, 2023

Following discussions with @giladchase about #1232 I split part of the changes into this PR that presents no functional changes and will therefore be easier to review and merge.

  1. the traits' methods signatures were weird. Most args were passed by value but some were by reference. All of those imp Copy, so let's pass them all by value

  2. for some reason, the set_storage_at method was declared infallible. Which we can't know for sure.


This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2023

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (77568a2) 70.99% compared to head (eae958a) 70.94%.

Files Patch % Lines
...ve_blockifier/src/state_readers/py_state_reader.rs 0.00% 3 Missing ⚠️
crates/blockifier/src/state/cached_state.rs 86.66% 2 Missing ⚠️
crates/blockifier/src/state/state_api.rs 50.00% 0 Missing and 2 partials ⚠️
crates/blockifier/src/transaction/transactions.rs 33.33% 0 Missing and 2 partials ⚠️
...tive_blockifier/src/state_readers/papyrus_state.rs 60.00% 2 Missing ⚠️
...ates/native_blockifier/src/transaction_executor.rs 0.00% 2 Missing ⚠️
crates/blockifier/src/block_execution.rs 50.00% 0 Missing and 1 partial ⚠️
...rc/execution/deprecated_syscalls/hint_processor.rs 0.00% 0 Missing and 1 partial ⚠️
crates/blockifier/src/execution/entry_point.rs 66.66% 0 Missing and 1 partial ⚠️
...lockifier/src/execution/syscalls/hint_processor.rs 0.00% 0 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1264      +/-   ##
==========================================
- Coverage   70.99%   70.94%   -0.05%     
==========================================
  Files          57       57              
  Lines        7157     7142      -15     
  Branches     7157     7142      -15     
==========================================
- Hits         5081     5067      -14     
+ Misses       1663     1660       -3     
- Partials      413      415       +2     

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

Copy link
Collaborator

@giladchase giladchase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Thanks!

Reviewed 31 of 31 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @tdelabro)

@giladchase giladchase merged commit 9aea9db into starkware-libs:main Jan 3, 2024
6 checks passed
@tdelabro tdelabro deleted the state-trait-args-by-value branch January 3, 2024 14:49
gswirski pushed a commit to reilabs/blockifier that referenced this pull request Jun 26, 2024
…ibs#1264)

* Change metadata content casing from lower camel to snake

* Respect snake case on ipfs json
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