starkware-libs / blockifier

Blockifier is a Rust implementation for the transaction-executing component in the StarkNet sequencer, in charge of creating state diffs and blocks.
Apache License 2.0
169 stars 107 forks source link

fix(concurrency): fix add fee to sequencer balance so it will check u128 #1915

Closed meship-starkware closed 5 months ago

meship-starkware commented 5 months ago

overflow


This change is Reviewable

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.04%. Comparing base (0105b9d) to head (8cc8e52).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1915 +/- ## ======================================= Coverage 78.04% 78.04% ======================================= Files 61 61 Lines 8759 8759 Branches 8759 8759 ======================================= Hits 6836 6836 Misses 1485 1485 Partials 438 438 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

avi-starkware commented 5 months ago

crates/blockifier/src/concurrency/worker_logic.rs line 251 at r1 (raw file):

Previously, noaov1 (Noa Oved) wrote…
What will happen in case this is run in cairo?

By the way, I don't think we check for overflows anywhere else in the blockifier code.

avi-starkware commented 5 months ago

crates/blockifier/src/concurrency/worker_logic.rs line 251 at r1 (raw file):

Previously, noaov1 (Noa Oved) wrote…
Which other places? We usually run the cairo code in such scenarios, so it's worth understanding what happens there

I don't know... Shouldn't it happen in areas related to fee computation? I tried to find another example in the code an couldn't.