Skip to content

Commit 10a6234

Browse files
committed
review zkevm - specs to concepts
1 parent 59143cb commit 10a6234

29 files changed

+596
-570
lines changed

docs/zkEVM/api/check-tx-status.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ After sending a transaction (TX) to the network using the `eth_sendRawTransactio
99
1. `eth_getTransactionByHash`
1010
2. `eth_getTransactionReceipt`
1111

12-
### Using `eth_getTransactionByHash`
12+
### Using eth_getTransactionByHash
1313

1414
When checking the TX status using the `eth_getTransactionByHash`, the result can be either one of the following.
1515

@@ -21,7 +21,7 @@ When checking the TX status using the `eth_getTransactionByHash`, the result can
2121

2222
- If the fields `block_num` and `block_hash` are NOT null, it means the TX was mined.
2323

24-
### Using `eth_getTransactionReceipt`
24+
### Using eth_getTransactionReceipt
2525

2626
When checking the TX status using the `eth_getTransactionReceipt`, again the result can either one of the following.
2727

docs/zkEVM/concepts/circom-intro-brief.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
!!!info
22
In this document, we describe the CIRCOM component of the zkProver. It is one of the four main components of the zkProver, as outlined [here](../architecture/zkprover/index.md). These principal components are; the Executor or Main SM, STARK Recursion, CIRCOM, and Rapid SNARK.
33

4-
You may refer to the original [CIRCOM research paper](https://www.techrxiv.org/articles/preprint/CIRCOM_A_Robust_and_Scalable_Language_for_Building_Complex_Zero-Knowledge_Circuits/19374986/1) for more details.
4+
You may refer to the original [CIRCOM paper](https://www.techrxiv.org/articles/preprint/CIRCOM_A_Robust_and_Scalable_Language_for_Building_Complex_Zero-Knowledge_Circuits/19374986/1) for more details.
55

6-
As seen in the [zkProver Overview](../architecture/zkprover/index.md) document, the output of the STARK Recursion component is a STARK proof.
6+
As seen in the [zkProver overview](../architecture/zkprover/index.md) document, the output of the STARK recursion component is a STARK proof.
77

88
The next step in the zkProver's process of providing validity proof is to produce the witness similar to the output of the STARK Recursion.
99

1010
Although the zkProver is designed as a state machine emulating the EVM, in order to generate this witness, it makes use of a tool based on the Arithmetic circuits model, called CIRCOM.
1111

1212
CIRCOM takes the output of the STARK Recursion as input, so as to create its corresponding witness.
1313

14-
The witness is in turn taken as input to the Rapid SNARK, which is used to generate a SNARK proof published as the validity proof.
14+
The witness is in turn taken as an input to the Rapid SNARK, which is used to generate a SNARK proof published as the validity proof.
1515

1616
![CIRCOM's input and output](../../img/zkEVM/01circom-witness-zkprover.png)
1717

18-
In fact, CIRCOM takes a STARK proof as input and produces its corresponding Arithmetic circuit, expressed as the equivalent set of equations called Rank-1 Constraint System (R1CS).
18+
In fact, CIRCOM takes a STARK proof as input and produces its corresponding Arithmetic circuit, expressed as the equivalent set of equations called rank-1 constraint system (R1CS).
1919

2020
The set of valid circuit input, intermediate and output values satisfying the R1CS is actually the witness related to the input STARK proof.
2121

22-
This document focuses on what CIRCOM is, its common context of implementation, and how the zkProver utilizes CIRCOM.
22+
This document focuses on what CIRCOM is, its common implementation context, and how the zkProver utilizes CIRCOM.
2323

2424
## Circuit context
2525

2626
Arithmetic circuits are mostly used as standard models for studying the complexity of computations.
2727

2828
An Arithmetic circuit is composed of addition and multiplication gates, and wires that carry values that are elements of a prime finite field $\mathbb{F}_p$, where $p$ is typically a very large prime number.
2929

30-
In the context of ZK-Proof protocols, a prover can use an Arithmetic circuit to prove knowledge of a valid assignment to all wires of the circuit.
30+
In the context of ZK-proof protocols, a prover can use an Arithmetic circuit to prove knowledge of a valid assignment to all wires of the circuit.
3131

3232
And if the proof is correct, the verifier is convinced that the computation expressed as the Arithmetic circuit is valid, but learns nothing about the wires’ assigned values.
3333

34-
Arithmetic circuits are commonly encoded in the form of a set of equations called Rank-1 Constraint System (R1CS).
34+
Arithmetic circuits are commonly encoded in the form of R1CS.
3535

3636
Once obtained, the R1CS can later be used by a zk-SNARK protocol to generate verifiable proof.
3737

@@ -43,7 +43,7 @@ CIRCOM was developed for the very purpose of scaling complex Arithmetic circuits
4343

4444
## What is CIRCOM?
4545

46-
CIRCOM is a Domain-Specific Language (DSL) used to define Arithmetic circuits, and it has an associated compiler of Arithmetic circuits to their respective Rank-1 Constraint System (or R1CS).
46+
CIRCOM is a domain-specific language (DSL) used to define Arithmetic circuits, and it has an associated compiler of Arithmetic circuits to their respective R1CS.
4747

4848
![CIRCOM Overall Context](../../img/zkEVM/02circom-overall-context.png)
4949

@@ -53,9 +53,9 @@ As described in the title of its [specifications paper](https://www.techrxiv.org
5353

5454
It is designed as a low-level circuit language, mimicking the design of electronic circuits, for naturally defining Arithmetic circuits.
5555

56-
As a Domain-Specific Language (DSL), it allows programmers to design and create Arithmetic circuits of their own choice, and later on apply these circuits to ZK tools.
56+
As a DSL, it allows programmers to design and create Arithmetic circuits of their own choice, and later on apply these circuits to ZK tools.
5757

58-
One of the main peculiarities of CIRCOM is its modularity as a language. It allows the definition of parameterizable small circuits called templates, which can be instantiated to form part of larger circuits.
58+
One of the main peculiarities of CIRCOM is its modularity as a language. It allows the definition of parameterizable small circuits called _templates_, which can be instantiated to form part of larger circuits.
5959

6060
In this regard, CIRCOM users can use templates to create their own custom circuits with varied complexity.
6161

@@ -86,7 +86,7 @@ $$
8686
\texttt{a} \times \texttt{b} \texttt{ - c = 0}
8787
$$
8888

89-
### The _pragma_ instruction
89+
### The pragma instruction
9090

9191
The _pragma_ instruction specifies the version of the CIRCOM compiler being used. It is meant to ensure compatibility between the circuit and the compiler version. If the two are incompatible, the compiler throws a warning.
9292

@@ -179,7 +179,7 @@ Given a circuit with the _multiplier.circom_ extension, the following line of co
179179
circom multiplier.circom --r1cs --c --wasm --sym
180180
```
181181

182-
After compiling the _.circom_ circuit, the compiler returns four files:
182+
After compiling the _.circom_ circuit, the compiler returns four files,
183183

184184
- A file with the R1CS constraints (symbolic task)
185185
- A C++ program for computing values of the circuit wires (computational task)
@@ -188,7 +188,7 @@ After compiling the _.circom_ circuit, the compiler returns four files:
188188

189189
At this stage, either one of the C++ or WebAssembly programs generated by the compiler can be used to compute all signals that match the set of constraints of the circuit.
190190

191-
Whichever program is used, needs as input, a file containing a set of valid input values.
191+
Whichever program is used, needs as input a file containing a set of valid input values.
192192

193193
Recall that a valid set of circuit input, intermediate and output values is called the witness.
194194

0 commit comments

Comments
 (0)