Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix typos #1281

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions website/versioned_docs/version-v1.x/audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In March 2023, Veridise responsibly disclosed a number of issues to the MACI tea

Out of five issues disclosed, only three were relevant and have been since fixed by the MACI team. The other two issues were disregarded as they were present in older version of code which is not in use anymore.

We would like to thank you the Veridise team for their effort in keeping open source projects safe.
We would like to thank the Veridise team for their effort in keeping open source projects safe.

### Issue 1

Expand All @@ -50,7 +50,7 @@ This was fixed by adding a new Template, `SafeLesThan` which uses `Num2Bits` as

```javascript
// the implicit assumption of LessThan is both inputs are at most n bits
// so we need add range check for both inputs
// so we need to add range check for both inputs
template SafeLessThan(n) {
assert(n <= 252);
signal input in[2];
Expand Down Expand Up @@ -86,7 +86,7 @@ This issue is the same issue number 1, this time for the input signal index.
As with issue number 1, a new template `SafeGreaterThan` was added:

```javascript
// N is the number of bits the input have.
// N is the number of bits the input have.
// The MSF is the sign bit.
template SafeGreaterThan(n) {
signal input in[2];
Expand All @@ -112,7 +112,7 @@ greaterThan[i].in[1] <== index;

**Description**

In the template `QuinGeneratePathIndices`, the constrains of the `signal n[levels + 1]` don't perform well for division and modulo counting.
In the template `QuinGeneratePathIndices`, the constraints of the `signal n[levels + 1]` don't perform well for division and modulo counting.

**Code Location**

Expand Down
10 changes: 5 additions & 5 deletions website/versioned_docs/version-v1.x/circuits.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MACI has three main zk-SNARK [circuits](https://github.com/privacy-scaling-explo

The rest of the circuits are utilities templates that are required for the main circuits to work correctly. These include utilities such as float math, conversion of private keys, and Poseidon hashing/encryption.

Each circuit is parameterised and it is important to set the right parameters that matches your use case. For example, if you want to support up to 3125 messages, the message tree depth parameter should be set to `5` (as $5^5 = 3125$).
Each circuit is parameterised and it is important to set the right parameters that match your use case. For example, if you want to support up to 3125 messages, the message tree depth parameter should be set to `5` (as $5^5 = 3125$).

## Background

Expand Down Expand Up @@ -49,7 +49,7 @@ The circuits are used by the coordinator (the prover) to prove that they have co

This circuit allows the coordinator to prove that they have correctly processed each message in reverse order, in a consecutive batch of 5 ^ msgBatchDepth messages to the respective state leaf within the state tree. Coordinators would use this circuit to prove correct execution at the end of each Poll.

The `processMessages` circuit will try to decrypt the messages, and based on the content of the message, update within itself the trees, to generate a proof that the coordinator's off-chain processing was done correctly. In other words, the circuit takes a final state, an initial state, and the leaves (messages and user signups) - it process these messages via the different state transitions to finally check that the expected state is correct.
The `processMessages` circuit will try to decrypt the messages, and based on the content of the message, update within itself the trees, to generate a proof that the coordinator's off-chain processing was done correctly. In other words, the circuit takes a final state, an initial state, and the leaves (messages and user signups) - it processes these messages via the different state transitions to finally check that the expected state is correct.
The pre-requisites for this circuit are:

- the related Poll has ended
Expand Down Expand Up @@ -297,7 +297,7 @@ The subsidy circuit is used to implement pairwise subsidy. This is a technique t

#### Process Messages Input Hasher

An utility circuit used by the main `processMessages` circuit to hash its inputs.
A utility circuit used by the main `processMessages` circuit to hash its inputs.

![ProcessMessagesInputHasher](/img/circuits/processMessagesInputHasher.svg)

Expand All @@ -312,7 +312,7 @@ It outputs one field element, which is the SHA256 hash of the following inputs:

#### Tally Votes Input Hasher

An utility template that generates a sha256 hash of the provided tally inputs.
A utility template that generates a sha256 hash of the provided tally inputs.

![TallyVotesInputHasher](/img/circuits/tallyInputHasher.svg)

Expand All @@ -325,7 +325,7 @@ It outputs one field element, which is the SHA256 hash of the following inputs:

#### ResultsCommitmentVerifier

An utility circuit used by the main `tallyVotes` circuit to verify that the results commitment is correct.
A utility circuit used by the main `tallyVotes` circuit to verify that the results commitment is correct.

![ResultsCommitmentVerifier](/img/circuits/resultsCommitmentVerifier.svg)

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-v1.x/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ Next, we have the `signUp` function, which allows users to `signUp` using a `Sig

This function does the following:

- checks that the maximum number of signups have not been reached. As of now, this will be $5 ** 10 - 1$ due to circuit limitations.
- checks that the maximum number of signups has not been reached. As of now, this will be $5 ** 10 - 1$ due to circuit limitations.
- checks that the provided public key is within the allowed boundaries
- increases the number of signups
- registers the user using the sign up gatekeeper contract. It is important that whichever gatekeeper is used, it reverts if an user tries to sign up twice.
- registers the user using the sign up gatekeeper contract. It is important that whichever gatekeeper is used, it reverts if a user tries to sign up twice.
- calls the voice credit proxy to retrieve the number of allocated voice credits for the calling account
- hashes the voice credits alongside the calling address and the current time
- enqueues this hashed data into the `stateAq` contract
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Coordinator local processing
description: How does the coordinator process and tallies messages locally
description: How does the coordinator process and tally messages locally
sidebar_label: Coordinator local processing
sidebar_position: 16
---
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-v1.x/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pnpm setup:zkeys

### Download `.zkey` files (if you would like to use the default parameters or the trusted setup artifacts)

MACI has two main zk-SNARK circuits (plus an optional Subsidy circuit). Each circuit is parameterised. There should one
MACI has two main zk-SNARK circuits (plus an optional Subsidy circuit). Each circuit is parameterised. There should be one
`.zkey` file for each circuit and set of parameters.

Unless you wish to generate a fresh set of `.zkey` files, you should obtain
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-v1.x/integrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Deployment order is:
7. Deploy Topup credit
8. Deploy MessageProcessorFactory, PollFactory, SubsidyFactory, TallyFactory
9. Deploy MACI, AccQueueQuinaryMaci
10. Deploy Poll, AccQueueQuinaryMaci, MessageProcessor, Tally and Susbsidy (optional)
10. Deploy Poll, AccQueueQuinaryMaci, MessageProcessor, Tally and Subsidy (optional)

Before running the deploy command make sure you have [zkey files](https://maci.pse.dev/docs/trusted-setup) from trusted setup and env variables `ETH_PROVIDER` (RPC endpoint) and `ETH_SK` (wallet private key) are set. For production environment make sure you don't use zkey files from our examples.

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-v1.x/key-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If messages were processed in the same order as they were submitted, Alice's vot

On the other hand, due to messages being processed in reverse order, Alice's last message would be counted as valid as the key change would have not been processed yet. Then, Bob's vote would not be counted as valid as the current key for Alice would be $pub1$.

> Note that a key change message should have the nonce set to 1 in order for it to be valid. We'll see it a code example in the next sections.
> Note that a key change message should have the nonce set to 1 in order for it to be valid. We'll see a code example in the next sections.

## Then how can a voter change their key and submit a new vote?

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-v1.x/primitives.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 6

## MACI primitives

This section provides a short introduction of the main primitives used by MACI.
This section provides a short introduction to the main primitives used by MACI.

### Elliptic Curves

Expand Down Expand Up @@ -213,4 +213,4 @@ The code to derive $A_{b_x}$ and $A_{b_y}$ is [here](https://github.com/iden3/ci
3. Use the method to convert a buffer to a point on the BabyJub curve described in [2.3.2].
4. Multiply the point by 8. The result is the point with x-value $A_{b_x}$ and y-value $A_{b_y}$

Given the [elliptic curve discrete logarithm problem](https://wstein.org/edu/2007/spring/ent/ent-html/node89.html), we assume that no-one knows the private key $s \in {F}_p$ and by using the public key generation procedure in [1.4], we can derive $A_{b_x}$ and $A_{b_y}$. Furthermore, the string above (`PedersenGenerator...`) acts as a nothing-up-my-sleeve value.
Given the [elliptic curve discrete logarithm problem](https://wstein.org/edu/2007/spring/ent/ent-html/node89.html), we assume that no one knows the private key $s \in {F}_p$ and by using the public key generation procedure in [1.4], we can derive $A_{b_x}$ and $A_{b_y}$. Furthermore, the string above (`PedersenGenerator...`) acts as a nothing-up-my-sleeve value.
2 changes: 1 addition & 1 deletion website/versioned_docs/version-v1.x/purpose.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sidebar_position: 2

To understand the promise of on-chain voting and the purpose of MACI, we highly recommend reading [Vitalik's post on blockchain voting](https://vitalik.eth.limo/general/2021/05/25/voting2.html). He provides an overview of the incredible potential of e-voting and why blockchains are an excellent technology to implement e-voting solutions on top of.

Below we attempt to summarize some of the points layed out in that post:
Below we attempt to summarize some of the points laid out in that post:

## Security requirements of a voting system

Expand Down
Loading
Loading