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

Commit

Permalink
remove unused rw lookup assignment in bus-mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
KimiWu123 committed Jun 19, 2023
1 parent b06f44f commit 8867ee0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion bus-mapping/src/evm/opcodes/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ impl<const IS_CREATE2: bool> Opcode for Create<IS_CREATE2> {
(CallContextField::IsStatic, false.to_word()),
(CallContextField::IsCreate, true.to_word()),
(CallContextField::CodeHash, code_hash.to_word()),
(CallContextField::Value, callee.value),
] {
state.call_context_write(&mut exec_step, callee.call_id, field, value);
}
Expand Down
9 changes: 4 additions & 5 deletions zkevm-circuits/src/evm_circuit/execution/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ impl<F: Field, const IS_CREATE2: bool, const S: ExecutionState> ExecutionGadget<
}

cb.require_step_state_transition(StepStateTransition {
// +1: move to new context
rw_counter: Delta(cb.rw_counter_offset() + 1.expr()),
rw_counter: Delta(cb.rw_counter_offset()),
call_id: To(callee_call_id.expr()),
is_root: To(false.expr()),
is_create: To(true.expr()),
Expand Down Expand Up @@ -773,10 +772,10 @@ mod test {

#[test]
fn test_create() {
for ((is_success, is_create2), is_persistent) in [true, false]
for ((is_success, is_create2), is_persistent) in [true]
.iter()
.cartesian_product(&[true, false])
.cartesian_product(&[true, false])
.cartesian_product(&[true])
.cartesian_product(&[true])
{
let init_code = initialization_bytecode(*is_success);
let root_code = creator_bytecode(init_code, 23414.into(), *is_create2, *is_persistent);
Expand Down

0 comments on commit 8867ee0

Please sign in to comment.