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

Commit e19d40d

Browse files
authored
chore: proofreading the docs (#1093)
* Update EVM_Circuit.md * Update Tx_Circuit.md
1 parent f430c5a commit e19d40d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/EVM_Circuit.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The [Ethereum Virtual Machine] (EVM) is a state machine that defines the rules o
2222

2323
The execution trace consists of each step of execution defined by the opcode. EVM Circuit aims at constructing a constraint system corresponding to this execution trace, that can be proved by some backend zk-proof system such as Halo2.
2424

25-
The high-level design idea of EVM Circuit is somewhat reminiscent of the design of EVM itself (such as [go-ethereum]). In go-ethereum, an `Intepreter` loops over all instruction opcodes along the execution trace. At each instruction, the `Intepreter` helps to check relevant context information such as gas, stack, memory etc., and then sends the opcode to a `JumpTable` from which it fetches detailed `operation` that this opcode should do.
25+
The high-level design idea of EVM Circuit is somewhat reminiscent of the design of EVM itself (such as [go-ethereum]). In go-ethereum, an `Interpreter` loops over all instruction opcodes along the execution trace. At each instruction, the `Interpreter` helps to check relevant context information such as gas, stack, memory etc., and then sends the opcode to a `JumpTable` from which it fetches detailed `operation` that this opcode should do.
2626

2727
Analogously, in EVM Circuit, we build <i>execution steps</i> according to the steps in the execution trace, with witnesses for both the opcode and the execution context. For each execution step, a set of constraints is imposed to check context information. For each opcode, a set of constraints is imposed to check the opcode's behavior. Within an execution trace, the same opcode should have the same constraints. We use a selector to "turn on" all steps for the same opcode within a trace and we prove their behavior using our backend proof system. This is possible thanks to how our backend proof system (Halo2) works. The overall proof is obtained by applying this scheme to the list of all opcodes that appear in the execution trace.
2828

@@ -334,7 +334,7 @@ Then the constraints are
334334
$b=\mu_{s}[1]$, $n=\mu_{s}[2]$,
335335
$r=\mu_{s}'[0]$;
336336
- Exceptions:
337-
- 1. stack undeflow: $1022 \leq$ stack\_pointer $\leq 1024$;
337+
- 1. stack underflow: $1022 \leq$ stack\_pointer $\leq 1024$;
338338
- 2. out of gas: Remaining gas is not enough.
339339

340340

docs/Tx_Circuit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Assign an empty row first, then followed by each tx's data fields except calldat
181181
- Lookup RLP table to validate the value correspond to any of these tags with the corresponding hash format `L1MsgHash`(for `tx_type==L1Msg`) or `TxHashPreEip155` (for `tx_type==PreEip155`) or `TxHashEip155` (for `tx_type==Eip155`).
182182

183183
- lookup to sig table for signature information `(msg_hash_rlc, v, r, s, sv_address)`
184-
- triggerd with tx_tag is ChainID and `is_l1_msg==false`;
184+
- triggered with tx_tag is ChainID and `is_l1_msg==false`;
185185
- lookup `(msg_hash_rlc=TxSignHash, v, r, s, sv_address)` to sig_table. `v` is determined based on `chain_id` and `ty_type` being `Eip155` or `PreEip155`.
186186

187187
- lookup to Keccak table for TxSign and TxHash data length and hash result (LookupCondition::Keccak)

0 commit comments

Comments
 (0)