diff --git a/arc-0002/README.md b/arc-0002/README.md index dace999..268e87c 100644 --- a/arc-0002/README.md +++ b/arc-0002/README.md @@ -21,44 +21,26 @@ The following is a list of opcodes supported by the Aleo Virtual Machine (AVM). | [and](#and) | AND operation | | [assert.eq](#asserteq) | Assert equality | | [assert.neq](#assertneq) | Assert non-equality | -| [commit.bhp256](#commitbhp256) | 256-bit input BHP commitment of field type | -| [commit.bhp512](#commitbhp512) | 512-bit input BHP commitment of field type | -| [commit.bhp768](#commitbhp768) | 768-bit input BHP commitment of field type | -| [commit.bhp1024](#commitbhp1024) | 1024-bit input BHP commitment of field type | -| [commit.ped64](#commitped64) | 64-bit input Pedersen commitment of field type | -| [commit.ped128](#commitped128) | 128-bit input Pedersen commitment of field type | -| [commit_to_group.bhp256](#commit_to_groupbhp256) | 256-bit input BHP commitment of group type | -| [commit_to_group.bhp512](#commit_to_groupbhp512) | 512-bit input BHP commitment of group type | -| [commit_to_group.bhp768](#commit_to_groupbhp768) | 768-bit input BHP commitment of group type | -| [commit_to_group.bhp1024](#commit_to_groupbhp1024) | 1024-bit input BHP commitment of group type | -| [commit_to_group.ped64](#commit_to_groupped64) | 64-bit input Pedersen commitment of group type | -| [commit_to_group.ped128](#commit_to_groupped128) | 128-bit input Pedersen commitment of group type | +| [commit.bhp256](#commitbhp256) | 256-bit input BHP commitment | +| [commit.bhp512](#commitbhp512) | 512-bit input BHP commitment | +| [commit.bhp768](#commitbhp768) | 768-bit input BHP commitment | +| [commit.bhp1024](#commitbhp1024) | 1024-bit input BHP commitment | +| [commit.ped64](#commitped64) | 64-bit input Pedersen commitment | +| [commit.ped128](#commitped128) | 128-bit input Pedersen commitment | | [div](#div) | Division operation | | [div.w](#divw) | Wrapping division operation | | [double](#double) | Double operation | | [gt](#gt) | Greater than comparison | | [gte](#gte) | Greater than or equal to comparison | -| [hash.bhp256](#hashbhp256) | 256-bit input BHP hash of field type | -| [hash.bhp512](#hashbhp512) | 512-bit input BHP hash of field type | -| [hash.bhp768](#hashbhp768) | 768-bit input BHP hash of field type | -| [hash.bhp1024](#hashbhp1024) | 1024-bit input BHP hash of field type | -| [hash.ped64](#hashped64) | 64-bit input Pedersen hash of field type | -| [hash.ped128](#hashped128) | 128-bit input Pedersen hash of field type | -| [hash.psd2](#hashpsd2) | Poseidon hash with input rate 2 of field type | -| [hash.psd4](#hashpsd4) | Poseidon hash with input rate 4 of field type | -| [hash.psd8](#hashpsd8) | Poseidon hash with input rate 8 of field type | -| [hash_to_group.bhp256](#hash_to_groupbhp256) | 256-bit input BHP hash of group type | -| [hash_to_group.bhp512](#hash_to_groupbhp512) | 512-bit input BHP hash of group type | -| [hash_to_group.bhp768](#hash_to_groupbhp768) | 768-bit input BHP hash of group type | -| [hash_to_group.bhp1024](#hash_to_groupbhp1024) | 1024-bit input BHP hash of group type | -| [hash_to_group.ped64](#hash_to_groupped64) | 64-bit input Pedersen hash of group type | -| [hash_to_group.ped128](#hash_to_groupped128) | 128-bit input Pedersen hash of group type | -| [hash_to_group.psd2](#hash_to_grouppsd2) | Poseidon hash with input rate 2 of group type | -| [hash_to_group.psd4](#hash_to_grouppsd4) | Poseidon hash with input rate 4 of group type | -| [hash_to_group.psd8](#hash_to_grouppsd8) | Poseidon hash with input rate 8 of group type | -| [hash_to_scalar.psd2](#hash_to_scalarpsd2) | Poseidon hash with input rate 2 of scalar type | -| [hash_to_scalar.psd4](#hash_to_scalarpsd4) | Poseidon hash with input rate 4 of scalar type | -| [hash_to_scalar.psd8](#hash_to_scalarpsd8) | Poseidon hash with input rate 8 of scalar type | +| [hash.bhp256](#hashbhp256) | 256-bit input BHP hash | +| [hash.bhp512](#hashbhp512) | 512-bit input BHP hash | +| [hash.bhp768](#hashbhp768) | 768-bit input BHP hash | +| [hash.bhp1024](#hashbhp1024) | 1024-bit input BHP hash | +| [hash.ped64](#hashped64) | 64-bit input Pedersen hash | +| [hash.ped128](#hashped128) | 128-bit input Pedersen hash | +| [hash.psd2](#hashpsd2) | Poseidon hash with input rate 2 | +| [hash.psd4](#hashpsd4) | Poseidon hash with input rate 4 | +| [hash.psd8](#hashpsd8) | Poseidon hash with input rate 8 | | [inv](#inv) | Multiplicative inverse operation | | [is.eq](#iseq) | Equality comparison | | [is.neq](#isneq) | Not equal comparison | @@ -242,7 +224,7 @@ Checks whether `first` and `second` are equal, halting if they are not equal. | `U64` | `U64` | | `U128` | `U128` | | `Scalar` | `Scalar` | -| `Interface` | `Interface` | +| `Struct` | `Struct` | | `Record` | `Record` | *** @@ -274,7 +256,7 @@ Checks whether `first` and `second` are not equal, halting if they are equal. | `U64` | `U64` | | `U128` | `U128` | | `Scalar` | `Scalar` | -| `Interface` | `Interface` | +| `Struct` | `Struct` | | `Record` | `Record` | *** @@ -285,31 +267,30 @@ Checks whether `first` and `second` are not equal, halting if they are equal. #### Description -Computes a BHP commitment on inputs of 256-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Field` value. +Computes a BHP commitment on inputs of 256-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be an `Address`, `Field`, or `Group` value, as specified via `as` at the end of the instruction. The instruction will halt if the given input is smaller than 129 bits. #### Supported Types -| First | Second | Destination | -| ----------- | --------- |:----------- | -| `Address` | `Scalar` | `Field` | -| `Boolean` | `Scalar` | `Field` | -| `Field` | `Scalar` | `Field` | -| `Group` | `Scalar` | `Field` | -| `I8` | `Scalar` | `Field` | -| `I16` | `Scalar` | `Field` | -| `I32` | `Scalar` | `Field` | -| `I64` | `Scalar` | `Field` | -| `I128` | `Scalar` | `Field` | -| `U8` | `Scalar` | `Field` | -| `U16` | `Scalar` | `Field` | -| `U32` | `Scalar` | `Field` | -| `U64` | `Scalar` | `Field` | -| `U128` | `Scalar` | `Field` | -| `Scalar` | `Scalar` | `Field` | -| `String` | `Scalar` | `Field` | -| `Interface` | `Scalar` | `Field` | +| First | Second | Destination | +|-----------|----------|:----------------------------| +| `Address` | `Scalar` | `Address`, `Field`, `Group` | +| `Boolean` | `Scalar` | `Address`, `Field`, `Group` | +| `Field` | `Scalar` | `Address`, `Field`, `Group` | +| `Group` | `Scalar` | `Address`, `Field`, `Group` | +| `I8` | `Scalar` | `Address`, `Field`, `Group` | +| `I16` | `Scalar` | `Address`, `Field`, `Group` | +| `I32` | `Scalar` | `Address`, `Field`, `Group` | +| `I64` | `Scalar` | `Address`, `Field`, `Group` | +| `I128` | `Scalar` | `Address`, `Field`, `Group` | +| `U8` | `Scalar` | `Address`, `Field`, `Group` | +| `U16` | `Scalar` | `Address`, `Field`, `Group` | +| `U32` | `Scalar` | `Address`, `Field`, `Group` | +| `U64` | `Scalar` | `Address`, `Field`, `Group` | +| `U128` | `Scalar` | `Address`, `Field`, `Group` | +| `Scalar` | `Scalar` | `Address`, `Field`, `Group` | +| `Struct` | `Scalar` | `Address`, `Field`, `Group` | *** @@ -319,31 +300,30 @@ The instruction will halt if the given input is smaller than 129 bits. #### Description -Computes a BHP commitment on inputs of 512-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Field` value. +Computes a BHP commitment on inputs of 512-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be an `Address`, `Field`, or `Group` value, as specified via `as` at the end of the instruction. The instruction will halt if the given input is smaller than 171 bits. #### Supported Types -| First | Second | Destination | -| ----------- | --------- |:----------- | -| `Address` | `Scalar` | `Field` | -| `Boolean` | `Scalar` | `Field` | -| `Field` | `Scalar` | `Field` | -| `Group` | `Scalar` | `Field` | -| `I8` | `Scalar` | `Field` | -| `I16` | `Scalar` | `Field` | -| `I32` | `Scalar` | `Field` | -| `I64` | `Scalar` | `Field` | -| `I128` | `Scalar` | `Field` | -| `U8` | `Scalar` | `Field` | -| `U16` | `Scalar` | `Field` | -| `U32` | `Scalar` | `Field` | -| `U64` | `Scalar` | `Field` | -| `U128` | `Scalar` | `Field` | -| `Scalar` | `Scalar` | `Field` | -| `String` | `Scalar` | `Field` | -| `Interface` | `Scalar` | `Field` | +| First | Second | Destination | +|-----------|----------|:----------------------------| +| `Address` | `Scalar` | `Address`, `Field`, `Group` | +| `Boolean` | `Scalar` | `Address`, `Field`, `Group` | +| `Field` | `Scalar` | `Address`, `Field`, `Group` | +| `Group` | `Scalar` | `Address`, `Field`, `Group` | +| `I8` | `Scalar` | `Address`, `Field`, `Group` | +| `I16` | `Scalar` | `Address`, `Field`, `Group` | +| `I32` | `Scalar` | `Address`, `Field`, `Group` | +| `I64` | `Scalar` | `Address`, `Field`, `Group` | +| `I128` | `Scalar` | `Address`, `Field`, `Group` | +| `U8` | `Scalar` | `Address`, `Field`, `Group` | +| `U16` | `Scalar` | `Address`, `Field`, `Group` | +| `U32` | `Scalar` | `Address`, `Field`, `Group` | +| `U64` | `Scalar` | `Address`, `Field`, `Group` | +| `U128` | `Scalar` | `Address`, `Field`, `Group` | +| `Scalar` | `Scalar` | `Address`, `Field`, `Group` | +| `Struct` | `Scalar` | `Address`, `Field`, `Group` | *** @@ -353,31 +333,30 @@ The instruction will halt if the given input is smaller than 171 bits. #### Description -Computes a BHP commitment on inputs of 768-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Field` value. +Computes a BHP commitment on inputs of 768-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be an `Address`, `Field`, or `Group` value, as specified via `as` at the end of the instruction. The instruction will halt if the given input is smaller than 129 bits. #### Supported Types -| First | Second | Destination | -| ----------- | --------- |:----------- | -| `Address` | `Scalar` | `Field` | -| `Boolean` | `Scalar` | `Field` | -| `Field` | `Scalar` | `Field` | -| `Group` | `Scalar` | `Field` | -| `I8` | `Scalar` | `Field` | -| `I16` | `Scalar` | `Field` | -| `I32` | `Scalar` | `Field` | -| `I64` | `Scalar` | `Field` | -| `I128` | `Scalar` | `Field` | -| `U8` | `Scalar` | `Field` | -| `U16` | `Scalar` | `Field` | -| `U32` | `Scalar` | `Field` | -| `U64` | `Scalar` | `Field` | -| `U128` | `Scalar` | `Field` | -| `Scalar` | `Scalar` | `Field` | -| `String` | `Scalar` | `Field` | -| `Interface` | `Scalar` | `Field` | +| First | Second | Destination | +|-----------|----------|:----------------------------| +| `Address` | `Scalar` | `Address`, `Field`, `Group` | +| `Boolean` | `Scalar` | `Address`, `Field`, `Group` | +| `Field` | `Scalar` | `Address`, `Field`, `Group` | +| `Group` | `Scalar` | `Address`, `Field`, `Group` | +| `I8` | `Scalar` | `Address`, `Field`, `Group` | +| `I16` | `Scalar` | `Address`, `Field`, `Group` | +| `I32` | `Scalar` | `Address`, `Field`, `Group` | +| `I64` | `Scalar` | `Address`, `Field`, `Group` | +| `I128` | `Scalar` | `Address`, `Field`, `Group` | +| `U8` | `Scalar` | `Address`, `Field`, `Group` | +| `U16` | `Scalar` | `Address`, `Field`, `Group` | +| `U32` | `Scalar` | `Address`, `Field`, `Group` | +| `U64` | `Scalar` | `Address`, `Field`, `Group` | +| `U128` | `Scalar` | `Address`, `Field`, `Group` | +| `Scalar` | `Scalar` | `Address`, `Field`, `Group` | +| `Struct` | `Scalar` | `Address`, `Field`, `Group` | *** @@ -387,31 +366,30 @@ The instruction will halt if the given input is smaller than 129 bits. #### Description -Computes a BHP commitment on inputs of 1024-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Field` value. +Computes a BHP commitment on inputs of 1024-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be an `Address`, `Field`, or `Group` value, as specified via `as` at the end of the instruction. The instruction will halt if the given input is smaller than 171 bits. #### Supported Types -| First | Second | Destination | -| ----------- | --------- |:----------- | -| `Address` | `Scalar` | `Field` | -| `Boolean` | `Scalar` | `Field` | -| `Field` | `Scalar` | `Field` | -| `Group` | `Scalar` | `Field` | -| `I8` | `Scalar` | `Field` | -| `I16` | `Scalar` | `Field` | -| `I32` | `Scalar` | `Field` | -| `I64` | `Scalar` | `Field` | -| `I128` | `Scalar` | `Field` | -| `U8` | `Scalar` | `Field` | -| `U16` | `Scalar` | `Field` | -| `U32` | `Scalar` | `Field` | -| `U64` | `Scalar` | `Field` | -| `U128` | `Scalar` | `Field` | -| `Scalar` | `Scalar` | `Field` | -| `String` | `Scalar` | `Field` | -| `Interface` | `Scalar` | `Field` | +| First | Second | Destination | +|-----------|----------|:----------------------------| +| `Address` | `Scalar` | `Address`, `Field`, `Group` | +| `Boolean` | `Scalar` | `Address`, `Field`, `Group` | +| `Field` | `Scalar` | `Address`, `Field`, `Group` | +| `Group` | `Scalar` | `Address`, `Field`, `Group` | +| `I8` | `Scalar` | `Address`, `Field`, `Group` | +| `I16` | `Scalar` | `Address`, `Field`, `Group` | +| `I32` | `Scalar` | `Address`, `Field`, `Group` | +| `I64` | `Scalar` | `Address`, `Field`, `Group` | +| `I128` | `Scalar` | `Address`, `Field`, `Group` | +| `U8` | `Scalar` | `Address`, `Field`, `Group` | +| `U16` | `Scalar` | `Address`, `Field`, `Group` | +| `U32` | `Scalar` | `Address`, `Field`, `Group` | +| `U64` | `Scalar` | `Address`, `Field`, `Group` | +| `U128` | `Scalar` | `Address`, `Field`, `Group` | +| `Scalar` | `Scalar` | `Address`, `Field`, `Group` | +| `Struct` | `Scalar` | `Address`, `Field`, `Group` | *** @@ -421,25 +399,24 @@ The instruction will halt if the given input is smaller than 171 bits. #### Description -Computes a Pedersen commitment up to a 64-bit input in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Field` value. +Computes a Pedersen commitment up to a 64-bit input in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be an `Address`, `Field`, or `Group` value, as specified via `as` at the end of the instruction. -The instruction will halt if the given `String` or `Interface` value exceeds the 64-bit limit. +The instruction will halt if the given `Struct` value exceeds the 64-bit limit. #### Supported Types -| First | Second | Destination | -| ----------- | --------- |:----------- | -| `Boolean` | `Scalar` | `Field` | -| `I8` | `Scalar` | `Field` | -| `I16` | `Scalar` | `Field` | -| `I32` | `Scalar` | `Field` | -| `I64` | `Scalar` | `Field` | -| `U8` | `Scalar` | `Field` | -| `U16` | `Scalar` | `Field` | -| `U32` | `Scalar` | `Field` | -| `U64` | `Scalar` | `Field` | -| `String` | `Scalar` | `Field` | -| `Interface` | `Scalar` | `Field` | +| First | Second | Destination | +|-----------|----------|:----------------------------| +| `Boolean` | `Scalar` | `Address`, `Field`, `Group` | +| `I8` | `Scalar` | `Address`, `Field`, `Group` | +| `I16` | `Scalar` | `Address`, `Field`, `Group` | +| `I32` | `Scalar` | `Address`, `Field`, `Group` | +| `I64` | `Scalar` | `Address`, `Field`, `Group` | +| `U8` | `Scalar` | `Address`, `Field`, `Group` | +| `U16` | `Scalar` | `Address`, `Field`, `Group` | +| `U32` | `Scalar` | `Address`, `Field`, `Group` | +| `U64` | `Scalar` | `Address`, `Field`, `Group` | +| `Struct` | `Scalar` | `Address`, `Field`, `Group` | *** @@ -449,221 +426,24 @@ The instruction will halt if the given `String` or `Interface` value exceeds the #### Description -Computes a Pedersen commitment up to a 128-bit input in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Group` value. +Computes a Pedersen commitment up to a 128-bit input in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be an `Address`, `Field`, or `Group` value, as specified via `as` at the end of the instruction. -The instruction will halt if the given `String` or `Interface` value exceeds the 128-bit limit. +The instruction will halt if the given `Struct` value exceeds the 128-bit limit. #### Supported Types -| First | Second | Destination | -| ----------- | --------- |:----------- | -| `Boolean` | `Scalar` | `Field` | -| `I8` | `Scalar` | `Field` | -| `I16` | `Scalar` | `Field` | -| `I32` | `Scalar` | `Field` | -| `I64` | `Scalar` | `Field` | -| `I128` | `Scalar` | `Field` | -| `U8` | `Scalar` | `Field` | -| `U16` | `Scalar` | `Field` | -| `U32` | `Scalar` | `Field` | -| `U64` | `Scalar` | `Field` | -| `U128` | `Scalar` | `Field` | -| `String` | `Scalar` | `Field` | -| `Interface` | `Scalar` | `Field` | - -*** - -### `commit_to_group.bhp256` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Bowe-Hopwood-Pedersen commitment on inputs of 256-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Group` value. - -The instruction will halt if the given input is smaller than 129 bits. - -#### Supported Types - -| First | Second | Destination | -|-----------|----------|:------------| -| `Address` | `Scalar` | `Group` | -| `Boolean` | `Scalar` | `Group` | -| `Field` | `Scalar` | `Group` | -| `Group` | `Scalar` | `Group` | -| `I8` | `Scalar` | `Group` | -| `I16` | `Scalar` | `Group` | -| `I32` | `Scalar` | `Group` | -| `I64` | `Scalar` | `Group` | -| `I128` | `Scalar` | `Group` | -| `U8` | `Scalar` | `Group` | -| `U16` | `Scalar` | `Group` | -| `U32` | `Scalar` | `Group` | -| `U64` | `Scalar` | `Group` | -| `U128` | `Scalar` | `Group` | -| `Scalar` | `Scalar` | `Group` | -| `String` | `Scalar` | `Group` | -| `Struct` | `Scalar` | `Group` | - -*** - -### `commit_to_group.bhp512` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Bowe-Hopwood-Pedersen commitment on inputs of 512-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Group` value. - -The instruction will halt if the given input is smaller than 171 bits. - -#### Supported Types - -| First | Second | Destination | -|-----------|----------|:------------| -| `Address` | `Scalar` | `Group` | -| `Boolean` | `Scalar` | `Group` | -| `Field` | `Scalar` | `Group` | -| `Group` | `Scalar` | `Group` | -| `I8` | `Scalar` | `Group` | -| `I16` | `Scalar` | `Group` | -| `I32` | `Scalar` | `Group` | -| `I64` | `Scalar` | `Group` | -| `I128` | `Scalar` | `Group` | -| `U8` | `Scalar` | `Group` | -| `U16` | `Scalar` | `Group` | -| `U32` | `Scalar` | `Group` | -| `U64` | `Scalar` | `Group` | -| `U128` | `Scalar` | `Group` | -| `Scalar` | `Scalar` | `Group` | -| `String` | `Scalar` | `Group` | -| `Struct` | `Scalar` | `Group` | - -*** - -### `commit_to_group.bhp768` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Bowe-Hopwood-Pedersen commitment on inputs of 768-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Group` value. - -The instruction will halt if the given input is smaller than 129 bits. - -#### Supported Types - -| First | Second | Destination | -|-----------|----------|:------------| -| `Address` | `Scalar` | `Group` | -| `Boolean` | `Scalar` | `Group` | -| `Field` | `Scalar` | `Group` | -| `Group` | `Scalar` | `Group` | -| `I8` | `Scalar` | `Group` | -| `I16` | `Scalar` | `Group` | -| `I32` | `Scalar` | `Group` | -| `I64` | `Scalar` | `Group` | -| `I128` | `Scalar` | `Group` | -| `U8` | `Scalar` | `Group` | -| `U16` | `Scalar` | `Group` | -| `U32` | `Scalar` | `Group` | -| `U64` | `Scalar` | `Group` | -| `U128` | `Scalar` | `Group` | -| `Scalar` | `Scalar` | `Group` | -| `String` | `Scalar` | `Group` | -| `Struct` | `Scalar` | `Group` | - -*** - -### `commit_to_group.bhp1024` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Bowe-Hopwood-Pedersen commitment on inputs of 1024-bit chunks in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Group` value. - -The instruction will halt if the given input is smaller than 171 bits. - -#### Supported Types - -| First | Second | Destination | -|-----------|----------|:------------| -| `Address` | `Scalar` | `Group` | -| `Boolean` | `Scalar` | `Group` | -| `Field` | `Scalar` | `Group` | -| `Group` | `Scalar` | `Group` | -| `I8` | `Scalar` | `Group` | -| `I16` | `Scalar` | `Group` | -| `I32` | `Scalar` | `Group` | -| `I64` | `Scalar` | `Group` | -| `I128` | `Scalar` | `Group` | -| `U8` | `Scalar` | `Group` | -| `U16` | `Scalar` | `Group` | -| `U32` | `Scalar` | `Group` | -| `U64` | `Scalar` | `Group` | -| `U128` | `Scalar` | `Group` | -| `Scalar` | `Scalar` | `Group` | -| `String` | `Scalar` | `Group` | -| `Struct` | `Scalar` | `Group` | - -*** - -### `commit_to_group.ped64` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Pedersen commitment up to a 64-bit input in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Group` value. - -The instruction will halt if the given `String` or `Struct` value exceeds the 64-bit limit. - -#### Supported Types - -| First | Second | Destination | -|-----------|----------|:------------| -| `Boolean` | `Scalar` | `Group` | -| `I8` | `Scalar` | `Group` | -| `I16` | `Scalar` | `Group` | -| `I32` | `Scalar` | `Group` | -| `I64` | `Scalar` | `Group` | -| `U8` | `Scalar` | `Group` | -| `U16` | `Scalar` | `Group` | -| `U32` | `Scalar` | `Group` | -| `U64` | `Scalar` | `Group` | -| `String` | `Scalar` | `Group` | -| `Struct` | `Scalar` | `Group` | - -*** - -### `commit_to_group.ped128` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Pedersen commitment up to a 128-bit input in `first`, and some randomness in `second`, storing the commitment in `destination`. Randomness should always be a `Scalar` value, and the produced commitment will always be a `Group` value. - -The instruction will halt if the given `String` or `Struct` value exceeds the 128-bit limit. - -#### Supported Types - -| First | Second | Destination | -|-----------|----------|:------------| -| `Boolean` | `Scalar` | `Group` | -| `I8` | `Scalar` | `Group` | -| `I16` | `Scalar` | `Group` | -| `I32` | `Scalar` | `Group` | -| `I64` | `Scalar` | `Group` | -| `I128` | `Scalar` | `Group` | -| `U8` | `Scalar` | `Group` | -| `U16` | `Scalar` | `Group` | -| `U32` | `Scalar` | `Group` | -| `U64` | `Scalar` | `Group` | -| `U128` | `Scalar` | `Group` | -| `String` | `Scalar` | `Group` | -| `Struct` | `Scalar` | `Group` | +| First | Second | Destination | +|-----------|----------|:----------------------------| +| `Boolean` | `Scalar` | `Address`, `Field`, `Group` | +| `I8` | `Scalar` | `Address`, `Field`, `Group` | +| `I16` | `Scalar` | `Address`, `Field`, `Group` | +| `I32` | `Scalar` | `Address`, `Field`, `Group` | +| `I64` | `Scalar` | `Address`, `Field`, `Group` | +| `U8` | `Scalar` | `Address`, `Field`, `Group` | +| `U16` | `Scalar` | `Address`, `Field`, `Group` | +| `U32` | `Scalar` | `Address`, `Field`, `Group` | +| `U64` | `Scalar` | `Address`, `Field`, `Group` | +| `Struct` | `Scalar` | `Address`, `Field`, `Group` | *** @@ -806,31 +586,30 @@ Checks if `first` is greater than or equal to `second`, storing the result in `d #### Description -Computes a BHP hash on inputs of 256-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. +Computes a BHP hash on inputs of 256-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. The instruction will halt if the given input is smaller than 129 bits. #### Supported Types -| First | Destination | -| ----------- |:----------- | -| `Address` | `Field` | -| `Boolean` | `Field` | -| `Field` | `Field` | -| `Group` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `I128` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `U128` | `Field` | -| `Scalar` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Address` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Boolean` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Field` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Group` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Scalar` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -840,31 +619,30 @@ The instruction will halt if the given input is smaller than 129 bits. #### Description -Computes a BHP hash on inputs of 512-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. +Computes a BHP hash on inputs of 512-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. The instruction will halt if the given input is smaller than 171 bits. #### Supported Types -| First | Destination | -| ----------- |:----------- | -| `Address` | `Field` | -| `Boolean` | `Field` | -| `Field` | `Field` | -| `Group` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `I128` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `U128` | `Field` | -| `Scalar` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Address` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Boolean` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Field` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Group` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Scalar` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -874,31 +652,30 @@ The instruction will halt if the given input is smaller than 171 bits. #### Description -Computes a BHP hash on inputs of 768-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. +Computes a BHP hash on inputs of 768-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. The instruction will halt if the given input is smaller than 129 bits. #### Supported Types -| First | Destination | -| ----------- |:----------- | -| `Address` | `Field` | -| `Boolean` | `Field` | -| `Field` | `Field` | -| `Group` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `I128` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `U128` | `Field` | -| `Scalar` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Address` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Boolean` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Field` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Group` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Scalar` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -908,31 +685,30 @@ The instruction will halt if the given input is smaller than 129 bits. #### Description -Computes a BHP hash on inputs of 1024-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. +Computes a BHP hash on inputs of 1024-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. The instruction will halt if the given input is smaller than 171 bits. #### Supported Types -| First | Destination | -| ----------- |:----------- | -| `Address` | `Field` | -| `Boolean` | `Field` | -| `Field` | `Field` | -| `Group` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `I128` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `U128` | `Field` | -| `Scalar` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Address` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Boolean` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Field` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Group` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Scalar` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -942,25 +718,24 @@ The instruction will halt if the given input is smaller than 171 bits. #### Description -Computes a Pedersen hash up to a 64-bit input in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. +Computes a Pedersen hash up to a 64-bit input in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. -The instruction will halt if the given `String` or `Interface` value exceeds the 64-bit limit. +The instruction will halt if the given `Struct` value exceeds the 64-bit limit. #### Supported Types -| First | Destination | -| ----------- |:----------- | -| `Boolean` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Boolean` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -970,27 +745,26 @@ The instruction will halt if the given `String` or `Interface` value exceeds the #### Description -Computes a Pedersen hash up to a 128-bit input in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. +Computes a Pedersen hash up to a 128-bit input in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. -The instruction will halt if the given `String` or `Interface` value exceeds the 128-bit limit. +The instruction will halt if the given `Struct` value exceeds the 128-bit limit. #### Supported Types -| First | Destination | -| ----------- |:----------- | -| `Boolean` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `I128` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `U128` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Boolean` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -1000,26 +774,25 @@ The instruction will halt if the given `String` or `Interface` value exceeds the #### Description -Calculates a Poseidon hash with an input rate of 2, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. +Calculates a Poseidon hash with an input rate of 2, from an input in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. #### Supported Types -| First | Destination | -| ----------- |:----------- | -| `Field` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `I128` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `U128` | `Field` | -| `Scalar` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Field` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Scalar` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -1029,26 +802,25 @@ Calculates a Poseidon hash with an input rate of 2, from an input in `first`, st #### Description -Calculates a Poseidon hash with an input rate of 4, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. +Calculates a Poseidon hash with an input rate of 4, from an input in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. #### Supported Types -| First | Destination | -| ----------- |:----------- | -| `Field` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `I128` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `U128` | `Field` | -| `Scalar` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Field` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Scalar` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -1058,394 +830,25 @@ Calculates a Poseidon hash with an input rate of 4, from an input in `first`, st #### Description -Calculates a Poseidon hash with an input rate of 8, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Field` value. - -#### Supported Types - -| First | Destination | -| ----------- |:----------- | -| `Field` | `Field` | -| `I8` | `Field` | -| `I16` | `Field` | -| `I32` | `Field` | -| `I64` | `Field` | -| `I128` | `Field` | -| `U8` | `Field` | -| `U16` | `Field` | -| `U32` | `Field` | -| `U64` | `Field` | -| `U128` | `Field` | -| `Scalar` | `Field` | -| `String` | `Field` | -| `Interface` | `Field` | - -*** - -### `hash_to_group.bhp256` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Bowe-Hopwood-Pedersen hash on inputs of 256-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -The instruction will halt if the given input is smaller than 129 bits. - -#### Supported Types - -| First | Destination | -|-----------|:------------| -| `Address` | `Group` | -| `Boolean` | `Group` | -| `Field` | `Group` | -| `Group` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `I128` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `U128` | `Group` | -| `Scalar` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_group.bhp512` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Bowe-Hopwood-Pedersen hash on inputs of 512-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -The instruction will halt if the given input is smaller than 171 bits. - -#### Supported Types - -| First | Destination | -|-----------|:------------| -| `Address` | `Group` | -| `Boolean` | `Group` | -| `Field` | `Group` | -| `Group` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `I128` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `U128` | `Group` | -| `Scalar` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_group.bhp768` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Bowe-Hopwood-Pedersen hash on inputs of 768-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -The instruction will halt if the given input is smaller than 129 bits. - -#### Supported Types - -| First | Destination | -|-----------|:------------| -| `Address` | `Group` | -| `Boolean` | `Group` | -| `Field` | `Group` | -| `Group` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `I128` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `U128` | `Group` | -| `Scalar` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_group.bhp1024` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Bowe-Hopwood-Pedersen hash on inputs of 1024-bit chunks in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -The instruction will halt if the given input is smaller than 171 bits. - -#### Supported Types - -| First | Destination | -|-----------|:------------| -| `Address` | `Group` | -| `Boolean` | `Group` | -| `Field` | `Group` | -| `Group` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `I128` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `U128` | `Group` | -| `Scalar` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_group.ped64` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Pedersen hash up to a 64-bit input in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -The instruction will halt if the given `String` or `Struct` value exceeds the 64-bit limit. - -#### Supported Types - -| First | Destination | -|-----------|:------------| -| `Boolean` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_group.ped128` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Computes a Pedersen hash up to a 128-bit input in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -The instruction will halt if the given `String` or `Struct` value exceeds the 128-bit limit. - -#### Supported Types - -| First | Destination | -|-----------|:------------| -| `Boolean` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `I128` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `U128` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_group.psd2` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Calculates a Poseidon hash with an input rate of 2, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -#### Supported Types - -| First | Destination | -|----------|:------------| -| `Field` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `I128` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `U128` | `Group` | -| `Scalar` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_group.psd4` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Calculates a Poseidon hash with an input rate of 4, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -#### Supported Types - -| First | Destination | -|----------|:------------| -| `Field` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `I128` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `U128` | `Group` | -| `Scalar` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_group.psd8` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Calculates a Poseidon hash with an input rate of 8, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Group` value. - -#### Supported Types - -| First | Destination | -|----------|:------------| -| `Field` | `Group` | -| `I8` | `Group` | -| `I16` | `Group` | -| `I32` | `Group` | -| `I64` | `Group` | -| `I128` | `Group` | -| `U8` | `Group` | -| `U16` | `Group` | -| `U32` | `Group` | -| `U64` | `Group` | -| `U128` | `Group` | -| `Scalar` | `Group` | -| `String` | `Group` | -| `Struct` | `Group` | - -*** - -### `hash_to_scalar.psd2` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Calculates a Poseidon hash with an input rate of 2, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Scalar` value. - -#### Supported Types - -| First | Destination | -|----------|:------------| -| `Field` | `Scalar` | -| `I8` | `Scalar` | -| `I16` | `Scalar` | -| `I32` | `Scalar` | -| `I64` | `Scalar` | -| `I128` | `Scalar` | -| `U8` | `Scalar` | -| `U16` | `Scalar` | -| `U32` | `Scalar` | -| `U64` | `Scalar` | -| `U128` | `Scalar` | -| `Scalar` | `Scalar` | -| `String` | `Scalar` | -| `Struct` | `Scalar` | - -*** - -### `hash_to_scalar.psd4` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Calculates a Poseidon hash with an input rate of 4, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Scalar` value. - -#### Supported Types - -| First | Destination | -|----------|:------------| -| `Field` | `Scalar` | -| `I8` | `Scalar` | -| `I16` | `Scalar` | -| `I32` | `Scalar` | -| `I64` | `Scalar` | -| `I128` | `Scalar` | -| `U8` | `Scalar` | -| `U16` | `Scalar` | -| `U32` | `Scalar` | -| `U64` | `Scalar` | -| `U128` | `Scalar` | -| `Scalar` | `Scalar` | -| `String` | `Scalar` | -| `Struct` | `Scalar` | - -*** - -### `hash_to_scalar.psd8` - -[Back to Top](#table-of-standard-opcodes) - -#### Description - -Calculates a Poseidon hash with an input rate of 8, from an input in `first`, storing the hash in `destination`. The produced hash will always be a `Scalar` value. +Calculates a Poseidon hash with an input rate of 8, from an input in `first`, storing the hash in `destination`. The produced hash will always be an arithmetic (`U8`, `U16`, `U32`, `U64`, `U128`, `I8`, `I16`, `I32`,`I64`,`I128`, `Field`, `Group`, or `Scalar`) or `Address` value, as specified via `as` at the end of the instruction. #### Supported Types -| First | Destination | -|----------|:------------| -| `Field` | `Scalar` | -| `I8` | `Scalar` | -| `I16` | `Scalar` | -| `I32` | `Scalar` | -| `I64` | `Scalar` | -| `I128` | `Scalar` | -| `U8` | `Scalar` | -| `U16` | `Scalar` | -| `U32` | `Scalar` | -| `U64` | `Scalar` | -| `U128` | `Scalar` | -| `Scalar` | `Scalar` | -| `String` | `Scalar` | -| `Struct` | `Scalar` | +| First | Destination | +|-----------|:----------------------------------------------------------------------------------------------------------| +| `Field` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `I128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U8` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U16` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U32` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U64` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `U128` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Scalar` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | +| `Struct` | `Address`, `Field`, `Group`, `Scalar`, `I8`, `I16`, `I32`,`I64`,`I128`, `U8`, `U16`, `U32`, `U64`, `U128` | *** @@ -1492,7 +895,7 @@ Compares `first` and `second`, storing the result in `destination`. | `U64` | `U64` | `U64` | | `U128` | `U128` | `U128` | | `Scalar` | `Scalar` | `Scalar` | -| `Interface` | `Interface` | `Interface` | +| `Struct` | `Struct` | `Struct` | | `Record` | `Record` | `Record` | *** @@ -1524,7 +927,7 @@ Returns true if `first` is not equal to `second`, storing the result in `destina | `U64` | `U64` | `U64` | | `U128` | `U128` | `U128` | | `Scalar` | `Scalar` | `Scalar` | -| `Interface` | `Interface` | `Interface` | +| `Struct` | `Struct` | `Struct` | | `Record` | `Record` | `Record` | ***