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

Commit c40d3da

Browse files
committed
fix(zkevm-circuits/begin_tx): add constraints
1 parent 13d9cba commit c40d3da

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,16 @@ impl<F: Field> ExecutionGadget<F> for BeginTxGadget<F> {
216216
caller_nonce_hash_bytes.to_word(),
217217
);
218218

219-
// cb.keccak_table_lookup(input_rlc, input_len, output);
219+
cb.keccak_table_lookup(
220+
create.code_hash_keccak_rlc(cb),
221+
32.expr(),
222+
cb.curr.state.code_hash.to_word(),
223+
);
224+
cb.require_equal_word(
225+
"code hash equivalence",
226+
code_hash.to_word(),
227+
create.code_hash().to_word(),
228+
);
220229

221230
cb.account_write(
222231
call_callee_address.to_word(),

0 commit comments

Comments
 (0)