From c57e34f5b091dd6e06d9e8fa9ed4153467c9a343 Mon Sep 17 00:00:00 2001 From: Oleksandr Brezhniev Date: Tue, 24 Sep 2024 21:26:11 +0100 Subject: [PATCH] Grammar fixes --- README.md | 75 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 848ed650..f290203c 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ # snarkjs -This is a **JavaScript and Pure Web Assembly implementation of zkSNARK and PLONK schemes.** It uses the Groth16 Protocol (3 point only and 3 pairings), PLONK and FFLONK. +This is a **JavaScript and Pure Web Assembly implementation of zkSNARK and PLONK schemes.** It uses the Groth16 Protocol (3 points only and 3 pairings), PLONK, and FFLONK. -This library includes all the tools required to perform trusted setup multi-party ceremonies: including the universal [*powers of tau*](https://medium.com/coinmonks/announcing-the-perpetual-powers-of-tau-ceremony-to-benefit-all-zk-snark-projects-c3da86af8377) ceremony, and the second phase circuit specific ceremonies. +This library includes all the tools required to perform trusted setup multi-party ceremonies: including the universal [*powers of tau*](https://medium.com/coinmonks/announcing-the-perpetual-powers-of-tau-ceremony-to-benefit-all-zk-snark-projects-c3da86af8377) ceremony, and the second phase circuit-specific ceremonies. > Any zk-snark project can pick a round from the common phase 1 to start their circuit-specific phase 2 ceremony. @@ -17,7 +17,7 @@ It works in [`node.js`](#using-node) as well as directly in the [browser](#in-th It's an [ES module](https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/), so it can be directly imported into bigger projects using [Rollup](https://rollupjs.org/guide/en/) or [Webpack](https://webpack.js.org/). -The low-level cryptography is performed directly in `wasm`, and uses worker threads to parallelize the computations. The result is a high performance library with benchmarks comparable to host implementations. +The low-level cryptography is performed directly in `wasm`, and uses worker threads to parallelize the computations. The result is a high-performance library with benchmarks comparable to host implementations. ## Preliminaries @@ -44,7 +44,7 @@ If you're seeing an error, try prefixing both commands with `sudo` and running t ### Understand the `help` command -To see a list of all `snarkjs` commands, as well as descriptions about their inputs and outputs, run: +To see a list of all `snarkjs` commands, as well as descriptions of their inputs and outputs, run: ```sh snarkjs --help @@ -67,7 +67,7 @@ snarkjs g16p --help ### Debugging tip -If you a feel a command is taking longer than it should, re-run it with a `-v` or `--verbose` option to see more details about how it's progressing and where it's getting blocked. +If you feel a command is taking longer than it should, re-run it with a `-v` or `--verbose` option to see more details about how it's progressing and where it's getting blocked. ### Install circom @@ -113,7 +113,7 @@ snarkjs powersoftau contribute pot14_0001.ptau pot14_0002.ptau --name="Second co By letting you write the random text as part of the command, the `-e` parameter allows `contribute` to be non-interactive. -### 4. Provide a third contribution using third party software +### 4. Provide a third contribution using third-party software ```sh snarkjs powersoftau export challenge pot14_0002.ptau challenge_0003 snarkjs powersoftau challenge contribute bn128 challenge_0003 response_0003 -e="some random text" @@ -129,7 +129,7 @@ This allows you to use different types of software in a single ceremony. snarkjs powersoftau verify pot14_0003.ptau ``` -The `verify` command verifies a `ptau` (powers of tau) file. Which means it checks all the contributions to the multi-party computation (MPC) up to that point. It also prints the hashes of all the intermediate results to the console. +The `verify` command verifies a `ptau` (powers of tau) file, which means it checks all the contributions to the multi-party computation (MPC) up to that point. It also prints the hashes of all the intermediate results to the console. If everything checks out, you should see the following at the top of the output: @@ -147,7 +147,7 @@ snarkjs powersoftau beacon pot14_0003.ptau pot14_beacon.ptau 0102030405060708090 The `beacon` command creates a `ptau` file with a contribution applied in the form of a random beacon. -We need to apply a random beacon in order to finalise phase 1 of the trusted setup. +We need to apply a random beacon in order to finalize phase 1 of the trusted setup. > To paraphrase Sean Bowe and Ariel Gabizon, a random beacon is a source of public randomness that is not available before a fixed time. The beacon itself can be a delayed hash function (e.g. 2^40 iterations of SHA256) evaluated on some high entropy and publicly available data. Possible sources of data include: the closing value of the stock market on a certain date in the future, the output of a selected set of national lotteries, or the value of a block at a particular height in one or more blockchains. E.g. the hash of the 11 millionth Ethereum block (which as of this writing is some 3 months in the future). See [here](https://eprint.iacr.org/2017/1050.pdf) for more on the importance of a random beacon. @@ -162,12 +162,12 @@ snarkjs powersoftau prepare phase2 pot14_beacon.ptau pot14_final.ptau -v We're now ready to prepare phase 2 of the setup (the circuit-specific phase). -Under the hood, the `prepare phase2` command calculates the encrypted evaluation of the Lagrange polynomials at tau for `tau`, `alpha*tau` and `beta*tau`. It takes the beacon `ptau` file we generated in the previous step, and outputs a final `ptau` file which will be used to generate the circuit proving and verification keys. +Under the hood, the `prepare phase2` command calculates the encrypted evaluation of the Lagrange polynomials at tau for `tau`, `alpha*tau`, and `beta*tau`. It takes the beacon `ptau` file we generated in the previous step and outputs a final `ptau` file which will be used to generate the circuit proving and verification keys. --- **NOTE** -Ptau files for bn128 with the peraperPhase2 54 contributions and a beacon, can be found here: +Prepared (phase2) Ptau files for bn128 with 54 contributions and a beacon can be found here: | power | maxConstraints | file | hash | @@ -306,7 +306,7 @@ snarkjs r1cs export json circuit.r1cs circuit.r1cs.json cat circuit.r1cs.json ``` -We export `r1cs` to `json` format to make it human readable. +We export `r1cs` to `json` format to make it human-readable. ### 14. Calculate the witness @@ -327,7 +327,7 @@ Now, we use the Javascript/WASM program created by `circom` in the directory *