Crate zkevm_circuits
source ·Expand description
§zk_evm
Modules§
- The bytecode circuit implementation.
- Circuit utilities
- The Copy circuit implements constraints and lookups for read-write steps for copied bytes while execution opcodes such as CALLDATACOPY, CODECOPY, LOGS, etc.
- The EVM circuit implementation.
- Exponentiation verification circuit.
- The instance definition.
- The keccak circuit implementation.
- The MPT circuit implementation.
- Public Input Circuit implementation
- The Root circuit implementation.
- Circuit to verify multiple ECDSA secp256k1 signatures.
- The state circuit implementation.
- The Super Circuit is a circuit that contains all the circuits of the zkEVM in order to achieve two things:
- Table definitions used cross-circuits
- Testing utilities
- The transaction circuit implementation.
- Common utility traits and functions.
- Witness for all circuits. The
Block<F>
is the witness struct post-processed from geth traces and used to generate witnesses for circuits.
Macros§
- Creates a dummy constraint builder that cannot be used to add constraints.
- ifx
- matchx Supports
_
which works the same as in the normalmatch
: if none of the other arms are active the_
arm will be executed and so can be used to return some default values or could also be marked as unreachable (using the unreachablex! macro). - _require
- _require2
- Can be used to mark a specific branch as unreachable
- assign advice
- assign fixed
- Circuit builder macros Nested macro’s can’t do repetition https://github.com/rust-lang/rust/issues/35853 so we expose a couple of permutations here manually.
- Concats arguments with preamble consisting of the originating file and line.
- Implementation trait
Expr
for type able to be casted to u64 - Implement
ExprResult
for tuples - Implementation trait
ExprVec
for type able to be casted to an Expression - matchw - Resembles matchx so that the witness generation can look like the circuit code.
- require_parser