Skip to content

Commit

Permalink
fix: Fix circuit implementation of EVM memory stipend (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov authored Jan 20, 2025
1 parent 965841d commit 07f7b8d
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1136,18 +1136,18 @@ where
zkevm_opcode_defs::system_params::NEW_EVM_FRAME_MEMORY_STIPEND,
);

let memory_stipend = UInt32::conditionally_select(
let memory_size_stipend_for_userspace = UInt32::conditionally_select(
cs,
new_callstack_entry.is_kernel_mode,
&memory_size_stipend_for_kernel,
versioned_byte_is_evm_bytecode,
&memory_size_stipend_for_evm,
&memory_size_stipend_for_userspace,
);

let memory_stipend = UInt32::conditionally_select(
cs,
versioned_byte_is_evm_bytecode,
&memory_size_stipend_for_evm,
&memory_stipend,
new_callstack_entry.is_kernel_mode,
&memory_size_stipend_for_kernel,
&memory_size_stipend_for_userspace,
);

new_callstack_entry.heap_upper_bound = memory_stipend;
Expand Down

0 comments on commit 07f7b8d

Please sign in to comment.