Skip to content

Commit

Permalink
consolidations: move type store
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Sep 27, 2024
1 parent 367e817 commit 0aa9e8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/consolidations/main.eas
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,6 @@ accum_loop:
push OUT_RECORD_SIZE ;; [size, i, i, count, head_idx, tail_idx]
mul ;; [record_offset, i, count, head_idx, tail_idx]

;; Store request type to output.
push OUT_RECORD_TYPE ;; [type, record_offset, i, ..]
dup2 ;; [record_offset, type, record_offset, i, ..]
mstore8 ;; [record_offset, i, ..]

;; Determine the storage slot of the address for this iteration. This value is
;; also the base for the other storage slots containing the source and the target
;; public keys. The base slot will be (queue_offset + (queue_head + i)*SLOTS_PER_ITEM).
Expand Down Expand Up @@ -275,6 +270,11 @@ accum_loop:
;; (addr, source[0:32], source[32:48] ++ target[0:16], target[16:48])
;; so there is no padding.

;; Store request type to output.
push OUT_RECORD_TYPE ;; [type, target[16:32], src[32:48] ++ tgt[0:16], source[0:32], addr, record_offset, i, ..]
dup6 ;; [record_offset, type, target[16:32], src[32:48] ++ tgt[0:16], source[0:32], addr, record_offset, i, ..]
mstore8 ;; [target[16:32], src[32:48] ++ tgt[0:16], source[0:32], addr, record_offset, i, ..]

;; Shift addr bytes.
swap3 ;; [addr, src[32:48] ++ tgt[0:16], source[0:32], target[16:32], record_offset, i, ..]
push 12*8 ;; [96, addr, src[32:48] ++ tgt[0:16], source[0:32], target[16:32], record_offset, i, ..]
Expand Down

0 comments on commit 0aa9e8e

Please sign in to comment.