Skip to content

Commit

Permalink
Fix spelling and some lints
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienFT committed Nov 19, 2024
1 parent 79f0bf1 commit 6e3b000
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
6 changes: 5 additions & 1 deletion spell-check-custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,8 @@ OOB
unspendable
priori
padding
incentivize
incentivize
EIPS
eip
eips
ethereum
52 changes: 26 additions & 26 deletions src/fuel-vm/instruction-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -2375,59 +2375,59 @@ Panic if:

### `EADD`: Elliptic curve point addition

| | |
|-------------|------------------------------------------------------|
| Description | The addition of two points (first point bytes starts at `$rC` and second point bytes starts at `$rD`) on `$rB` curve. `$rA` points to the start of the bytes of the addition result. The encoding and decoding depends on the curve (`$rB`) chosen (details below). |
| Operation | ```MEM[$rA, X] = eadd(MEM[$rC, Y], MEM[$rD, Z]);``` |
| Syntax | `eadd $rA, $rB, $rC, $rD` |
| Encoding | `0x00 rA rB rC rD ` |
| Notes | For now, only `$rB` = 0 is accepted |
| | |
|-------------|-----------------------------------------------------|
| Description | The addition of two points (first point bytes starts at `$rC` and second point bytes starts at `$rD`) on `$rB` curve. `$rA` points to the start of the bytes of the addition result. The encoding and decoding depends on the curve (`$rB`) chosen (details below). |
| Operation | ```MEM[$rA, X] = eadd(MEM[$rC, Y], MEM[$rD, Z]);``` |
| Syntax | `eadd $rA, $rB, $rC, $rD` |
| Encoding | `0x00 rA rB rC rD` |
| Notes | For now, only `$rB` = 0 is accepted |

#### Curve ID `$rB` possible values :
#### Curve ID `$rB` possible values

- `0`: `alt_bn128` elliptic curve.

#### Encoding of points and results by curve ID :
#### Encoding of points and results by curve ID

| Curve ID | `$rA` format | `$rC` format | `$rD` format |
|----------|--------------|--------------|--------------|
| `0` | `MEM[$rA, 64]`(P(X[32 bytes],Y[32 bytes])) | `MEM[$rC, 64]`(P(X[32 bytes],Y[32 bytes])) | `MEM[$rD, 64]`(P(X[32 bytes],Y[32 bytes])) |

### `EMUL`: Elliptic curve point scalar multiplication

| | |
|-------------|------------------------------------------------------|
| | |
|-------------|-----------------------------------------------------|
| Description | The multiplication of a point and a scalar (point bytes starts at `$rC` and scalar bytes starts at `$rD`) on `$rB` curve. `$rA` points to the start of the bytes of the multiplication result. The encoding and decoding depends on the curve (`$rB`) chosen (details below). |
| Operation | ```MEM[$rA, X] = emul(MEM[$rC, Y], MEM[$rD, Z]);``` |
| Syntax | `eadd $rA, $rB, $rC, $rD` |
| Encoding | `0x00 rA rB rC rD ` |
| Notes | For now, only `$rB` = 0 is accepted |
| Operation | ```MEM[$rA, X] = emul(MEM[$rC, Y], MEM[$rD, Z]);``` |
| Syntax | `eadd $rA, $rB, $rC, $rD` |
| Encoding | `0x00 rA rB rC rD` |
| Notes | For now, only `$rB` = 0 is accepted |

#### Curve ID `$rB` possible values :
#### Curve ID `$rB` possible values

- `0`: `alt_bn128` elliptic curve.

#### Encoding of points and results by curve ID :
#### Encoding of points and results by curve ID

| Curve ID | `$rA` format | `$rC` format | `$rD` format |
|----------|--------------|--------------|--------------|
| `0` | `MEM[$rA, 64]`(P(X[32 bytes],Y[32 bytes])) | `MEM[$rC, 64]`(P(X[32 bytes],Y[32 bytes])) | `MEM[$rD, 32]`(S[32 bytes]) |

### `EPAR`: Elliptic curve point pairing check

| | |
|-------------|------------------------------------------------------|
| Description | Perform pairing check on a batch of groups of points on `$rB` curve. `$rC` define the number of elements and `$rD` where the bytes of the groups of points start. `$rA` contains either `0` or `1` as the result of the pairing. The encoding and decoding depends on the curve (`$rB`) chosen (details below). |
| Operation | ```$rA = epar($rC(MEM[$rD, Z]));``` |
| Syntax | `eadd $rA, $rB, $rC, $rD` |
| Encoding | `0x00 rA rB rC rD ` |
| Notes | For now, only `$rB` = 0 is accepted. Detailed exaplantions on the behavior : https://eips.ethereum.org/EIPS/eip-197 |
| | |
|-------------|-----------------------------------------------------|
| Description | Perform pairing check on a batch of groups of points on `$rB` curve. `$rC` define the number of elements and `$rD` where the bytes of the groups of points start. `$rA` contains either `0` or `1` as the result of the pairing. The encoding and decoding depends on the curve (`$rB`) chosen (details below). |
| Operation | ```$rA = epar($rC(MEM[$rD, Z]));``` |
| Syntax | `eadd $rA, $rB, $rC, $rD` |
| Encoding | `0x00 rA rB rC rD ` |
| Notes | For now, only `$rB` = 0 is accepted. Detailed explanations on the behavior : https://eips.ethereum.org/EIPS/eip-197 |

#### Curve ID `$rB` possible values :
#### Curve ID `$rB` possible values

- `0`: `alt_bn128` elliptic curve.

#### Encoding of points and results by curve ID :
#### Encoding of points and results by curve ID

| Curve ID | `$rA` format | `$rC` format | `$rD` format |
|----------|--------------|--------------|--------------|
Expand Down

0 comments on commit 6e3b000

Please sign in to comment.