Skip to content

Commit

Permalink
Fix clone_slot
Browse files Browse the repository at this point in the history
  • Loading branch information
LindaGuiga committed Jul 16, 2024
1 parent d9840d4 commit b0c4248
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions evm_arithmetization/src/cpu/kernel/asm/mpt/accounts.asm
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
// stack: cloned_account_ptr
%endmacro

// The slot_ptr cannot be 0, because `insert_slot`
// is only called in `revert_storage_change` (where the case `slot_ptr = 0`
// is dealt with differently), and in `storage_write`,
// where writing 0 actually corresponds to a `delete`.
%macro clone_slot
// stack: slot_ptr
DUP1
%jumpi(%%non_zero_ptr)
%jump(%%avoid_clonning_zero_ptr)
%%non_zero_ptr:
DUP1 %assert_nonzero
%get_trie_data_size
%%avoid_clonning_zero_ptr:
// stack: cloned_slot_ptr
// stack: cloned_slot_ptr, slot_ptr
SWAP1
%mload_trie_data
%append_to_trie_data
Expand Down

0 comments on commit b0c4248

Please sign in to comment.