Skip to content
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
12 changes: 6 additions & 6 deletions yarn-project/simulator/docs/avm/opcodes/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ Performs addition. Both operands must have the same type tag. For integer types
| DA Base | 0 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

| Name | Type | Description |
|------|------|-------------|
| `aOffset` | Memory offset | Memory offset of first input |
| `bOffset` | Memory offset | Memory offset of second input |
| `dstOffset` | Memory offset | Memory offset for result |
| `aOffset` | Memory offset | Memory offset of the first operand |
| `bOffset` | Memory offset | Memory offset of the second operand |
| `dstOffset` | Memory offset | Memory offset where the result will be written |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**ADD_8** (Opcode 0x00):

Expand Down Expand Up @@ -70,7 +70,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
12 changes: 6 additions & 6 deletions yarn-project/simulator/docs/avm/opcodes/and.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ Performs bitwise AND operation. Both operands must have the same integral type t
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |
| L2 Dynamic | 3 | - |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

| Name | Type | Description |
|------|------|-------------|
| `aOffset` | Memory offset | Memory offset of first input |
| `bOffset` | Memory offset | Memory offset of second input |
| `dstOffset` | Memory offset | Memory offset for result |
| `aOffset` | Memory offset | Memory offset of the first operand |
| `bOffset` | Memory offset | Memory offset of the second operand |
| `dstOffset` | Memory offset | Memory offset where the result will be written |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**AND_8** (Opcode 0x10):

Expand Down Expand Up @@ -71,7 +71,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
6 changes: 3 additions & 3 deletions yarn-project/simulator/docs/avm/opcodes/call.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Calls another contract with the specified calldata and gas allocation. Can modif
| DA Base | 0 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

Expand All @@ -42,7 +42,7 @@ Calls another contract with the specified calldata and gas allocation. Can modif
| `argsOffset` | Memory offset | Memory offset of the start of the calldata |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**CALL** (Opcode 0x39):

Expand All @@ -64,7 +64,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

16-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
8 changes: 4 additions & 4 deletions yarn-project/simulator/docs/avm/opcodes/calldatacopy.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ Copies a section of the current call's calldata into memory at the specified off
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |
| L2 Dynamic | 3 | `M[copySizeOffset]` |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

| Name | Type | Description |
|------|------|-------------|
| `copySizeOffset` | Memory offset | Memory offset of the number of elements to copy |
| `cdStartOffset` | Memory offset | Memory offset of the calldata start index to copy from |
| `dstOffset` | Memory offset | Memory offset for writing calldata |
| `dstOffset` | Memory offset | Memory offset where the calldata will be written |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**CALLDATACOPY** (Opcode 0x1F):

Expand All @@ -54,7 +54,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
8 changes: 4 additions & 4 deletions yarn-project/simulator/docs/avm/opcodes/cast.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ Changes the type tag of a value. The value itself is preserved if casting to a l
| DA Base | 0 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

| Name | Type | Description |
|------|------|-------------|
| `srcOffset` | Memory offset | Memory offset of the value to cast |
| `dstOffset` | Memory offset | Memory offset for casted value |
| `dstOffset` | Memory offset | Memory offset where the casted value will be written |
| `dstTag` | Type tag | Type tag to cast the value to |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**CAST_8** (Opcode 0x1C):

Expand Down Expand Up @@ -70,7 +70,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
8 changes: 4 additions & 4 deletions yarn-project/simulator/docs/avm/opcodes/debuglog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ Prints a debug log to console as a formatted message, and pushes a structured de
| DA Base | 0 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

| Name | Type | Description |
|------|------|-------------|
| `levelOffset` | Memory offset | Memory offset |
| `levelOffset` | Memory offset | Memory offset of the log level |
| `messageOffset` | Memory offset | Memory offset of the message string |
| `fieldsOffset` | Memory offset | Memory offset of the start of field values to log |
| `fieldsSizeOffset` | Memory offset | Memory offset of the number of fields to log |
| `messageSize` | Memory offset | Immediate value specifying message string length |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**DEBUGLOG** (Opcode 0x3E):

Expand All @@ -57,7 +57,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
8 changes: 4 additions & 4 deletions yarn-project/simulator/docs/avm/opcodes/div.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ Performs integer division (truncating). Both operands must have the same integra
| DA Base | 0 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

| Name | Type | Description |
|------|------|-------------|
| `aOffset` | Memory offset | Memory offset of the dividend |
| `bOffset` | Memory offset | Memory offset of the divisor |
| `dstOffset` | Memory offset | Memory offset for quotient |
| `dstOffset` | Memory offset | Memory offset where the quotient will be written |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**DIV_8** (Opcode 0x06):

