Skip to content

Commit 3f79a7a

Browse files
authored
docs(zkit): update README.md (#149)
* chore: fix typos in docs and logs * docs(zkit): update README.md
1 parent add5003 commit 3f79a7a

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

SM/src/sm/sm_main/sm_main_exec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ console.log("fastDebugExit: ", ctx.zkPC, rom.labels)
10181018
if ((typeof ctx.hashK[addr].reads[pos] !== "undefined") &&
10191019
(ctx.hashK[addr].reads[pos] != size))
10201020
{
1021-
throw new Error(`HashK(${addr}) diferent read sizes (${ctx.hashK[addr].reads[pos]} != ${size}) in the same position ${pos} ${sourceRef}`)
1021+
throw new Error(`HashK(${addr}) different read sizes (${ctx.hashK[addr].reads[pos]} != ${size}) in the same position ${pos} ${sourceRef}`)
10221022
}
10231023
ctx.hashK[addr].reads[pos] = size;
10241024
incHashPos = size;
@@ -1094,7 +1094,7 @@ console.log("fastDebugExit: ", ctx.zkPC, rom.labels)
10941094
if ((typeof ctx.hashP[addr].reads[pos] !== "undefined") &&
10951095
(ctx.hashP[addr].reads[pos] != size))
10961096
{
1097-
throw new Error(`HashP(${addr}) diferent read sizes in the same position ${pos} (${ctx.hashP[addr].reads[pos]} != ${size}) ${sourceRef}`);
1097+
throw new Error(`HashP(${addr}) different read sizes in the same position ${pos} (${ctx.hashP[addr].reads[pos]} != ${size}) ${sourceRef}`);
10981098
}
10991099
ctx.hashP[addr].reads[pos] = size;
11001100
incHashPos = size;
@@ -2057,7 +2057,7 @@ function assertOutputs(ctx){
20572057
throw new Error("Assert Error: newNumBatch does not match");
20582058
}
20592059

2060-
console.log("Assert outputs run succesfully");
2060+
console.log("Assert outputs run successfully");
20612061
}
20622062

20632063

stark-circuits/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Stark circuit is the valilla Stark verifier implementation atop both BN254 and B
44
This code orignals from [Hermez pil-stark](https://github.com/0xPolygonHermez/pil-stark), and here we generalize the basic blocks for big fields, using `eSize` as the number of Godilocks elements to indicate one of big field.
55

66

7-
For the [recursion-aggregation-composition architechure](../docs/recursion-aggregation-composition.png)(source: p14, [proof-recursion](https://github.com/0xPolygonHermez/zkevm-techdocs/blob/main/proof-recursion/v.1.1/proof-recursion.pdf)), the final stage is generated atop big field for final verification on L1, like Ethereum or Cardano, which means that before final stage, all computation are atop Godilocks, when into the final stage, it verifys the Snark proof of stark's verification computation atop big field.
7+
For the [recursion-aggregation-composition architecture](../docs/recursion-aggregation-composition.png)(source: p14, [proof-recursion](https://github.com/0xPolygonHermez/zkevm-techdocs/blob/main/proof-recursion/v.1.1/proof-recursion.pdf)), the final stage is generated atop big field for final verification on L1, like Ethereum or Cardano, which means that before final stage, all computation are atop Godilocks, when into the final stage, it verifys the Snark proof of stark's verification computation atop big field.
88

99
## Basic Blocks
1010

@@ -24,7 +24,7 @@ For the [recursion-aggregation-composition architechure](../docs/recursion-aggre
2424
### Irreducible polinomial
2525

2626
For the element mapping from Goldilocks field to Scalar field of BLS12-381, a field switch is need.
27-
The scalar field of bls381 could be presented by 5-64bits, by refering to the switch for Godilocks-BN254, we choose the valilla Irreducible Polynomail atop [$GF_{p^5}$](https://github.com/pornin/ecgfp5).
27+
The scalar field of bls381 could be presented by 5-64bits, by referring to the switch for Godilocks-BN254, we choose the valilla Irreducible Polynomail atop [$GF_{p^5}$](https://github.com/pornin/ecgfp5).
2828

2929
* BN254: `x^3 - x - 1`
3030
* BLS12-381: `x^5 - 3`
@@ -103,7 +103,7 @@ Observe that the multiplication and inversion for scalar field in BN254 and BLS1
103103
### Merkle
104104

105105
For the Merkel Circuit, each leaf is N-elements on GL field, where N is 4 for BN254, and 6 for BLS12-381. Before we calculate the merkle root, we need convert the N-elements to one element in big field.
106-
As a refernece, [to\_bn128](https://github.com/0xEigenLabs/eigen-zkvm/blob/main/starky/src/digest.rs#L73) is present, and same conversion should be applied to bls-12381.
106+
As a reference, [to\_bn128](https://github.com/0xEigenLabs/eigen-zkvm/blob/main/starky/src/digest.rs#L73) is present, and same conversion should be applied to bls-12381.
107107

108108
## ElementDigest
109109

zkit/README.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,27 @@ FLAGS:
1515
-V, --version Prints version information
1616
1717
SUBCOMMANDS:
18-
aggregation_check Check aggregation proof
19-
aggregation_prove Proof aggregation for plonk
20-
aggregation_verify Verify aggregation proof
21-
analyse Analyse circuits
22-
calculate_witness Calculate witness and save to output file
23-
compile Compile circom circuits to r1cs, and generate witness
24-
export_aggregation_verification_key Export aggregation proof's verification key
25-
export_verification_key Export proof's verification key
26-
generate_aggregation_verifier A subcommand for generating a Solidity aggregation verifier smart
27-
contract
28-
generate_verifier Generate solidity verifier
29-
help Prints this message or the help of the given subcommand(s)
30-
prove Prove by Plonk
31-
setup Trust setup for Plonk
32-
stark_prove Stark proving and verifying all in one
33-
verify Verify the Plonk proof
18+
aggregation_check Check aggregation proof
19+
aggregation_prove Proof aggregation for plonk
20+
aggregation_verify Verify aggregation proof
21+
analyse Analyse circuits
22+
calculate_witness Calculate witness and save to output file
23+
compile Compile circom circuits to r1cs, and generate witness
24+
compressor12_exec Exec compressor12 for converting R1CS to PIL
25+
compressor12_setup Setup compressor12 for converting R1CS to PIL
26+
export_aggregation_verification_key Export aggregation proof's verification key
27+
export_verification_key Export proof's verification key
28+
generate_aggregation_verifier A subcommand for generating a Solidity aggregation verifier smart contract
29+
generate_verifier Generate solidity verifier
30+
groth16_prove Prove with groth16
31+
groth16_setup Setup groth16
32+
groth16_verify Verify with groth16
33+
help Print this message or the help of the given subcommand(s)
34+
join_zkin generate the input1.zkin.json and input2.zkin.json into out.zkin.json
35+
prove Prove by Plonk
36+
setup Trust setup for Plonk
37+
stark_prove Stark proving and verifying all in one
38+
verify Verify the Plonk proof
3439
```
3540

3641
The recursive proof example can be found [here](../starkjs).

0 commit comments

Comments
 (0)