Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bus-mapping/src/evm/opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ fn fn_gen_associated_ops(opcode_id: &OpcodeId) -> FnGenAssociatedOps {
// OpcodeId::ORIGIN => {},
OpcodeId::CALLER => Caller::gen_associated_ops,
OpcodeId::CALLVALUE => Callvalue::gen_associated_ops,
// OpcodeId::CALLDATALOAD => {},
OpcodeId::CALLDATASIZE => Calldatasize::gen_associated_ops,
OpcodeId::CALLDATALOAD => StackOnlyOpcode::<1>::gen_associated_ops,
// OpcodeId::CALLDATACOPY => {},
// OpcodeId::CODESIZE => {},
// OpcodeId::CODECOPY => {},
Expand Down
1 change: 1 addition & 0 deletions zkevm-circuits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ keccak256 = { path = "../keccak256"}

[dev-dependencies]
criterion = "0.3"
hex = "0.4.3"
mock = { path = "../mock" }

[[bench]]
Expand Down
7 changes: 7 additions & 0 deletions zkevm-circuits/src/evm_circuit/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ mod begin_tx;
mod bitwise;
mod byte;
mod calldatacopy;
mod calldataload;
mod calldatasize;
mod caller;
mod callvalue;
Expand Down Expand Up @@ -54,6 +55,7 @@ use begin_tx::BeginTxGadget;
use bitwise::BitwiseGadget;
use byte::ByteGadget;
use calldatacopy::CallDataCopyGadget;
use calldataload::CallDataLoadGadget;
use calldatasize::CallDataSizeGadget;
use caller::CallerGadget;
use callvalue::CallValueGadget;
Expand Down Expand Up @@ -111,6 +113,7 @@ pub(crate) struct ExecutionConfig<F> {
begin_tx_gadget: BeginTxGadget<F>,
byte_gadget: ByteGadget<F>,
calldatacopy_gadget: CallDataCopyGadget<F>,
calldataload_gadget: CallDataLoadGadget<F>,
calldatasize_gadget: CallDataSizeGadget<F>,
caller_gadget: CallerGadget<F>,
call_value_gadget: CallValueGadget<F>,
Expand Down Expand Up @@ -247,6 +250,7 @@ impl<F: Field> ExecutionConfig<F> {
begin_tx_gadget: configure_gadget!(),
byte_gadget: configure_gadget!(),
calldatacopy_gadget: configure_gadget!(),
calldataload_gadget: configure_gadget!(),
calldatasize_gadget: configure_gadget!(),
caller_gadget: configure_gadget!(),
call_value_gadget: configure_gadget!(),
Expand Down Expand Up @@ -537,6 +541,9 @@ impl<F: Field> ExecutionConfig<F> {
ExecutionState::CopyToMemory => {
assign_exec_step!(self.copy_to_memory_gadget)
}
ExecutionState::CALLDATALOAD => {
assign_exec_step!(self.calldataload_gadget)
}
ExecutionState::ErrorOutOfGasPureMemory => {
assign_exec_step!(self.error_oog_pure_memory_gadget)
}
Expand Down
Loading