Expand Down Expand Up @@ -70,7 +70,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
8 changes: 4 additions & 4 deletions yarn-project/simulator/docs/avm/opcodes/ecadd.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Performs elliptic curve point addition on the Grumpkin curve. Each point is repr
| DA Base | 0 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

Expand All @@ -37,10 +37,10 @@ Performs elliptic curve point addition on the Grumpkin curve. Each point is repr
| `p2XOffset` | Memory offset | Memory offset of the second point's x-coordinate |
| `p2YOffset` | Memory offset | Memory offset of the second point's y-coordinate |
| `p2IsInfiniteOffset` | Memory offset | Memory offset of the second point's infinity flag |
| `dstOffset` | Memory offset | Memory offset for result point will be written (3 values) |
| `dstOffset` | Memory offset | Memory offset where the result point will be written (3 values) |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**ECADD** (Opcode 0x42):

Expand All @@ -64,7 +64,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

16-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
6 changes: 3 additions & 3 deletions yarn-project/simulator/docs/avm/opcodes/emitnotehash.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Writes a new note hash to the Note Hash Tree. Note hash must have type tag FIELD
| DA Base | 512 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

Expand All @@ -31,7 +31,7 @@ Writes a new note hash to the Note Hash Tree. Note hash must have type tag FIELD
| `noteHashOffset` | Memory offset | Memory offset of the note hash to emit |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**EMITNOTEHASH** (Opcode 0x32):

Expand All @@ -49,7 +49,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
6 changes: 3 additions & 3 deletions yarn-project/simulator/docs/avm/opcodes/emitnullifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Writes a new nullifier to the Nullifier Tree. This opcode can only emit nullifie
| DA Base | 512 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

Expand All @@ -31,7 +31,7 @@ Writes a new nullifier to the Nullifier Tree. This opcode can only emit nullifie
| `nullifierOffset` | Memory offset | Memory offset of the nullifier to emit |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**EMITNULLIFIER** (Opcode 0x34):

Expand All @@ -49,7 +49,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
6 changes: 3 additions & 3 deletions yarn-project/simulator/docs/avm/opcodes/emitunencryptedlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Emits a public log from the currently executing contract. Log size must be Uint3
| L2 Dynamic | 3 | `M[logSizeOffset]` |
| DA Dynamic | 512 | `M[logSizeOffset]` |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

Expand All @@ -34,7 +34,7 @@ Emits a public log from the currently executing contract. Log size must be Uint3
| `logOffset` | Memory offset | Memory offset of the start of the log data |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**EMITUNENCRYPTEDLOG** (Opcode 0x37):

Expand All @@ -53,7 +53,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
12 changes: 6 additions & 6 deletions yarn-project/simulator/docs/avm/opcodes/eq.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ Compares two values for equality. Both operands must have the same type tag. The
| DA Base | 0 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

| Name | Type | Description |
|------|------|-------------|
| `aOffset` | Memory offset | Memory offset of first value to compare |
| `bOffset` | Memory offset | Memory offset of second value to compare |
| `dstOffset` | Memory offset | Memory offset for result (0 or 1) |
| `aOffset` | Memory offset | Memory offset of the first value to compare |
| `bOffset` | Memory offset | Memory offset of the second value to compare |
| `dstOffset` | Memory offset | Memory offset where the result (0 or 1) will be written |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**EQ_8** (Opcode 0x0A):

Expand Down Expand Up @@ -70,7 +70,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
8 changes: 4 additions & 4 deletions yarn-project/simulator/docs/avm/opcodes/fdiv.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ Performs field division (computes a * b^(-1) mod p where p is the BN254 field mo
| DA Base | 0 | - |
| L2 Addressing | 3 | 3 L2 gas per indirect memory offset<br/>3 L2 gas per relative memory offset |

\* See [Gas Metering](gas.md) for details on how gas costs are computed and applied.
\* See [Gas Metering](../gas.md) for details on how gas costs are computed and applied.

## Operands

| Name | Type | Description |
|------|------|-------------|
| `aOffset` | Memory offset | Memory offset of the dividend |
| `bOffset` | Memory offset | Memory offset of the divisor |
| `dstOffset` | Memory offset | Memory offset for result |
| `dstOffset` | Memory offset | Memory offset where the result will be written |

## Wire Formats
See [Wire Format](wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).
See [Wire Format](../wire-format.md) page for an explanation of wire format variants and opcode naming (e.g., why `ADD_8` vs `ADD_16`).

**FDIV_8** (Opcode 0x08):

Expand Down Expand Up @@ -70,7 +70,7 @@ packet-beta
```

## Addressing Modes
See [Addressing](addressing.md) page for a detailed explanation.
See [Addressing](../addressing.md) page for a detailed explanation.

8-bit bitmask: 2 bits per memory offset operand (indirect flag + relative flag)

Expand Down
Loading
Loading