Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 75b3827

Browse files
authored
constrain log memory address (#920)
1 parent 83b4d3b commit 75b3827

File tree

1 file changed

+6
-2
lines changed
  • zkevm-circuits/src/evm_circuit/execution

1 file changed

+6
-2
lines changed

zkevm-circuits/src/evm_circuit/execution/logs.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@ impl<F: Field> ExecutionGadget<F> for LogGadget<F> {
124124

125125
// check memory copy
126126
let mstart = cb.query_cell_phase2();
127-
let memory_address = MemoryAddressGadget::construct(cb, mstart, msize);
128-
127+
let memory_address = MemoryAddressGadget::construct(cb, mstart.clone(), msize);
128+
cb.require_equal(
129+
"mstart == mstart_word value",
130+
mstart.expr(),
131+
mstart_word.original_word(),
132+
);
129133
cb.condition(mstart_word.overflow(), |cb| {
130134
cb.require_zero(
131135
"Memory size must be zero if memory start is overflow",

0 commit comments

Comments
 (0)