Skip to content

Commit

Permalink
Apply comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LindaGuiga committed Aug 2, 2024
1 parent f2b29b2 commit d201a1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// to mem[payload_ptr_ptr] + step*i,
// for i =0..n_leaves. This is used to constraint the
// initial state and account tries payload pointers such that they are exactly
// those of the inital accounts and linked lists.
// those of the initial accounts and linked lists.
// Pre stack: node_ptr, account_ptr_ptr, storage_ptr_ptr, retdest
// Post stack: account_ptr_ptr, storage_ptr_ptr
global mpt_set_payload:
Expand All @@ -19,7 +19,7 @@ global mpt_set_payload:
DUP1 %eq_const(@MPT_NODE_LEAF) %jumpi(set_payload_leaf)
DUP1 %eq_const(@MPT_NODE_HASH) %jumpi(skip)
PANIC

skip:
// stack: node_type, after_node_type, account_ptr_ptr, storage_ptr_ptr, retdest
%stack (node_type, after_node_type, account_ptr_ptr, storage_ptr_ptr, retdest) -> (retdest, account_ptr_ptr, storage_ptr_ptr)
Expand Down Expand Up @@ -118,7 +118,7 @@ set_payload_storage_branch:
JUMP

set_payload_extension:
// stack: node_type, after_node_type, account_ptr_ptr, storage_ptr_ptr,retdest
// stack: node_type, after_node_type, account_ptr_ptr, storage_ptr_ptr, retdest
POP
// stack: after_node_type, account_ptr_ptr, storage_ptr_ptr, retdest
%add_const(2) %mload_trie_data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ global store_initial_slots:
PUSH @SEGMENT_STORAGE_LINKED_LIST
ADD
// stack: cur_len, retdest
PUSH @SEGMENT_STORAGE_LINKED_LIST
PUSH @SEGMENT_STORAGE_LINKED_LIST
%next_slot

loop_store_initial_slots:
Expand Down Expand Up @@ -500,12 +500,12 @@ next_node_ok_with_value:
DUP5
MSTORE_GENERAL
// stack: new_ptr + 1, next_ptr, addr_key, key, value, retdest
// Append the value to `TrieDataSegment` and write the resulting payload_ptr.
// Write the value in the linked list.
%increment
DUP1 %increment
// stack: new_ptr+3, new_payload_ptr_ptr, next_ptr, addr_key, key, value, retdest
%stack (new_cloned_payload_ptr_ptr, new_payload_ptr_ptr, next_ptr, addr_key, key, value, retdest)
-> (value, new_cloned_payload_ptr_ptr, value, new_payload_ptr_ptr, new_cloned_payload_ptr_ptr, next_ptr, retdest)
// stack: new_ptr+3, new_value_ptr, next_ptr, addr_key, key, value, retdest
%stack (new_cloned_value_ptr, new_value_ptr, next_ptr, addr_key, key, value, retdest)
-> (value, new_cloned_value_ptr, value, new_value_ptr, new_cloned_value_ptr, next_ptr, retdest)
MSTORE_GENERAL // Store copied value.
MSTORE_GENERAL // Store value.

Expand Down

0 comments on commit d201a1f

Please sign in to comment.