Skip to content

Commit 0f5a975

Browse files
committed
update intro sections for zkEVM
1 parent 0a73eae commit 0f5a975

File tree

6 files changed

+26
-14
lines changed

6 files changed

+26
-14
lines changed

docs/cdk/concepts/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Welcome to Concepts
1+
Welcome to the Concepts section.

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

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

9-
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**.
9+
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.
1010

1111
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.
1212

13-
**CIRCOM takes the output of the STARK Recursion as input, so as to create its corresponding witness**.
13+
CIRCOM takes the output of the STARK Recursion as input, so as to create its corresponding witness.
1414

1515
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.
1616

@@ -50,7 +50,7 @@ CIRCOM is a Domain-Specific Language (DSL) used to define Arithmetic circuits, a
5050

5151
### CIRCOM as a DSL
5252

53-
As described in the title of its [specifications paper](https://www.techrxiv.org/articles/preprint/CIRCOM_A_Robust_and_Scalable_Language_for_Building_Complex_Zero-Knowledge_Circuits/19374986/1), CIRCOM is a **language for building complex zero-knowledge circuits**.
53+
As described in the title of its [specifications paper](https://www.techrxiv.org/articles/preprint/CIRCOM_A_Robust_and_Scalable_Language_for_Building_Complex_Zero-Knowledge_Circuits/19374986/1), CIRCOM is a language for building complex zero-knowledge circuits.
5454

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

@@ -66,7 +66,7 @@ However, CIRCOM users can also use templates from [CIRCOMLIB](https://github.com
6666

6767
In addition to being a DSL used to define and create Arithmetic circuits, CIRCOM has a special compiler of Arithmetic circuits into their equivalent R1CS.
6868

69-
The term "CIRCOM" is in fact short for **Circuit Compiler**, implying that the CIRCOM compiler takes an Arithmetic circuit as input and outputs the following:
69+
The term "CIRCOM" is in fact short for Circuit Compiler, implying that the CIRCOM compiler takes an Arithmetic circuit as input and outputs the following:
7070

7171
- A file with the R1CS description, containing the set of associated R1CS constraints, and
7272
- A program written either in C++ or WebAssembly, for efficiently computing a valid assignment to all wires of the circuit (the witness).
@@ -124,9 +124,9 @@ c <== a * b;
124124

125125
### Creation of templates
126126

127-
One of the main peculiarities of CIRCOM is the allowance to define parameterizable small circuits called **templates**.
127+
One of the main peculiarities of CIRCOM is the allowance to define parameterizable small circuits called templates.
128128

129-
Templates are **parametrizable** in the sense that their outputs depend on free input values (i.e., values that are freely chosen by users).
129+
Templates are parametrizable in the sense that their outputs depend on free input values (i.e., values that are freely chosen by users).
130130

131131
They are general descriptions of circuits, that have some input and output signals, as well as a relation between the inputs and the outputs.
132132

@@ -149,7 +149,7 @@ template Multiplier () {
149149

150150
Although the above code succeeds in creating the `Multiplier template`, the template is yet to be instantiated.
151151

152-
In CIRCOM, the instantiation of a template is called a **component**, and it is created as follows:
152+
In CIRCOM, the instantiation of a template is called a component, and it is created as follows:
153153

154154
```
155155
component main = Multiplier();
@@ -191,7 +191,7 @@ At this stage, either one of the C++ or WebAssembly programs generated by the co
191191

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

194-
Recall that **a valid set of circuit input, intermediate and output values is called the witness**.
194+
Recall that a valid set of circuit input, intermediate and output values is called the witness.
195195

196196
### Private and public signals
197197

@@ -227,7 +227,7 @@ Note that global inputs are considered `private` signals while global outputs ar
227227

228228
However, the `main` component has a special attribute to set a list of global inputs as public signals.
229229

230-
The rule of thumb is: **Any other input signal not included in this list `{public [s1,..,sn]}`, is considered private**.
230+
The rule of thumb is: Any other input signal not included in this list `{public [s1,..,sn]}`, is considered private.
231231

232232
### Concluding CIRCOM's features
233233

docs/zkEVM/concepts/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
Welcome to the Concepts section.
1+
This section covers some of the basic concepts crucial to understanding the design approach of Polygon zkEVM. Since Polygon zkEVM emulates the EVM, a few EVM basics are herein detailed.
2+
3+
One of the differences between Polygon zkEVM and Ethereum is in the way their states are recorded. Ethereum uses Patricia Merkle tries while Polygon zkEVM uses Sparse Merkle trees (SMTs). The Concepts section therefore discusses how SMTs are constructed and the Create, Read, Update and Delete operations executed on the SMTs.
4+
5+
The design approach is delineated in terms of an example: the multiplicative Fibonacci state machine. Further details of the Polygon zkEVM design are given in the form of a 'Generic state machine', which involves a program written in zkASM called the ROM.
6+
7+
This section also includes a brief discussion on what CIRCOM is, and how it is used in the zkProver.

docs/zkEVM/how-to/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
This introduction to the how to section is being written.
1+
The aim with this section is to demostrate that existing smart contracts, developer toolings and wallets work seamlessly in Polygon zkEVM as in Ethereum.
2+
3+
Herein are guides to writing a smart contract using the OpenZeppelin Wizard, deploying an NFT using Foundry, deploying an ERC-20 token using Hardhat, and verifying a smart contract either manually on the Explorer or using Remix.

docs/zkEVM/spec/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
Welcome to the specifications section.
1+
This section contains specifications of other zkEVM features not covered in the Architecture section of this documentation.
2+
3+
First are the two novel languages: The zero-knowledge Assembly (zkASM) language which interpretes the firmware of microprocessor-type state machines, and the Polynomial Identity Language (PIL) which is instrumental in enabling verification of state transitions.
4+
5+
Second are some of the differences between Polygon zkEVM and the EVM. These are differences in terms of opcodes, supported precompiled contracts, newly added features and other variances.

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ nav:
184184
- Concepts:
185185
- Concepts: zkEVM/concepts/index.md
186186
- EVM basics: zkEVM/concepts/evm-basics.md
187-
- CIRCOM: zkEVM/concepts/circom-intro-brief.md
188187
- Sparse merkle trees:
189188
- Merkle trees: zkEVM/concepts/sparse-merkle-trees/sparse-merkle-tree.md
190189
- Constructing simple SMTs: zkEVM/concepts/sparse-merkle-trees/simple-smt.md
@@ -203,6 +202,7 @@ nav:
203202
- Ending programs: zkEVM/concepts/generic-state-machine/ending-program.md
204203
- Program counter: zkEVM/concepts/generic-state-machine/program-counter.md
205204
- Plookup: zkEVM/concepts/generic-state-machine/plookup.md
205+
- CIRCOM: zkEVM/concepts/circom-intro-brief.md
206206
- Troubleshooting:
207207
- Disclosures: zkEVM/troubleshooting/risk-disclosures.md
208208
- PoS:

0 commit comments

Comments
 (0)