Skip to content

Commit

Permalink
Resolved conflicts by keeping my changes
Browse files Browse the repository at this point in the history
  • Loading branch information
akhercha committed Dec 10, 2024
2 parents 598b13f + d7eec1d commit 3339700
Show file tree
Hide file tree
Showing 2 changed files with 450 additions and 27 deletions.
58 changes: 31 additions & 27 deletions crates/accounts/src/oracle/oracle.masm
Original file line number Diff line number Diff line change
Expand Up @@ -103,65 +103,65 @@ proc.ram_bubble_sort
dup
# => [N, N]
sub.1 dup
# => [N-1(i),N-1(i),N]
# => [N-1(i), N-1(i), N]
push.1
# => [1,N-1(i),N-1(i),N]
# => [1, N-1(i), N-1(i), N]
gt
while.true
# => [N-1(i),N]
# => [N-1(i), N]
dup
# => [N-1(i),N-1(i),N]
# => [N-1(i), N-1(i), N]
# => Inner index
push.0
# => [0(j), N-1(i),N-1(i),N]
# => [0(j), N-1(i), N-1(i), N]
dup
# => [0(j),0(j), N-1(i),N-1(i),N]
# => [0(j), 0(j), N-1(i), N-1(i), N]
swap.2
# => [N-1(i),0(j),0(j),N-1(i),N]
# => [N-1(i), 0(j), 0(j), N-1(i), N]
# We exit this loop if j > i-1
lte
# => [bool,N-1(i),0(j),N]
# => [bool, N-1(i), 0(j), N]
while.true
# => [0(j),N-1(i),N]
# => [0(j), N-1(i), N]
dup
# => [0(j),0(j),N-1(i),N]
# => [0(j), 0(j), N-1(i), N]
add.1
# => [0(j)+1,0(j),N-1(i),N]
# => [0(j)+1, 0(j), N-1(i), N]
swap
# => [0(j),0(j)+1,N-1(i),N]
# => [0(j), 0(j)+1, N-1(i), N]
exec.ram_is_lower
# => [bool, 0(j),0(j)+1,N-1(i),N]
# => [bool, 0(j), 0(j)+1, N-1(i), N]
if.true
else
dup
# => [0(j),0(j),0(j)+1,N-1(i),N]
# => [0(j), 0(j), 0(j)+1, N-1(i), N]
dup.2
# => [0(j)+1,0(j),0(j),0(j)+1,N-1(i),N]
# => [0(j)+1, 0(j), 0(j), 0(j)+1, N-1(i), N]
swap
# => [0(j),0(j)+1,0(j),0(j)+1,N-1(i),N]
# => [0(j), 0(j)+1, 0(j), 0(j)+1, N-1(i), N]
exec.ram_swap
# => [0(j),0(j)+1,N-1(i),N]
# => [0(j), 0(j)+1, N-1(i), N]
end
drop
# => [0(j)+1,N-1(i),N]
# => [0(j)+1, N-1(i), N]
dup
# => [0(j)+1,0(j)+1,N-1(i),N]
# => [0(j)+1, 0(j)+1, N-1(i), N]
dup.2
# => [N-1(i),0(j)+1,0(j)+1,N-1(i),N]
# => [N-1(i), 0(j)+1, 0(j)+1, N-1(i), N]
lt
# => [bool,0(j)+1,N-1(i),N]
# => [bool, 0(j)+1, N-1(i), N]
end
# => [0(j)+1,N-1(i),N]
# => [0(j)+1, N-1(i), N]
drop
# => [N-1(i),N]
# => [N-1(i), N]
sub.1
# => [N-2(i-1),N]
# => [N-2(i-1), N]
dup
# => [N-2(i-1),N-2(i-1),N]
# => [N-2(i-1), N-2(i-1), N]
push.1
# => [1,N-2(i-1),N-2(i-1),N]
# => [1, N-2(i-1), N-2(i-1), N]
gte
# => [bool,N-2(i-1),N]
# => [bool, N-2(i-1), N]
end
drop
end
Expand Down Expand Up @@ -284,7 +284,11 @@ export.get_median

# increments the nonce (anyone should be able to call that function)
push.1 exec.account::incr_nonce
<<<<<<< HEAD

=======

>>>>>>> origin/main
exec.sys::truncate_stack
end

Expand Down
Loading

0 comments on commit 3339700

Please sign in to comment.