Skip to content

Commit

Permalink
chore(website/versioned_docs/version-v1.x): typo fix (#893)
Browse files Browse the repository at this point in the history
* chore: typo fix

* chore: typo fix

* chore: typo fix

* chore: typo fix
  • Loading branch information
fakefraud authored Dec 13, 2023
1 parent 8cc155f commit c90466c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion website/versioned_docs/version-v1.x/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Next, we have the `signUp` function, which allows users to `signUp` using a `Sig

This function does the following:

- checks that the maxium 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 have 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.
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-v1.x/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ MACI was originally developed by:
- [Koh Wei Jie](https://kohweijie.com)
- [Samuel Gosling](https://twitter.com/xGozzy)

Currently, it is being mantained by the new MACI team, which will continue to work on improving the protocol and its documentation.
Currently, it is being maintained by the new MACI team, which will continue to work on improving the protocol and its documentation.

:::info
If you are using one of the previous versions of MACI, see the [MACI v0.x](/docs/v0.x/introduction) documentation.
Expand Down
20 changes: 10 additions & 10 deletions website/versioned_docs/version-v1.x/primitives.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,16 @@ A Key Pair is a private key and its corresponding public key.

A command represents an action that a user may take. Such as casting a vote in a poll or changing their public key if bribed. It is made up of the following parameters:

| Symbol | Name | Size | Description |
| ------------ | ----------------------- | ---- | -------------------------------------------------------------------------------------------------- |
| $cm_i$ | State index | 50 | State leaf index where the signing key is located |
| $cm_{p_{x}}$ | Public key x-coordinate | 253 | If no change is necessary this parameter should reflect the current public key's x-coordinate |
| $cm_{p_{y}}$ | Public key y-coordinate | 253 | If no change is necessary this parameter should reflect the current public key's y-coordinate |
| $cm_{i_{v}}$ | Vote option index | 50 | Option state leaf index of preference to assign the vote for |
| $cm_w$ | Voting weight | 50 | Voice credit balance allocation, this is an arbitary value dependent on a user's available credits |
| $cm_n$ | Nonce | 50 | State leaf's index of actions committed plus one |
| $cm_{id}$ | Poll id | 50 | The poll's identifier to cast in regard to |
| $cm_s$ | Salt | 253 | An entropy value to inhibit brute force attacks |
| Symbol | Name | Size | Description |
| ------------ | ----------------------- | ---- | --------------------------------------------------------------------------------------------------- |
| $cm_i$ | State index | 50 | State leaf index where the signing key is located |
| $cm_{p_{x}}$ | Public key x-coordinate | 253 | If no change is necessary this parameter should reflect the current public key's x-coordinate |
| $cm_{p_{y}}$ | Public key y-coordinate | 253 | If no change is necessary this parameter should reflect the current public key's y-coordinate |
| $cm_{i_{v}}$ | Vote option index | 50 | Option state leaf index of preference to assign the vote for |
| $cm_w$ | Voting weight | 50 | Voice credit balance allocation, this is an arbitrary value dependent on a user's available credits |
| $cm_n$ | Nonce | 50 | State leaf's index of actions committed plus one |
| $cm_{id}$ | Poll id | 50 | The poll's identifier to cast in regard to |
| $cm_s$ | Salt | 253 | An entropy value to inhibit brute force attacks |

#### Message

Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-v1.x/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ is serialised as:

#### 2.2.2. Deserialisation

To revert a serialised key back to its unserialised form $k$, the string is manipulated to isolate the hexdecimal value by removing the prefix (through the Node.js operation [`String.slice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice)) and is prepended `0x` for conversion from hexdecimal back to its big-endian primitive.
To revert a serialised key back to its unserialised form $k$, the string is manipulated to isolate the hexadecimal value by removing the prefix (through the Node.js operation [`String.slice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice)) and is prepended `0x` for conversion from hexadecimal back to its big-endian primitive.

### 2.3. Public key

Expand All @@ -303,11 +303,11 @@ To get a serialised public key from public key coordinates, the variable $u$ is
1. assign the result of a bitwise [`AND (&)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_AND) operation between values $u$ and $255$ to byte $n$
2. shift $u$ right by 8 bits ([`>>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Right_shift))

The result $v$ is a hexdecimal big-endian value which is prendend its prefix to declare it as a serialised key.
The result $v$ is a hexadecimal big-endian value which is prendend its prefix to declare it as a serialised key.

#### 2.3.2. Deserialisation

To reverse the effects of serialisation and return the unpacked public key, we must remove the prefix (using the method defined in [2.2.2]) and convert back to a buffer from hexdecimal. A return variable $y$ is initialised and the buffer is then iterated over each byte to:
To reverse the effects of serialisation and return the unpacked public key, we must remove the prefix (using the method defined in [2.2.2]) and convert back to a buffer from hexadecimal. A return variable $y$ is initialised and the buffer is then iterated over each byte to:

1. shift $u$ left by the result of $8$ multiplied by $n$ bits ([`<<`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Left_shift))
2. assign $y$ the result of addition between $y$ and $u$
Expand Down

0 comments on commit c90466c

Please sign in to comment.