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
171 stars 99 forks source link

fix(concurrency): add the sequencer key when checking if the tx is #1980

Closed meship-starkware closed 1 month ago

meship-starkware commented 1 month ago

too big in concurrency mode


This change is Reviewable

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.85%. Comparing base (6e06e79) to head (2bdfae7). Report is 6 commits behind head on main.

Files Patch % Lines
.../blockifier/src/transaction/account_transaction.rs 50.00% 0 Missing and 2 partials :warning:
...lockifier/src/transaction/transaction_execution.rs 80.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1980 +/- ## ========================================== + Coverage 78.42% 78.85% +0.42% ========================================== Files 62 62 Lines 8913 9031 +118 Branches 8913 9031 +118 ========================================== + Hits 6990 7121 +131 + Misses 1476 1460 -16 - Partials 447 450 +3 ```

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

avi-starkware commented 1 month ago

crates/blockifier/src/state/cached_state.rs line 623 at r3 (raw file):

    pub fn update_sequencer_key_in_storage(&mut self, tx_context: &TransactionContext) {
        let seqencer_address = tx_context.block_context.block_info.sequencer_address;
        let seqencer_is_sender = seqencer_address == tx_context.tx_info.sender_address();

Suggestion:

        let sequencer_address = tx_context.block_context.block_info.sequencer_address;
        let sequencer_is_sender = sequencer_address == tx_context.tx_info.sender_address();