Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
fix: PR adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed Mar 27, 2024
1 parent 036e366 commit bcfd4f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ impl<F: Field> ExecutionGadget<F> for ErrorOOGMemoryCopyGadget<F> {
(false, U256::zero())
};

if !is_extcodecopy {
rws.offset_reset();
};

let dst_offset = rws.next().stack_value();
let src_offset = rws.next().stack_value();
let copy_size = rws.next().stack_value();
Expand Down
14 changes: 4 additions & 10 deletions zkevm-circuits/src/evm_circuit/execution/returndatacopy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,10 @@ impl<F: Field> ExecutionGadget<F> for ReturnDataCopyGadget<F> {

self.data_offset.assign_u256(region, offset, data_offset)?;

let [last_callee_id, return_data_offset, return_data_size] = [
(3, CallContextFieldTag::LastCalleeId),
(4, CallContextFieldTag::LastCalleeReturnDataOffset),
(5, CallContextFieldTag::LastCalleeReturnDataLength),
]
.map(|(_, tag)| {
let rw = rws.next();
assert_eq!(rw.field_tag(), Some(tag as u64));
rw.call_context_value()
});
let last_callee_id = rws.next().call_context_value();
let return_data_offset = rws.next().call_context_value();
let return_data_size = rws.next().call_context_value();

self.last_callee_id.assign(
region,
offset,
Expand Down
8 changes: 0 additions & 8 deletions zkevm-circuits/src/evm_circuit/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,6 @@ impl<'a> StepRws<'a> {
pub(crate) fn offset_add(&mut self, inc: usize) {
self.offset += inc
}
/// Decrement the step rw operation offset by `dec`.
pub(crate) fn offset_sub(&mut self, dec: usize) {
self.offset -= dec
}
/// Reset the step rw operation offset to 0.
pub(crate) fn offset_reset(&mut self) {
self.offset = 0
}
/// Return the next rw operation from the step.
pub(crate) fn next(&mut self) -> Rw {
let rw = self.rws[self.step.rw_index(self.offset)];
Expand Down

0 comments on commit bcfd4f7

Please sign in to comment.