Constants§
- BLS12381_
ADD - Executes the
BLS12381_ADDprecompile. - BLS12381_
DECOMPRESS - Executes
BLS12381_DECOMPRESS. - BLS12381_
DOUBLE - Executes the
BLS12381_DOUBLEprecompile. - BLS12381_
FP2_ ADD - Executes the
BLS12381_FP2_ADDprecompile. - BLS12381_
FP2_ MUL - Executes the
BLS12381_FP2_MULprecompile. - BLS12381_
FP2_ SUB - Executes the
BLS12381_FP2_SUBprecompile. - BLS12381_
FP_ ADD - Executes the
BLS12381_FP_ADDprecompile. - BLS12381_
FP_ MUL - Executes the
BLS12381_FP_MULprecompile. - BLS12381_
FP_ SUB - Executes the
BLS12381_FP_SUBprecompile. - BN254_
ADD - Executes
BN254_ADD. - BN254_
DOUBLE - Executes
BN254_DOUBLE. - BN254_
FP2_ ADD - Executes the
BN254_FP2_ADDprecompile. - BN254_
FP2_ MUL - Executes the
BN254_FP2_MULprecompile. - BN254_
FP2_ SUB - Executes the
BN254_FP2_SUBprecompile. - BN254_
FP_ ADD - Executes the
BN254_FP_ADDprecompile. - BN254_
FP_ MUL - Executes the
BN254_FP_MULprecompile. - BN254_
FP_ SUB - Executes the
BN254_FP_SUBprecompile. - COMMIT
- Executes the
COMMITprecompile. - COMMIT_
DEFERRED_ PROOFS - Executes the
COMMIT_DEFERRED_PROOFSprecompile. - ED_ADD
- Executes
ED_ADD. - ED_
DECOMPRESS - Executes
ED_DECOMPRESS. - ENTER_
UNCONSTRAINED - Enter an unconstrained execution block.
- EXIT_
UNCONSTRAINED - Exit an unconstrained execution block.
- HALT
- These codes MUST match the codes in
core/src/runtime/syscall.rs. There is a derived test that checks that the enum is consistent with the syscalls. - HINT_
LEN - Executes
HINT_LEN. - HINT_
READ - Executes
HINT_READ. - KECCAK_
PERMUTE - Executes
KECCAK_PERMUTE. - MAX_
MEMORY - SECP256
K1_ ADD - Executes
SECP256K1_ADD. - SECP256
K1_ DECOMPRESS - Executes
K256_DECOMPRESS. - SECP256
K1_ DOUBLE - Executes
SECP256K1_DOUBLE. - SECP256
R1_ ADD - Executes
SECP256R1_ADD. - SECP256
R1_ DECOMPRESS - Executes
SECP256R1_DECOMPRESS. - SECP256
R1_ DOUBLE - Executes
SECP256R1_DOUBLE. - SHA_
COMPRESS - Executes
SHA_COMPRESS. - SHA_
EXTEND - Executes
SHA_EXTEND. - U256X
U2048_ MUL - Executes
U256XU2048_MUL. - UINT256_
MUL - Executes the
UINT256_MULprecompile. - VERIFY_
MONEROCHAN_ PROOF - Executes the
VERIFY_MONEROCHAN_PROOFprecompile. - WRITE
- Writes to a file descriptor. Currently only used for
STDOUT/STDERR.
Functions§
- sys_
alloc_ words - sys_
bigint - Sets
resultto be(x op y) % modulus. - sys_
getenv - sys_
panic ⚠ - sys_
rand ⚠ - Generates random bytes.
- sys_
write - syscall_
bls12381_ add - Adds two Bls12381 points.
- syscall_
bls12381_ decompress - Decompresses a compressed BLS12-381 point.
- syscall_
bls12381_ double - Double a Bls12381 point.
- syscall_
bls12381_ fp2_ addmod - BLS12-381 Fp2 addition operation.
- syscall_
bls12381_ fp2_ mulmod - BLS12-381 Fp2 multiplication operation.
- syscall_
bls12381_ fp2_ submod - BLS12-381 Fp2 subtraction operation.
- syscall_
bls12381_ fp_ addmod - Fp addition operation.
- syscall_
bls12381_ fp_ mulmod - Fp multiplication operation.
- syscall_
bls12381_ fp_ submod - Fp subtraction operation.
- syscall_
bn254_ add - Adds two Bn254 points.
- syscall_
bn254_ double - Double a Bn254 point.
- syscall_
bn254_ fp2_ addmod - BN254 Fp2 addition operation.
- syscall_
bn254_ fp2_ mulmod - BN254 Fp2 multiplication operation.
- syscall_
bn254_ fp2_ submod - BN254 Fp2 subtraction operation.
- syscall_
bn254_ fp_ addmod - Fp addition operation.
- syscall_
bn254_ fp_ mulmod - Fp multiplication operation.
- syscall_
bn254_ fp_ submod - Fp subtraction operation.
- syscall_
ed_ add - Adds two Edwards points.
- syscall_
ed_ decompress - Decompresses a compressed Edwards point.
- syscall_
enter_ unconstrained - syscall_
exit_ unconstrained - syscall_
halt - Halts the program with the given exit code.
- syscall_
hint_ len - Returns the length of the next element in the hint stream.
- syscall_
hint_ read - Reads the next element in the hint stream into the given buffer.
- syscall_
keccak_ permute - Executes the Keccak256 permutation on the given state.
- syscall_
secp256k1_ add - Adds two Secp256k1 points.
- syscall_
secp256k1_ decompress - Decompresses a compressed Secp256k1 point.
- syscall_
secp256k1_ double - Double a Secp256k1 point.
- syscall_
secp256r1_ add - Adds two Secp256k1 points.
- syscall_
secp256r1_ decompress - Decompresses a compressed Secp256k1 point.
- syscall_
secp256r1_ double - Double a Secp256k1 point.
- syscall_
sha256_ compress - Executes the SHA256 compress operation on the given word array and a given state.
- syscall_
sha256_ extend - Executes the SHA256 extend operation on the given word array.
- syscall_
u256x2048_ mul - Multiplication operation between a 256-bit and a 2048-bit unsigned integer.
- syscall_
uint256_ mulmod - Uint256 multiplication operation.
- syscall_
write - Write
nbytesof data to the prover to a given file descriptorfdfromwrite_buf. - used_
memory - Used memory in bytes.