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

Commit

Permalink
fix(zkevm-circuits/begin_tx): add constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
curryrasul committed Mar 4, 2024
1 parent 13d9cba commit c40d3da
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion zkevm-circuits/src/evm_circuit/execution/begin_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,16 @@ impl<F: Field> ExecutionGadget<F> for BeginTxGadget<F> {
caller_nonce_hash_bytes.to_word(),
);

// cb.keccak_table_lookup(input_rlc, input_len, output);
cb.keccak_table_lookup(
create.code_hash_keccak_rlc(cb),
32.expr(),
cb.curr.state.code_hash.to_word(),
);
cb.require_equal_word(
"code hash equivalence",
code_hash.to_word(),
create.code_hash().to_word(),
);

cb.account_write(
call_callee_address.to_word(),
Expand Down

0 comments on commit c40d3da

Please sign in to comment.