From d201a1f3572c99d6f74f66b35720b018edc12fc4 Mon Sep 17 00:00:00 2001 From: Linda Guiga Date: Fri, 2 Aug 2024 22:15:27 +0100 Subject: [PATCH] Apply comments --- .../cpu/kernel/asm/mpt/linked_list/initial_tries.asm | 6 +++--- .../src/cpu/kernel/asm/mpt/linked_list/linked_list.asm | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/initial_tries.asm b/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/initial_tries.asm index c7bff476f..795453667 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/initial_tries.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/initial_tries.asm @@ -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: @@ -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) @@ -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 diff --git a/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/linked_list.asm b/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/linked_list.asm index 65c9d5287..ce7b9659e 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/linked_list.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/mpt/linked_list/linked_list.asm @@ -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: @@ -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.