Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Put balance in Account instead of State #807

Merged
merged 5 commits into from
Nov 22, 2023

Conversation

ClementWalter
Copy link
Member

Time spent on this PR: 0.2

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?

The model.State maintains a dict for accounts balances.
This is a mis conception due the the false belief that "we don't want
to fetch an account just to send ETH". But there is no way to send ETH
without making a CALL (apart in SELFDESTRUCT).

What is the new behavior?

The balance belongs to the Account instead (as in the ef tests json description for example).

Note: this is a preliminary work to run Kakarot in standalone (no syscall, ie. no Starknet) mode.

@ClementWalter ClementWalter force-pushed the cw/add-balance-in-account branch from 191236f to 4a74b87 Compare November 21, 2023 17:20
@ClementWalter ClementWalter force-pushed the cw/add-balance-in-account branch 2 times, most recently from 7780b4d to d407679 Compare November 22, 2023 10:43
@ClementWalter ClementWalter force-pushed the cw/add-balance-in-account branch from d407679 to b597d61 Compare November 22, 2023 11:46
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

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

Comparison is base (e8be317) 71.44% compared to head (d3f3afb) 71.90%.

Files Patch % Lines
src/data_availability/starknet.cairo 20.21% 75 Missing ⚠️
src/kakarot/account.cairo 86.84% 5 Missing ⚠️
src/kakarot/library.cairo 20.00% 4 Missing ⚠️
src/kakarot/instructions/block_information.cairo 0.00% 2 Missing ⚠️
src/kakarot/instructions/system_operations.cairo 60.00% 2 Missing ⚠️
src/kakarot/kakarot.cairo 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #807      +/-   ##
==========================================
+ Coverage   71.44%   71.90%   +0.46%     
==========================================
  Files          45       47       +2     
  Lines        6118     6041      -77     
==========================================
- Hits         4371     4344      -27     
+ Misses       1747     1697      -50     

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

@ClementWalter ClementWalter force-pushed the cw/add-balance-in-account branch from 8d069f5 to d3f3afb Compare November 22, 2023 13:21
Copy link
Member

@Eikix Eikix left a comment

Choose a reason for hiding this comment

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

looks good to me

@Eikix Eikix merged commit 4c10873 into kkrt-labs:main Nov 22, 2023
6 of 7 checks passed
@ClementWalter ClementWalter deleted the cw/add-balance-in-account branch November 22, 2023 14:56
matthieuauger pushed a commit to matthieuauger/kakarot that referenced this pull request Nov 9, 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