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: add code hash to storage account #1309

Merged
merged 23 commits into from
Aug 1, 2024

Conversation

obatirou
Copy link
Collaborator

@obatirou obatirou commented Jul 25, 2024

Time spent on this PR:

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Resolves #1267

What is the new behavior?

  • code hash is added to model.Account
  • it is computed only once when creating a contract account

This change is Reviewable

src/backend/starknet.cairo Outdated Show resolved Hide resolved
src/kakarot/accounts/library.cairo Outdated Show resolved Hide resolved
src/kakarot/accounts/library.cairo Outdated Show resolved Hide resolved
src/kakarot/instructions/environmental_information.cairo Outdated Show resolved Hide resolved
src/kakarot/instructions/environmental_information.cairo Outdated Show resolved Hide resolved
src/kakarot/account.cairo Show resolved Hide resolved
src/backend/starknet.cairo Outdated Show resolved Hide resolved
src/kakarot/account.cairo Outdated Show resolved Hide resolved
src/kakarot/accounts/library.cairo Outdated Show resolved Hide resolved
tests/src/kakarot/accounts/test_account_contract.py Outdated Show resolved Hide resolved
@obatirou obatirou force-pushed the oba/add-code-hash-to-storage-account branch from 5838802 to 445314d Compare July 26, 2024 09:45
@obatirou obatirou marked this pull request as ready for review July 26, 2024 09:57
Copy link
Collaborator

@enitrat enitrat left a comment

Choose a reason for hiding this comment

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

lgtm

src/kakarot/instructions/environmental_information.cairo Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 82.89474% with 13 lines in your changes missing coverage. Please review.

Project coverage is 68.02%. Comparing base (a41fe3b) to head (ed6c1db).

Files Patch % Lines
src/kakarot/account.cairo 77.58% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1309      +/-   ##
==========================================
+ Coverage   67.96%   68.02%   +0.05%     
==========================================
  Files          46       46              
  Lines        6868     6930      +62     
==========================================
+ Hits         4668     4714      +46     
- Misses       2200     2216      +16     

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

src/kakarot/account.cairo Show resolved Hide resolved
@obatirou
Copy link
Collaborator Author

Blocked until a PR is done in EF-test to set the code hash in pre state.

@obatirou obatirou force-pushed the oba/add-code-hash-to-storage-account branch from 404ed02 to cbddd2a Compare July 29, 2024 12:11
@enitrat enitrat merged commit ce568f2 into kkrt-labs:main Aug 1, 2024
6 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.

feat: add code hash to the Account storage
3 participants